Files
ClawSkills/claw-skills/workflows/create-skills.md

56 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# create-skills
当工作过程中发现某些模式或流程可以显著提高效率,但目前没有 skill 覆盖时使用。
## 原则
不是所有重复操作都需要变成 skill。先问这个模式是否通用到值得抽象
## 流程
### 1. 识别模式
- 记录重复出现的操作序列
- 分析:每次都在做类似的什么事情?
- 评估:这个操作是否有通用性,还是只是当前任务的特例?
### 2. 评估是否值得做成 skill
- **值得做的特征**
- 同一个操作在不同 agent/workspace 中重复出现
- 操作步骤固定,结果可预期
- 涉及外部系统调用git、keycloak、文件操作等
- **不值得做的特征**
- 一次性任务
- 步骤不固定,依赖上下文判断
- 纯对话/分析类工作
### 3. 设计 skill
- **名称**`{action}-{target}`(如 `git-clone-repo``keycloak-create-user`
- **SKILL.md 内容**
- 描述:这个 skill 做什么
- 使用场景:什么时候用
- 脚本列表:所有相关脚本及其调用方式
- **脚本**
- 放在 `scripts/`
- 每个脚本单一职责
- 提供 `--help``-h` 支持
### 4. 实现
- 编写脚本,测试通过
- 编写 SKILL.md
- 本地验证
### 5. 提交
- 按 promote-improvements 流程提交到自己的分支
- commit message 包含skill 名称、功能描述、使用示例
- 通知 hang说明新增 skill 的用途
### 6. 上线
- hang merge 后skill 进入 ClawSkills 正式列表
- 其他 agent 通过 learn.sh 自动获取