feat: add ClawHub/OpenClaw publishing support

This commit is contained in:
Jim Liu 宝玉
2026-03-08 19:22:13 -05:00
parent 2e68aa64a4
commit a37c80e142
4 changed files with 66 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
SKILLS_DIR="${ROOT_DIR}/skills"
if command -v clawhub >/dev/null 2>&1; then
CLAWHUB_CMD=(clawhub)
elif command -v npx >/dev/null 2>&1; then
CLAWHUB_CMD=(npx -y clawhub)
else
echo "Error: neither clawhub nor npx is available."
echo "See https://docs.openclaw.ai/zh-CN/tools/clawhub"
exit 1
fi
if [ "$#" -eq 0 ]; then
set -- --all
fi
exec "${CLAWHUB_CMD[@]}" sync --root "${SKILLS_DIR}" "$@"