ClawHub 发布助手

v2.0.0

将本地技能发布到 ClawHub 技能市场。自动检查技能目录结构、生成版本号、 构建 changelog,执行发布命令并验证结果。 **触发场景**:用户说"发布技能"、"发布到 ClawHub"、"上传技能"等。

0· 73·0 current·0 all-time
byfslong@fslong520·duplicate of @fslong520/chpublish (2.0.0)·canonical: @fslong520/clawhubfabu
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
medium confidence
Purpose & Capability
The skill's name/description (publish local skill to ClawHub) matches the instructions: it runs clawhub CLI commands, checks local SKILL.md, builds changelog/version, and publishes. Requiring local filesystem access and the clawhub CLI is appropriate for this purpose.
Instruction Scope
Instructions explicitly tell the agent to run shell commands (clawhub whoami/login/publish) and to read/write the local skill file. This is expected, but the SKILL.md uses a hard-coded absolute path (/home/fslong/.copaw/workspaces/default/active_skills/<技能名>/SKILL.md). That will not be correct for many users and implies the agent will try to read a specific user workspace. The doc also promises '自动生成版本号' but gives no deterministic algorithm — most actions require user confirmation, so some claimed automation is underspecified.
Install Mechanism
Instruction-only skill with no install spec and no code files; nothing is downloaded or written by an installer. This is the lowest-risk install model.
Credentials
No environment variables or external credentials are requested in the manifest. The runtime instructions call the local clawhub CLI and its login flow (browser auth), which is proportional to publishing to ClawHub. There are no unrelated credential requests.
Persistence & Privilege
always is false and the skill is user-invocable. It does request Read/Write/ExecuteShellCommand in allowed-tools (in SKILL.md), which is necessary for its task but does grant the agent permission to run shell commands and edit local files — expected for a publish helper but worth noting.
Assessment
This skill is coherent for publishing a local skill via the clawhub CLI, but check a few things before installing/using it: 1) The SKILL.md references a hard-coded path (/home/fslong/.copaw/...), so confirm or update it to your workspace path — otherwise the agent may fail or read the wrong files. 2) The skill expects the clawhub CLI to be installed and will run shell commands and read/write SKILL.md; only allow this if you trust the CLI and the skill's author. 3) The slug naming rules here are unusually strict (no '-' or '_'); confirm those requirements with ClawHub if you rely on other slug formats. 4) The skill triggers browser-based login (clawhub login) which will store credentials locally via the CLI — be aware of where those tokens are stored. If any of these items are unexpected in your environment, do not enable the skill until you adjust the instructions or verify the path/CLI behavior.

Like a lobster shell, security has layers — review code before you run it.

clawhubvk971jrt5e5azst9aj76mc0622184s41hlatestvk971jrt5e5azst9aj76mc0622184s41hmanagementvk971jrt5e5azst9aj76mc0622184s41hpublishvk971jrt5e5azst9aj76mc0622184s41hskillvk971jrt5e5azst9aj76mc0622184s41htoolvk971jrt5e5azst9aj76mc0622184s41h
73downloads
0stars
1versions
Updated 5d ago
v2.0.0
MIT-0

ClawHub 技能发布

一键发布技能到 ClawHub 技能市场。


触发场景

当用户说:

  • "发布 XX 技能到 ClawHub"
  • "把 XX 发布上去"
  • "上传技能"
  • "技能发布"

立即调用本技能。


发布流程

Step 1: 检查登录状态

clawhub whoami

结果

  • ✅ 显示用户名 → 已登录,继续
  • ❌ 未登录 → 执行 clawhub login,等待用户浏览器登录

Step 2: 确认技能目录 & 检测发布历史

2.1 检查目录

检查技能文件夹是否存在:

/home/fslong/.copaw/workspaces/default/active_skills/<技能名>/SKILL.md

必须存在

  • SKILL.md - 技能描述文件

2.2 检测是否已发布(强制!)

在确定参数前,必须检查该技能是否已在 ClawHub 存在:

clawhub inspect <候选slug>

(若 slug 不确定,可先用 clawhub list 模糊查找)

结果判断

  • 已发布:输出现有版本详情。
    • 铁律:更新时必须与历史版本保持 --tags--name 完全一致!
    • 动作:从输出中提取原有 tags,作为本次发布的 --tags 参数。仅更新 --version--changelog
  • 未发布:报错 Skill not found 或无输出。
    • 动作:按新技能流程,自行拟定 slug、name、tags。

⚠️ 核心警告

  • 绝不要随意更改已发布技能的 tags! 这会导致 ClawHub 搜索索引混乱或技能关联丢失。
  • 更新发布的唯一变量应是:version(递增)和 changelog(本次改动)。

Step 3: 确定发布参数

3.1 生成 Slug 推荐(强制!)

在确定发布参数前,必须向用户展示 3 个不同维度的 Slug 推荐方案,等待用户选择。 推荐维度示例

  1. 全拼音方案(适合中文技能):mochi, poxiao
  2. 英文意译方案(适合通用技能):inkpot, dawnbreak
  3. 功能描述方案(混合或直白):stockanalysis, dailyreport

⚠️ 推荐铁律

  • 禁止符号:推荐的 Slug 中绝对不能包含 -_
  • 纯小写:所有字母必须小写。
  • 等待确认:列出方案后,询问用户:"哥哥,这几个 Slug 你喜欢哪个?或者你有更好的想法?" 得到回复后才能进行下一步。

3.2 确定其他参数

当用户选定 Slug 后,确认以下参数:

参数来源示例
--slug用户最终确认的方案poxiao
--name技能显示名InkPot
--version版本号(询问用户或自动推断)2.0.0
--changelog更新说明(询问用户)Switch to KV format
--tags标签(英文,逗号分隔)knowledge,learning

⚠️ Slug 命名铁律(最高优先级)

  • ❌ 禁止任何符号:绝对不允许使用连字符 -、下划线 _ 或任何符号!
  • ✅ 唯一格式:全小写字母 + 数字,紧密相连,干净纯粹。
  • --version 必须是语义化版本(x.y.z)

Step 4: 执行发布命令

clawhub publish <技能路径> \
  --slug <英文slug> \
  --name <显示名> \
  --version <版本号> \
  --changelog "<更新说明>" \
  --tags "<英文标签>"

示例

clawhub publish /home/fslong/.copaw/workspaces/default/active_skills/墨池 \
  --slug inkpot \
  --name "InkPot" \
  --version "2.0.0" \
  --changelog "Switch from JSON to simple KV text format" \
  --tags "knowledge,learning,chinese"

Step 5: 验证发布结果

成功输出

✔ OK. Published inkpot@2.0.0 (k97f1c87nkv5tzq1rzkd26b3a983shgy)

失败情况

  • Field name 中文 has invalid character → tags 或 name 包含中文,改用英文
  • Not logged in → 执行 clawhub login
  • Skill not found → 路径错误,检查技能目录

版本号规则

版本类型何时使用示例
Major (x.0.0)大改动、不兼容更新2.0.0 - 从 JSON 改为 KV 格式
Minor (0.y.0)新功能、向后兼容1.1.0 - 新增搜索功能
Patch (0.0.z)小修复、bug 修复1.0.1 - 修复解析错误

常见问题

Q: tags 包含中文导致失败?

错误

Field name 中文 has invalid character '中'

解决:tags 只能用英文,如 chinese 而不是 中文


Q: slug 格式错误?

铁律(无符号纯净模式)

  • ❌ 禁止任何符号:绝对不要使用连字符 -、下划线 _
  • ✅ 唯一允许:仅小写字母 (a-z) 和数字 (0-9)。

示例

  • inkpot, poxiao, lessonprep (紧密相连)
  • po-xiao (连字符), oi-style (连字符), 墨池 (中文)

Q: 如何更新已发布的技能?

流程

  1. 修改本地技能代码
  2. 更新 SKILL.md 中的版本说明
  3. 增加版本号(如 1.0.01.1.0
  4. 写 changelog 说明改动
  5. 重新执行 clawhub publish

快速参考

ClawHub CLI 常用命令

命令用途
clawhub whoami检查登录状态
clawhub login登录(浏览器认证)
clawhub logout登出
clawhub publish <path>发布技能
clawhub search <query>搜索技能
clawhub install <slug>安装技能
clawhub list列出已安装技能
clawhub inspect <slug>查看技能详情

发布清单

发布前检查:

  • 已登录 ClawHub (clawhub whoami)
  • SKILL.md 存在且格式正确
  • slug 纯净无符号(全小写,无 - _
  • name 可以用中文或英文
  • version 是语义化版本(x.y.z)
  • changelog 简明扼要说明改动
  • tags 只用英文,逗号分隔

作者: fslong

创建日期: 2026-03-29

来源: 墨池技能发布实践

Comments

Loading comments...