
好的!让我重新整理一下编写 Skill 的完整步骤:
Skill 由两个核心文件组成:
在 ~/.openclaw/workspace/skills/ 目录下创建你的技能文件夹:
mkdir -p ~/.openclaw/workspace/skills/your-skill-name
创建包含以下结构的 SKILL.md:
---
name: your-skill-name
description: "简短描述技能功能和使用场景"
homepage: https://your-docs-url.com
metadata: {
"openclaw": {
"emoji": "🎨",
"requires": {
"bins": ["required-command1", "required-command2"]
}
}
}
---
# 技能名称
详细描述技能功能。
## When to Use
✅ **USE this skill when:**
- 具体使用场景1
- 具体使用场景2
❌ **DON'T use this skill when:**
- 不适用的场景1
- 不适用的场景2
## Commands
### 基本用法
```bash
./your-script.sh 参数1 参数2
./your-script.sh --option value 参数
创建实际的功能脚本(如 backup.sh):
set -euo pipefail 提高脚本健壮性chmod +x)这就是创建自定义 Skill 的完整流程!从简单开始,逐步完善功能。