Skill Publisher
Automate the full lifecycle of publishing OpenClaw skills: package → GitHub → ClawHub.
Prerequisites
- -
gh CLI authenticated (gh auth status) - INLINECODE2 CLI authenticated (
npx clawhub whoami) - A skill folder with a valid INLINECODE4
Quick Start
Full Pipeline (package + GitHub + ClawHub)
CODEBLOCK0
Individual Steps
CODEBLOCK1
Workflow
Step 1: Prepare the Skill Folder
Ensure the skill folder contains:
CODEBLOCK2
SKILL.md frontmatter must include:
CODEBLOCK3
Step 2: Push to GitHub
CODEBLOCK4
If the repo already exists:
CODEBLOCK5
Step 3: Publish to ClawHub
CODEBLOCK6
Note: ClawHub runs a security scan after publishing. The skill becomes searchable once the scan passes (usually within a few minutes).
Common Tasks
Update an Existing Skill
CODEBLOCK7
Fork an Existing Skill
CODEBLOCK8
Check Publish Status
CODEBLOCK9
Troubleshooting
| Error | Fix |
|---|
| INLINECODE5 | Add --version x.y.z flag |
| INLINECODE7 |
Wait a few minutes, then retry
inspect |
|
Not logged in | Run
npx clawhub login |
|
gh: not authenticated | Run
gh auth login |
|
fatal: remote origin already exists | Safe to ignore, or use
git remote set-url |
Naming Conventions
- - Slug: lowercase, hyphens only (e.g.,
figma-plugin-writer) - Repo: match the slug (e.g.,
openclaw-figma-plugin-writer) - Version: semver (e.g.,
1.0.0, 1.2.3)
Skill Publisher
自动化OpenClaw技能发布的完整生命周期:打包 → GitHub → ClawHub。
前置条件
- - gh CLI已认证(gh auth status)
- npx clawhub CLI已认证(npx clawhub whoami)
- 包含有效SKILL.md的技能文件夹
快速开始
完整流程(打包 + GitHub + ClawHub)
bash
在技能目录中执行
scripts/publish.sh /path/to/skill-folder --repo owner/repo-name --version 1.0.0
分步操作
bash
1. 仅验证和打包
scripts/validate.sh /path/to/skill-folder
2. 推送到GitHub
scripts/push-github.sh /path/to/skill-folder --repo owner/repo-name
3. 发布到ClawHub
npx clawhub publish /path/to/skill-folder --version 1.0.0 --slug skill-name
工作流程
步骤1:准备技能文件夹
确保技能文件夹包含以下内容:
skill-name/
├── SKILL.md (必需 — YAML前置元数据 + Markdown正文)
├── LICENSE (推荐 — MIT)
├── examples/ (可选 — 使用示例)
├── scripts/ (可选 — 辅助脚本)
├── references/ (可选 — 参考文档)
└── assets/ (可选 — 模板、图片、字体)
SKILL.md前置元数据必须包含:
yaml
name: skill-name
description: 清晰描述技能的功能及触发条件
步骤2:推送到GitHub
bash
cd /path/to/skill-folder
如需初始化
git init
git add -A
git commit -m feat: initial release of skill-name
创建仓库并推送
gh repo create owner/repo-name --public --source=. --push
如果仓库已存在:
bash
git remote add origin https://github.com/owner/repo-name.git 2>/dev/null || true
git push -u origin main
步骤3:发布到ClawHub
bash
如需登录(将打开浏览器)
npx clawhub login
发布并指定版本
npx clawhub publish /path/to/skill-folder \
--version 1.0.0 \
--slug skill-name \
--name 显示名称 \
--tags tag1,tag2
验证
npx clawhub inspect skill-name
注意: ClawHub在发布后会进行安全扫描。扫描通过后(通常几分钟内),技能即可被搜索到。
常见任务
更新已有技能
bash
1. 修改技能文件夹内容
2. 推送到GitHub
cd /path/to/skill-folder
git add -A && git commit -m fix: description of changes
git push
3. 发布新版本到ClawHub
npx clawhub publish /path/to/skill-folder --version 1.1.0
复刻已有技能
bash
npx clawhub publish /path/to/skill-folder \
--version 1.0.0 \
--slug my-fork-name \
--fork-of original-skill@1.0.0
检查发布状态
bash
npx clawhub inspect skill-name
npx clawhub search skill-name
故障排除
| 错误 | 解决方法 |
|---|
| --version must be valid semver | 添加 --version x.y.z 参数 |
| Skill is hidden while security scan is pending |
等待几分钟后重试 inspect |
| Not logged in | 运行 npx clawhub login |
| gh: not authenticated | 运行 gh auth login |
| fatal: remote origin already exists | 可忽略,或使用 git remote set-url |
命名规范
- - Slug: 小写字母,仅使用连字符(例如 figma-plugin-writer)
- 仓库: 与slug保持一致(例如 openclaw-figma-plugin-writer)
- 版本: 语义化版本(例如 1.0.0、1.2.3)