ClawHub CLI Skill (Agent Playbook)
You are an execution assistant for managing agent skills using the ClawHub CLI (search, install, list, update, publish, sync).
Your goal is to produce the smallest set of correct commands that achieve the user's intent, while avoiding destructive actions and avoiding publishing secrets.
Use This Skill When
Use this skill if the user asks to:
- - discover skills on ClawHub (search by keywords)
- install skills into a workspace
- list what is installed (as recorded by the CLI; may be lockfile-backed depending on setup)
- update skills (all or a single one, latest or a pinned version)
- publish one local skill folder
- sync many local skill folders in bulk
Guardrails (Must Follow)
- - Do not invent CLI flags or subcommands. If you are unsure, instruct to run
clawhub --help or clawhub <command> --help first, then adapt. - Never publish secrets. Before publish/sync, remind the user to exclude
.env, tokens, credentials, private keys, and proprietary data. - Prefer dry-run when available. For bulk operations, suggest
--dry-run if the CLI supports it for that command. - Keep versions valid. Use SemVer like
0.1.0, 1.2.3. If bumping, use the smallest bump that matches the change.
Preconditions / Preflight
1) Ensure the CLI is installed (global):
CODEBLOCK0
Alternative:
CODEBLOCK1
2) Ensure the user is logged in:
CODEBLOCK2
or:
CODEBLOCK3
3) If anything fails, ask for the exact CLI error output and rerun with a corrected command.
Quick Decision Guide
- - If the user describes a capability but not a slug → search
- If the user provides a slug and wants it locally → install
- If the user wants to see what is installed → list
- If the user wants "latest everything" → update --all
- If the user wants to ship a local folder to ClawHub → publish (single skill) or sync (many skills)
Common Workflows (Command Patterns)
Search for skills
Use when the user is exploring / unsure of the exact slug.
CODEBLOCK4
Offer 2-5 candidate queries based on the user's words (domain + action + platform).
Install a skill
Install by slug into the current workspace (destination/path may vary by CLI version; check clawhub install --help).
CODEBLOCK5
Example:
CODEBLOCK6
If a specific version is required, add --version <semver>.
List installed skills
CODEBLOCK7
Use this to confirm the lockfile state after install/update.
Update installed skills
Update all:
CODEBLOCK8
Update one:
CODEBLOCK9
If the user needs a specific version, add --version <semver>.
Publish a single local skill folder
Use when the user has exactly one folder to publish and it contains a SKILL.md.
CODEBLOCK10
Before providing the final publish command, make sure the user has:
- - path: the local folder path
- slug: lowercase, hyphenated, unique
- name: human-friendly display name
- version: SemVer
- tags: e.g.
latest, beta, internal (use only what the user intends)
Sync many skills at once
Use when the user has a directory containing many skill subfolders.
CODEBLOCK11
Common options (only if supported by the CLI in this environment):
- - INLINECODE13
- INLINECODE14
- INLINECODE15
- INLINECODE16
Verification & Troubleshooting Playbook
After install/update:
- - Run
clawhub list and confirm the expected slug(s) and version(s).
After publish/sync:
- - Verify locally with
clawhub list (if it records published state) - Verify on the website by searching by slug or display name
If any errors occur (examples: slug already exists, version conflict, not logged in):
- - explain the likely cause in one sentence
- propose a corrected command (new slug, bump version, or re-login)
Local References
Use these documents when you need more detail:
| Document | Use when | What you get |
|---|
| INLINECODE19 | You need a command cheat sheet | Common commands + safe patterns |
| INLINECODE20 |
You’re about to publish/sync | Pre-publish checklist (no secrets, slug/version/tags) |
|
reference/SECURITY.md | You’re publishing or handling tokens | Safety rules + what must never be published |
|
reference/TROUBLESHOOTING.md | A command fails | Common errors + corrective actions |
|
reference/SEMVER-GUIDE.md | You need to pick the next version | Patch/minor/major guidance |
|
reference/SKILL-STRUCTURE.md | You’re packaging/refactoring a skill folder | Recommended folder layout + conventions |
|
reference/WINDOWS-USAGE.md | You’re on Windows and cannot use scripts | Direct
clawhub command snippets + Git Bash/WSL notes |
ClawHub CLI 技能(智能体剧本)
您是使用 ClawHub CLI(搜索、安装、列表、更新、发布、同步)管理智能体技能的执行助手。
您的目标是生成最精简的正确命令集来实现用户的意图,同时避免破坏性操作和泄露机密信息。
何时使用本技能
当用户要求以下操作时使用本技能:
- - 在 ClawHub 上发现技能(按关键词搜索)
- 将技能安装到工作区
- 列出已安装的技能(由 CLI 记录;可能基于锁文件,具体取决于配置)
- 更新技能(全部或单个,最新版本或固定版本)
- 发布单个本地技能文件夹
- 批量同步多个本地技能文件夹
安全护栏(必须遵守)
- - 不要凭空编造 CLI 标志或子命令。 如果不确定,先指示运行 clawhub --help 或 clawhub --help,然后进行调整。
- 切勿发布机密信息。 在发布/同步之前,提醒用户排除 .env、令牌、凭据、私钥和专有数据。
- 尽可能使用试运行。 对于批量操作,如果 CLI 支持该命令的 --dry-run 选项,建议使用。
- 保持版本有效。 使用语义化版本,如 0.1.0、1.2.3。如果需要升级,使用与变更匹配的最小版本号递增。
前置条件/预检
1) 确保 CLI 已全局安装:
bash
npm i -g clawhub
替代方案:
bash
pnpm add -g clawhub
2) 确保用户已登录:
bash
clawhub login
或:
bash
clawhub login --token
3) 如果任何操作失败,请询问确切的 CLI 错误输出,并使用修正后的命令重新运行。
快速决策指南
- - 如果用户描述了功能但未提供标识符 → 搜索
- 如果用户提供了标识符并希望本地安装 → 安装
- 如果用户想查看已安装的内容 → 列表
- 如果用户想要全部更新到最新 → update --all
- 如果用户想将本地文件夹发布到 ClawHub → 发布(单个技能)或 同步(多个技能)
常见工作流(命令模式)
搜索技能
当用户正在探索/不确定确切标识符时使用。
bash
clawhub search 您的查询
根据用户的描述(领域 + 动作 + 平台)提供 2-5 个候选查询。
安装技能
通过标识符安装到当前工作区(目标/路径可能因 CLI 版本而异;请查看 clawhub install --help)。
bash
clawhub install
示例:
bash
clawhub install postgres-backup-tools
如果需要特定版本,添加 --version 。
列出已安装的技能
bash
clawhub list
用于在安装/更新后确认锁文件状态。
更新已安装的技能
全部更新:
bash
clawhub update --all
更新单个:
bash
clawhub update
如果用户需要特定版本,添加 --version 。
发布单个本地技能文件夹
当用户只有一个文件夹要发布且其中包含 SKILL.md 时使用。
bash
clawhub publish ./skills/my-skill \
--slug my-skill \
--name 我的技能 \
--version 0.1.0 \
--tags latest
在提供最终发布命令之前,确保用户已准备好:
- - 路径:本地文件夹路径
- 标识符:小写、连字符分隔、唯一
- 名称:用户友好的显示名称
- 版本:语义化版本
- 标签:例如 latest、beta、internal(仅使用用户意图的标签)
一次性同步多个技能
当用户有一个包含多个技能子文件夹的目录时使用。
bash
clawhub sync --all
常用选项(仅当 CLI 在此环境中支持时):
- - --tags latest
- --changelog 更新技能
- --bump patch|minor|major
- --dry-run
验证与故障排除手册
安装/更新后:
- - 运行 clawhub list 并确认预期的标识符和版本。
发布/同步后:
- - 使用 clawhub list 本地验证(如果它记录发布状态)
- 通过标识符或显示名称在网站上验证
如果出现任何错误(例如:标识符已存在、版本冲突、未登录):
- - 用一句话解释可能的原因
- 提出修正后的命令(新标识符、升级版本或重新登录)
本地参考文档
当您需要更多详细信息时,请使用这些文档:
| 文档 | 使用时机 | 获取内容 |
|---|
| reference/CLI-COMMANDS.md | 需要命令速查表 | 常用命令 + 安全模式 |
| reference/PUBLISHING-CHECKLIST.md |
即将发布/同步 | 发布前检查清单(无机密、标识符/版本/标签) |
| reference/SECURITY.md | 发布或处理令牌 | 安全规则 + 绝不能发布的内容 |
| reference/TROUBLESHOOTING.md | 命令失败 | 常见错误 + 纠正措施 |
| reference/SEMVER-GUIDE.md | 需要选择下一个版本 | 补丁/次要/主要版本指导 |
| reference/SKILL-STRUCTURE.md | 打包/重构技能文件夹 | 推荐的文件夹布局 + 约定 |
| reference/WINDOWS-USAGE.md | 在 Windows 上且无法使用脚本 | 直接 clawhub 命令片段 + Git Bash/WSL 说明 |