Install
openclaw skills install skill-syncAutomatically sync local skills to ClawHub and GitHub. Detects new/modified skills, publishes to ClawHub, commits to GitHub, and maintains sync status.
openclaw skills install skill-sync一键同步你的所有 skills
node /Users/xufan65/.openclaw/workspace/skills/skill-sync/scripts/sync.cjs
功能:
创建定时任务,每小时自动检查并同步:
openclaw cron add \
--name "skill-sync" \
--cron "0 * * * *" \
--tz "Asia/Shanghai" \
--session isolated \
--wake now \
--deliver \
--message "运行 skill-sync: 检查所有 skills 的变化,自动同步到 ClawHub 和 GitHub。报告格式用中文。"
运行频率:
0 * * * *)*/30 * * * *)cat /Users/xufan65/.openclaw/workspace/memory/skill-sync-status.json
包含内容:
┌─────────────────┐
│ 扫描 Skills │
│ - 检测新增 │
│ - 检测修改 │
└────────┬────────┘
│
▼
┌─────────────────┐
│ 生成同步列表 │
│ - 新 skills │
│ - 修改的 skills│
└────────┬────────┘
│
▼
有需要同步的?
│
┌────┴────┐
Yes No
│ │
▼ ▼
┌───────┐ ┌──────────┐
│同步流程│ │推送报告 │
└───┬───┘ │无需同步 │
│ └──────────┘
▼
┌─────────────────┐
│ 1. Git Commit │
│ 2. ClawHub Pub │
│ 3. Git Push │
│ 4. 更新状态 │
└────────┬────────┘
│
▼
┌─────────────────┐
│ 推送同步报告 │
│ - 成功列表 │
│ - 失败列表 │
│ - 状态更新 │
└─────────────────┘
config/settings.json{
"skillsDir": "/Users/xufan65/.openclaw/workspace/skills",
"statusFile": "/Users/xufan65/.openclaw/workspace/memory/skill-sync-status.json",
"gitRepo": "/Users/xufan65/.openclaw/workspace",
"clawhubConfig": {
"autoPublish": true,
"requireConfirmation": false
},
"gitConfig": {
"autoCommit": true,
"autoPush": true,
"commitMessage": "Auto-sync skills to ClawHub"
},
"ignorePatterns": [
"node_modules",
".git",
"*.log",
"*.tmp"
]
}
memory/skill-sync-status.json{
"lastSync": "2026-03-12T14:30:00+08:00",
"skills": {
"deals-hunter": {
"version": "3.0.0",
"clawhubId": "k97c0kee4b0t8rmf4490m9r9bn82s082",
"clawhubPublished": "2026-03-12T10:00:00+08:00",
"gitCommit": "7779310",
"gitPushed": "2026-03-12T14:30:00+08:00",
"status": "synced"
},
"failure-monitor": {
"version": "1.0.0",
"clawhubId": "k973cr1p4k5g3mh36yjp24agg182rcsa",
"clawhubPublished": "2026-03-12T14:30:00+08:00",
"gitCommit": "22b355d",
"gitPushed": "2026-03-12T14:35:00+08:00",
"status": "synced"
}
}
}
新增 Skill
skills/ 目录下出现新的 skill 文件夹SKILL.md 文件版本更新
SKILL.md 中的 version 字段变化package.json 中的 version 字段变化文件修改
SKILL.md 被修改scripts/ 目录下的文件被修改config/ 目录下的文件被修改未同步状态
pending 或 failedgit add + git commit# ✅ Skills 同步完成
**同步时间**: 2026-03-12 14:30:00
**总计**: 3 个 skills
## 📦 成功同步
### 1. **failure-monitor** v1.0.0
- ✅ ClawHub: k973cr1p4k5g3mh36yjp24agg182rcsa
- ✅ GitHub: commit 22b355d
- 📅 发布时间: 2026-03-12 14:30:00
### 2. **deals-hunter** v3.0.0
- ✅ ClawHub: k97c0kee4b0t8rmf4490m9r9bn82s082
- ✅ GitHub: commit 7779310
- 📅 发布时间: 2026-03-12 10:00:00
---
**🔗 快速链接**:
- ClawHub: https://clawhub.com/skill/failure-monitor
- GitHub: https://github.com/sunnyhot/deals-hunter
# ℹ️ Skills 检查完成
**检查时间**: 2026-03-12 15:00:00
**总计**: 10 个 skills
✅ 所有 skills 已是最新状态,无需同步
# ⚠️ Skills 同步完成(部分失败)
**同步时间**: 2026-03-12 14:30:00
**成功**: 2 个 | **失败**: 1 个
## ✅ 成功同步
- failure-monitor v1.0.0
- deals-hunter v3.0.0
## ❌ 失败列表
### skill-name v1.0.0
- **错误**: ClawHub API rate limit exceeded
- **建议**: 稍后重试或手动发布
---
**建议**: 检查失败的 skills 并手动修复
skills/skill-sync/
├── SKILL.md # 技能说明
├── scripts/
│ ├── sync.cjs # 主同步脚本
│ ├── scan-skills.cjs # 扫描 skills
│ ├── publish-clawhub.cjs # 发布到 ClawHub
│ └── git-sync.cjs # Git 同步
├── config/
│ └── settings.json # 配置选项
└── package.json # 依赖管理
node scripts/sync.cjs --all
同步所有需要同步的 skills
node scripts/sync.cjs --skill failure-monitor
只同步指定的 skill
node scripts/sync.cjs --clawhub-only
只发布到 ClawHub,不提交到 GitHub
node scripts/sync.cjs --git-only
只提交到 GitHub,不发布到 ClawHub
node scripts/sync.cjs --dry-run
只检查需要同步的 skills,不实际执行
version 字段A: 检查以下几点:
clawhub login)A: 检查以下几点:
git push 解决A: 查看日志文件:
cat /Users/xufan65/.openclaw/workspace/memory/skill-sync-log.json
欢迎提交 Issue 和 Pull Request!
GitHub: https://github.com/sunnyhot/skill-sync
🎉 让你的 skills 管理更加自动化!