rewrite all docs in English

This commit is contained in:
lyn
2026-04-17 13:44:20 +00:00
parent fb72550eea
commit 97a7d89deb
4 changed files with 109 additions and 108 deletions

View File

@@ -1,55 +1,56 @@
# create-skills
当工作过程中发现某些模式或流程可以显著提高效率,但目前没有 skill 覆盖时使用。
Used when you notice patterns or workflows that could improve efficiency but have no skill covering them.
## 原则
## Principle
不是所有重复操作都需要变成 skill。先问这个模式是否通用到值得抽象
Not every repetitive task needs to become a skill. Ask first: is this pattern general enough to warrant abstraction?
## 流程
## Process
### 1. 识别模式
### 1. Identify the Pattern
- 记录重复出现的操作序列
- 分析:每次都在做类似的什么事情?
- 评估:这个操作是否有通用性,还是只是当前任务的特例
- Record the repeating sequence of operations
- Analyze: what are you doing repeatedly across tasks?
- Evaluate: is this operation general-purpose or a one-off特例?
### 2. 评估是否值得做成 skill
### 2. Assess Whether It's Worth Making a Skill
- **值得做的特征**
- 同一个操作在不同 agent/workspace 中重复出现
- 操作步骤固定,结果可预期
- 涉及外部系统调用(gitkeycloak、文件操作等)
- **不值得做的特征**
- 一次性任务
- 步骤不固定,依赖上下文判断
- 纯对话/分析类工作
**Worth doing when:**
- The same operation recurs across different agents/workspaces
- The steps are fixed, results are predictable
- Involves external system calls (git, keycloak, file ops, etc.)
### 3. 设计 skill
**Not worth doing when:**
- One-off task
- Steps vary depending on context
- Purely conversational/analytical work
- **名称**`{action}-{target}`(如 `git-clone-repo``keycloak-create-user`
- **SKILL.md 内容**
- 描述:这个 skill 做什么
- 使用场景:什么时候用
- 脚本列表:所有相关脚本及其调用方式
- **脚本**
- 放在 `scripts/`
- 每个脚本单一职责
- 提供 `--help``-h` 支持
### 3. Design the Skill
### 4. 实现
- **Name:** `{action}-{target}` (e.g., `git-clone-repo`, `keycloak-create-user`)
- **SKILL.md contents:**
- Description: what this skill does
- Use cases: when to use it
- Scripts: all related scripts and how to call them
- **Scripts:**
- Place under `scripts/`
- Each script has a single responsibility
- Provide `--help` or `-h` support
- 编写脚本,测试通过
- 编写 SKILL.md
- 本地验证
### 4. Implement
### 5. 提交
- Write the scripts, verify they work
- Write the SKILL.md
- Test locally
- 按 promote-improvements 流程提交到自己的分支
- commit message 包含skill 名称、功能描述、使用示例
- 通知 hang说明新增 skill 的用途
### 5. Submit
### 6. 上线
- Follow promote-improvements to push to your branch
- Commit message includes: skill name, what it does, usage example
- Notify hang with the new skill's purpose
- hang merge 后skill 进入 ClawSkills 正式列表
- 其他 agent 通过 learn.sh 自动获取
### 6. Ship
- hang merges it; skill enters the official ClawSkills list
- Other agents pull it automatically via learn.sh