技能提高
- 作者仓库星标 19,707
- 作者仓库 Claude-Code-Game-Studios
- 领域
- 工程开发
- 作者声明的智能体
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 运行环境证据
- 未执行;当前没有隔离运行测试证据
- 作者 / 版本 / 许可证
- @Donchitos · 未声明许可证
- 上下文用量评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部接口密钥
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 运行环境要求
- 未检出明确要求
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 命令执行
- 网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
需要注意: 未声明工具权限范围;实际权限由运行环境决定。
第 5 阶段:写入和重新测试
记录技能文件的当前内容(以便在需要时恢复)。将提升后的技能写入`.claude/skills/[name]/SKILL.md`。重新运行`/skill-test static [name]`并记录新的静态分数。如果分配了类别,还需重新运行`/skill-test category [name]`并记录新的类别分数。显示比较:
第六阶段:判决
计算组合故障总数:静态 FAIL + 类别 FAIL + 静态 WARN + 类别 WARN。如果综合分数有所提高(综合失败计数低于基线):报告:“分数有所提高。保留更改。”显示每个维度中修复内容的摘要。如果综合得分相同或更差:
第 7 阶段:后续步骤
运行`/skill-test static all`查找下一个失败的技能。运行`/skill-improve [next-name]`继续循环另一个技能。运行`/skill-test audit`以查看总体覆盖进度。
# Skill Improve
Runs an improvement loop on a single skill:
test → fix → retest → keep or revert.
---
## Phase 1: Parse Argument
Read the skill name from the first argument. If missing, output usage and stop:
```
Usage: /skill-improve [skill-name]
Example: /skill-improve tech-debt
```
Verify `.claude/skills/[name]/SKILL.md` exists. If not, stop with:
"Skill '[name]' not found."
---
## Phase 2: Baseline Test
Run `/skill-test static [name]` and record the baseline score:
- Count of FAILs
- Count of WARNs
- Which specific checks failed (Check 1–7)
Display to the user:
```
Static baseline: [N] failures, [M] warnings
Failing: Check 4 (no ask-before-write), Check 5 (no handoff)
```
If baseline is 0 FAILs and 0 WARNs, note it and proceed to Phase 2b.
### Phase 2b: Category Baseline
Look up the skill's `category:` field in `CCGS Skill Testing Framework/catalog.yaml`.
If no `category:` field is found, display:
"Category: not yet assigned — skipping category checks."
and skip to Phase 3.
If category is found, run `/skill-test category [name]` and record the category baseline:
- Count of FAILs
- Count of WARNs
- Which specific category rubric metrics failed
Display to the user:
```
Category baseline: [N] failures, [M] warnings ([category] rubric)
```
If BOTH static and category baselines are 0 FAILs and 0 WARNs, stop:
"This skill already passes all static and category checks. No improvements needed."
---
## Phase 3: Diagnose
Read the full skill file at `.claude/skills/[name]/SKILL.md`.
For each failing or warning **static** check, identify the exact gap:
- **Check 1 fail** → which frontmatter field is missing
- **Check 2 fail** → how many phases found vs. minimum required
- **Check 3 fail** → no verdict keywords anywhere in the skill body
- **Check 4 fail** → Write or Edit in allowed-tools but no ask-before-write language
- **Check 5 warn** → no follow-up or next-step section at the end
- **Check 6 warn** → `context: fork` set but fewer than 5 phases found
- **Check 7 warn** → argument-hint is empty or doesn't match documented modes
For each failing or warning **category** check (if category was assigned in Phase 2b),
identify the exact gap in the skill's text. For example:
- If G2 fails (gate mode, full directors not spawned): skill body never references all 4
PHASE-GATE director prompts
- If A2 fails (authoring, no per-section May-I-write): skill asks once at the end, not
before each section write
- If T3 fails (team, BLOCKED not surfaced): skill doesn't halt dependent work on blocked agent
Show the full combined diagnosis to the user before proposing any changes.
---
## Phase 4: Propose Fix
Write a targeted fix for each failure and warning. Show the proposed changes
as clearly marked before/after blocks. Only change what is failing — do not
rewrite sections that are passing.
Ask: "May I write this improved version to `.claude/skills/[name]/SKILL.md`?"
If the user says no, stop here.
---
## Phase 5: Write and Retest
Record the current content of the skill file (for revert if needed).
Write the improved skill to `.claude/skills/[name]/SKILL.md`.
Re-run `/skill-test static [name]` and record the new static score.
If a category was assigned, also re-run `/skill-test category [name]` and record the new category score.
Display the comparison:
```
Static: Before [N] failures, [M] warnings → After [N'] failures, [M'] warnings
Category: Before [N] failures, [M] warnings → After [N'] failures, [M'] warnings (if applicable)
Combined change: improved / no change / worse
```
---
## Phase 6: Verdict
Count the combined failure total: static FAILs + category FAILs + static WARNs + category WARNs.
**If combined score improved (combined failure count is lower than baseline):**
Report: "Score improved. Changes kept."
Show a summary of what was fixed in each dimension.
**If combined score is the same or worse:**
Report: "Combined score did not improve."
Show what changed and why it may not have helped.
Ask: "May I revert `.claude/skills/[name]/SKILL.md` using git checkout?"
If yes: run `git checkout -- .claude/skills/[name]/SKILL.md`
---
## Phase 7: Next Steps
- Run `/skill-test static all` to find the next skill with failures.
- Run `/skill-improve [next-name]` to continue the loop on another skill.
- Run `/skill-test audit` to see overall coverage progress.
章节与文件索引
按说明文件中的顺序排列。
第一阶段:解析参数
第 2 阶段:基线测试
第 2b 阶段:类别基线
第三阶段:诊断
第 4 阶段:提出修复建议
文件/命令 -> .claude/skills/[name]/SKILL.md · /skill-test static [name] · category: · CCGS Skill Testing Framework/catalog.yaml · /skill-test category [name] · context: fork · git checkout -- .claude/skills/[name]/SKILL.md · /skill-test static all
内容校验值 -> 59acf2a29994
当前原文的自动摘译,尚未人工审校。
第一阶段:解析参数
从第一个参数中读取技能名称。如果丢失,输出使用情况并停止:验证
.claude/skills/[name]/SKILL.md存在。如果没有,请停止:“未找到技能‘[名称]’。”第 2 阶段:基线测试
运行
/skill-test static [name]并记录基线分数: 失败计数 警告计数 哪些特定检查失败(检查 1-7) 向用户显示:第 2b 阶段:类别基线
在
CCGS Skill Testing Framework/catalog.yaml中查找技能的category:字段。如果未找到category:字段,则显示:“类别:尚未分配 — 跳过类别检查。”并跳到第 3 阶段。如果找到类别,则运行/skill-test category [name]并记录类别基线:第三阶段:诊断
完整的技能文件请阅读
.claude/skills/[name]/SKILL.md。对于每个失败或警告静态检查,确定确切的差距: 检查 1 失败 → 缺少哪个 frontmatter 字段 检查 2 失败 → 找到了多少个阶段与所需的最少阶段 检查 3 失败 → 技能正文中的任何地方都没有判定关键字第 4 阶段:提出修复建议
为每个失败和警告编写有针对性的修复程序。将建议的更改显示为清晰标记的前/后块。只改变失败的部分——不要重写通过的部分。问:“我可以把这个改进版本写到
.claude/skills/[name]/SKILL.md吗?”如果用户说不,就到此为止。