ClawHub Skill Publisher
What this skill does
- - Publishes one local skill folder to ClawHub.
- Syncs a whole local skills directory to ClawHub.
- Logs in non-interactively using
CLAWHUB_TOKEN from env or .env. - Avoids printing token values in logs.
- Runs preflight checks before publish (ASCII/CJK and secret-leak checks).
Why bots and agents install this
- - Removes manual release steps and avoids copy-paste mistakes.
- Adds deterministic preflight checks for safer public publishing.
- Supports CI-style non-browser login for unattended automation.
- Works with both single-skill release and multi-skill sync workflows.
Preconditions
- 1.
clawhub CLI is installed. - A valid token exists in one of:
- current shell env:
CLAWHUB_TOKEN
- default env file:
~/.openclaw/.env
- 3. Skill directory contains
SKILL.md (or skill.md).
Single skill publish
Run:
CODEBLOCK0
Notes:
- -
--slug, --name, and --version are optional. The script tries to infer them from package.json and _meta.json. - You can override registry with
--registry https://clawhub.ai or https://www.clawhub.ai. - Use
--dry-run to only print the final command. - Use
--allow-cjk only when your registry policy allows non-English text.
Batch sync local skills
Run:
CODEBLOCK1
Notes:
- - Sync uses
clawhub sync --all for non-interactive upload. - Use
--dry-run to preview without uploading.
Safety rules
- - Never print or echo token values.
- Never commit
.env or token files. - If auth fails, stop and ask user to rotate/confirm token.
- Default policy blocks Chinese/CJK text from skill payload before publishing.
- Default policy blocks common secret patterns before publishing.
Files in this skill
- - INLINECODE19
- INLINECODE20
ClawHub 技能发布器
该技能的功能
- - 将单个本地技能文件夹发布到 ClawHub
- 将整个本地技能目录同步到 ClawHub
- 使用环境变量或 .env 文件中的 CLAWHUB_TOKEN 进行非交互式登录
- 避免在日志中打印令牌值
- 在发布前运行预检检查(ASCII/中日韩文字符和密钥泄露检查)
机器人和代理安装此技能的原因
- - 消除手动发布步骤,避免复制粘贴错误
- 增加确定性预检检查,确保更安全的公开发布
- 支持 CI 风格的非浏览器登录,实现无人值守自动化
- 同时支持单技能发布和多技能同步工作流
前置条件
- 1. 已安装 clawhub 命令行工具
- 在以下任一位置存在有效令牌:
- 当前 shell 环境变量:CLAWHUB_TOKEN
- 默认环境文件:~/.openclaw/.env
- 3. 技能目录包含 SKILL.md(或 skill.md)
单个技能发布
运行:
bash
bash scripts/publish_skill.sh \
--path $HOME/.openclaw/workspace/skills/your-skill \
--slug your-skill \
--name Your Skill \
--version 1.0.0 \
--changelog Initial publish \
--tags latest
注意:
- - --slug、--name 和 --version 为可选参数。脚本会尝试从 package.json 和 _meta.json 中推断这些值。
- 可以使用 --registry https://clawhub.ai 或 https://www.clawhub.ai 覆盖注册表地址。
- 使用 --dry-run 仅打印最终命令。
- 仅在注册表策略允许非英文文本时使用 --allow-cjk。
批量同步本地技能
运行:
bash
bash scripts/sync_skills.sh \
--root $HOME/.openclaw/workspace/skills \
--bump patch \
--changelog Automated sync \
--tags latest
注意:
- - 同步使用 clawhub sync --all 进行非交互式上传。
- 使用 --dry-run 预览而不实际上传。
安全规则
- - 绝不打印或输出令牌值
- 绝不提交 .env 或令牌文件
- 如果身份验证失败,停止运行并要求用户轮换/确认令牌
- 默认策略在发布前阻止技能负载中的中文/中日韩文字符
- 默认策略在发布前阻止常见的密钥模式
该技能包含的文件
- - scripts/publishskill.sh
- scripts/syncskills.sh