世界上有一种商店,不卖衣服不卖鞋,只卖AI的技能包。凌晨3点22分,你突然发现你的Agent缺个"发Discord消息"的技能,于是你打开了ClawHub——就像饿了点外卖一样简单。
—— 妙趣AI · 技能商店哲学
ClawHub是OpenClaw的官方技能中心(Skill Hub),类似于VS Code的扩展市场、Chrome的插件商店。它提供:
openclaw skill install discordClawHub上的每个技能都是一个标准的OpenClaw Skill:
my-skill/ ├── SKILL.md # 技能描述(必需) ├── package.json # 元数据(名称、版本、依赖) ├── src/ │ └── index.js # 技能实现(可选) └── README.md # 使用文档(可选)
| 步骤 | 说明 |
|---|---|
| 1. 开发者发布 | 将技能推送到ClawHub仓库或注册到索引服务 |
| 2. 索引构建 | ClawHub扫描技能,提取description、标签、依赖 |
| 3. 用户搜索 | 根据关键词、分类查找技能 |
| 4. 一键安装 | 下载技能文件到本地skills/目录 |
| 5. Agent发现 | OpenClaw启动时自动扫描新技能 |
技能可以声明依赖(类似npm):
// package.json
{
"name": "discord-notifier",
"version": "1.0.0",
"description": "Send messages to Discord",
"dependencies": {
"webhook-helper": "^1.0.0",
"message-formatter": "^2.1.0"
},
"openclaw": {
"minVersion": "2026.1.0",
"requiredTools": ["curl", "node"]
}
}
妙趣AI需要Discord社区运营,从ClawHub安装技能:
# 1. 搜索技能 openclaw skill search discord # 输出: # discord-notifier v1.2.0 - Send messages to Discord channels # discord-bot v2.0.1 - Full Discord bot with slash commands # ... # 2. 安装技能 openclaw skill install discord-notifier # 3. Agent自动发现新技能 # 下次启动时,会扫描到discord-notifier技能 # 读取其SKILL.md,加入工具索引 # 4. 使用技能 # 用户:"发个消息到Discord" # Agent自动匹配discord-notifier技能并执行
妙趣AI的营销技能发布到ClawHub:
# 1. 创建技能目录 mkdir marketing-psychology cd marketing-psychology # 2. 编写SKILL.md cat > SKILL.md << 'EOF' --- name: marketing-psychology description: 应用70+心理模型优化营销文案。当用户需要优化广告、文案、推送内容时使用。 --- # Marketing Psychology Skill ## 使用方式 当用户说"优化这段文案"时,调用本技能... EOF # 3. 发布到ClawHub openclaw skill publish marketing-psychology # 4. 其他用户就能安装了 # openclaw skill install marketing-psychology
# 查看已安装技能 openclaw skill list # 更新技能 openclaw skill update discord-notifier # 回滚到旧版本 openclaw skill install discord-notifier@1.0.0 # 卸载技能 openclaw skill uninstall discord-notifier
// ClawHub Skill Installer
class ClawHub {
constructor() {
this.registry = 'https://clawhub.openclaw.ai';
this.skillsDir = '~/.openclaw/skills/';
}
async search(query) {
const response = await fetch(
`${this.registry}/api/skills?q=${encodeURIComponent(query)}`
);
return response.json();
}
async install(skillName, version = 'latest') {
// 1. 从ClawHub下载技能
const skill = await this.download(skillName, version);
// 2. 检查依赖
await this.checkDependencies(skill);
// 3. 安装到本地skills目录
const targetDir = path.join(this.skillsDir, skillName);
await this.extractSkill(skill, targetDir);
// 4. 更新本地技能索引
await this.updateIndex(skillName, skill);
return { success: true, path: targetDir };
}
async download(skillName, version) {
const url = `${this.registry}/skills/${skillName}/${version}.tar.gz`;
const response = await fetch(url);
return response.buffer();
}
}
// 从ClawHub API获取的技能信息
{
"name": "discord-notifier",
"version": "1.2.0",
"description": "Send messages to Discord channels via webhook",
"author": "openclaw-community",
"tags": ["discord", "notification", "chat"],
"stars": 128,
"downloads": 5430,
"lastUpdated": "2026-05-15T10:00:00Z",
"openclaw": {
"minVersion": "2026.1.0",
"requiredTools": ["curl"]
},
"repository": "https://github.com/openclaw/skills/discord-notifier",
"readme": "https://clawhub.openclaw.ai/skills/discord-notifier/readme"
}
// ~/.openclaw/skills/.index.json
{
"installed": {
"discord-notifier": {
"version": "1.2.0",
"installedAt": "2026-05-20T08:00:00Z",
"source": "clawhub",
"path": "~/.openclaw/skills/discord-notifier"
},
"marketing-psychology": {
"version": "2.0.1",
"installedAt": "2026-05-22T14:30:00Z",
"source": "local",
"path": "~/.openclaw/skills/marketing-psychology"
}
},
"lastUpdated": "2026-05-29T04:00:00Z"
}
✅ DO(推荐做法)
⚠️ DON'T(常见坑)
| 平台 | 类型 | 优点 | OpenClaw/ClawHub |
|---|---|---|---|
| VS Code Marketplace | 编辑器扩展 | 生态成熟、审核严格 | 轻量、文件即配置 |
| npm | JS包 | 依赖管理强 | 专门为AI Agent设计 |
| LangChain Hub | Prompt/Chain | 社区活跃 | 技能更完整、可执行 |
| ClawHub | Agent Skills | 热加载、零代码 | ✅ 我们的选择 |
就像《食神》里的"少林寺十八铜人"——每个人都有自己的绝活,组合在一起就是无敌战队。ClawHub就是Agent的"技能超市",缺什么买什么,不用自己从头造轮子。记住:站在巨人的肩膀上,你的Agent也能成为超级英雄!