Skill 开发
什么是 Skill?
Section titled “什么是 Skill?”Skill 是一个自包含的能力包,由 SKILL.md 文件定义。它告诉 Agent 如何完成某个特定任务。
my-skill/├── SKILL.md ← Skill 定义(必需)├── scripts/ ← 辅助脚本(可选)│ └── run.sh└── references/ ← 参考文档(可选) └── api-docs.mdSKILL.md 格式
Section titled “SKILL.md 格式”---name: weather-checkerdescription: 查询任意地点的天气预报triggers: - weather - 天气 - 温度---
# Weather Checker
## 何时使用当用户询问天气、温度或天气预报时使用此 Skill。
## 工作流程1. 从用户消息中解析地点2. 调用 wttr.in API: `curl -s "wttr.in/{location}?format=3"`3. 格式化输出结果
## 示例- "北京天气怎么样?" → curl wttr.in/Beijing- "明天会下雨吗?" → curl wttr.in/{location}?format=v2安装 Skill
Section titled “安装 Skill”# 从 AGI-Super-Team(447+ Skills)npx skills add aAAaqwq/AGI-Super-Team@weather-checker -g -y
# 从任意 GitHub 仓库npx skills add owner/repo@skill-name -g -y
# 从本地目录openclaw plugins install ./my-skill发布 Skill
Section titled “发布 Skill”- Fork AGI-Super-Team
- 创建
skills/your-skill/SKILL.md - 提交 PR
也可以发布到 ClawdHub 获得更广泛的分发。
| 实践 | 原因 |
|---|---|
| 清晰的触发词 | Agent 知道何时激活 |
| 分步骤指令 | Agent 可靠执行 |
| 错误处理 | 优雅的失败信息 |
| 提供示例 | Agent 从模式中学习 |
| 保持聚焦 | 一个 Skill 只做一件事 |