第 7 章

Skill — 能力扩展

📁 文件结构

workspace/skills/my-skill/
├── SKILL.md       # 功能说明、使用方法、输出格式
├── config.json    # 可配置参数
└── templates/     # 模板文件(可选)

⚙️ config.json 示例

{
  "name": "weather-check",
  "version": "1.0.0",
  "description": "查询城市天气",
  "config": {
    "apiKey": "YOUR_API_KEY",
    "apiUrl": "https://api.openweathermap.org/data/2.5/weather",
    "defaultCity": "Beijing"
  }
}

📦 安装与使用

# 安装本地 Skill
openclaw skill install ./workspace/skills/my-skill

调用时对 Agent 说:

"使用 weather-check Skill 查询上海天气"

💡 社区 Skill 可在 awesome-openclaw-skills 找到,直接通过 URL 安装。