Skills Improvement
Overview
Systematically optimize skill quality through a diagnostic-report-select-execute-verify workflow. Ensure skills comply with Claude's official best practices for maximum effectiveness.
Core principle: If you didn't diagnose a skill, you don't know what to fix.
Workflow
CODEBLOCK0
Phase 1: Diagnose
Scan skill for quality issues across 4 categories.
Categories:
- - Metadata (HIGH): name, description, keywords
- Architecture (MEDIUM): file structure, progressive disclosure
- Text (MEDIUM): conciseness, clarity, token efficiency
- Code (HIGH): error handling, dependencies, validation
Process:
- 1. Read SKILL.md and all referenced files
- Apply diagnostic checklist (see references/diagnostic-checklist.md)
- Record each issue with category, location, severity
Output: Raw issue list
Detailed checklist: See diagnostic-checklist.md
Phase 2: Report
Present findings in structured format.
Report structure:
CODEBLOCK1
For each issue include:
- - Category and check ID
- Current state vs expected state
- Impact explanation
- Specific fix recommendation
- Reference to quality standard
Report templates: See report-templates.md
Phase 3: Select
User chooses which issues to fix.
Selection interface:
CODEBLOCK2
Interaction:
- 1. User reviews issues
- User checks boxes or uses quick actions
- System confirms selection
- Proceed to execution
Phase 4: Execute
Apply selected fixes to skill files.
Execution rules:
- 1. Backup: Create
.backup before changes - Order: Fix HIGH → MEDIUM → LOW
- Show: Display diff for each modification
- Update: Propagate changes to related files
- Log: Record all changes
Fix application:
CODEBLOCK3
Output: Modified skill files + change log
Quality standards: See quality-standards.md
Phase 5: Verify
Test optimization effectiveness with subagents.
Test types:
- 1. Trigger test: Skill discovered correctly
- Understanding test: Workflow interpreted correctly
- Execution test: Can perform real task
- Regression test: Existing function still works
Process:
- 1. Define test scenarios
- Dispatch subagents (parallel)
- Analyze results
- Generate verification report
If verification fails:
- - Document failure
- Return to Phase 3 or 4
- Apply fixes
- Re-run verification
- Iterate until pass
Verification guide: See verification-guide.md
Quick Reference
| Phase | Action | Output |
|---|
| 1. Diagnose | Scan skill | Issue list |
| 2. Report |
Format findings | Diagnostic report |
| 3. Select | User chooses | Selected issues |
| 4. Execute | Apply fixes | Modified files |
| 5. Verify | Test changes | Verification report |
Problem Severity
| Level | Definition | Action |
|---|
| HIGH | Prevents discovery/execution | Must fix |
| MEDIUM |
Impacts quality/usability | Should fix |
|
LOW | Minor improvement | Nice to fix |
Quality Grading
- - A (Excellent): All HIGH pass, < 2 MEDIUM fail
- B (Good): All HIGH pass, < 5 MEDIUM fail
- C (Acceptable): All HIGH pass
- D (Needs Work): Any HIGH fail
- F (Broken): Multiple HIGH fail
Common Issues
Metadata problems:
- - Name format wrong → Use lowercase-hyphen
- Description missing "Use when" → Add trigger conditions
- No keywords → Add specific trigger terms
Architecture problems:
- - SKILL.md too long → Split to references/
- Deep nesting → Flatten to 1 level
- No progressive disclosure → Add "See [file.md]" links
Text problems:
- - Verbose explanations → Remove, assume Claude knows basics
- Time-sensitive info → Move to "Old Patterns" section
- Terminology inconsistent → Standardize terms
Code problems:
- - No error handling → Add try/except with helpful messages
- Magic numbers → Add justification comments
- Undeclared dependencies → List in SKILL.md
Anti-Patterns
❌ Auto-fix all issues without user selection
❌ Skip verification phase
❌ Ignore context (domain-specific needs)
❌ Break existing functionality
❌ Over-engineer simple skills
Integration
Dependencies:
- -
superpowers:writing-skills - Skill authoring patterns - INLINECODE2 - Verification methodology
Coordinates with:
- -
skill-creator - Use quality standards when creating skills - INLINECODE4 - Verify before deploying
技能改进
概述
通过诊断-报告-选择-执行-验证的工作流程,系统性地优化技能质量。确保技能符合Claude官方最佳实践,以实现最大效能。
核心原则: 如果你没有诊断技能,你就不知道要修复什么。
工作流程
dot
digraph workflow {
1. 诊断 [shape=box];
2. 报告 [shape=box];
3. 选择 [shape=box];
4. 执行 [shape=box];
5. 验证 [shape=box];
1. 诊断 -> 2. 报告;
2. 报告 -> 3. 选择;
3. 选择 -> 4. 执行;
4. 执行 -> 5. 验证;
5. 验证 -> 3. 选择 [label=失败];
}
阶段1:诊断
扫描技能,检查4个类别的质量问题。
类别:
- - 元数据(高):名称、描述、关键词
- 架构(中):文件结构、渐进式披露
- 文本(中):简洁性、清晰度、Token效率
- 代码(高):错误处理、依赖项、验证
流程:
- 1. 读取SKILL.md及所有引用的文件
- 应用诊断检查清单(参见references/diagnostic-checklist.md)
- 记录每个问题,包括类别、位置、严重程度
输出: 原始问题列表
详细检查清单: 参见 diagnostic-checklist.md
阶段2:报告
以结构化格式呈现发现结果。
报告结构:
markdown
技能诊断报告:[名称]
等级: [A/B/C/D]
问题: 共X个(高优先级Y个,中优先级Z个,低优先级W个)
高优先级(Y个)
[阻止发现或执行的问题]
中优先级(Z个)
[影响质量或可用性的问题]
低优先级(W个)
[次要改进项]
每个问题需包含:
- - 类别和检查ID
- 当前状态与预期状态的对比
- 影响说明
- 具体修复建议
- 质量标准参考
报告模板: 参见 report-templates.md
阶段3:选择
用户选择要修复的问题。
选择界面:
markdown
选择要修复的问题
高优先级 ⚠️
- - [ ] 1. [问题] - 影响:[简要说明]
- [ ] 2. [问题] - 影响:[简要说明]
中优先级 ⚙️
- - [ ] 3. [问题] - 影响:[简要说明]
低优先级 💡
- - [ ] 4. [问题] - 影响:[简要说明]
快捷操作:
- - 修复所有高优先级 - 自动选择高优先级问题
- 修复已选 - 处理已勾选项
- 详情[N] - 查看详细分析
交互流程:
- 1. 用户查看问题
- 用户勾选复选框或使用快捷操作
- 系统确认选择
- 进入执行阶段
阶段4:执行
对技能文件应用选定的修复。
执行规则:
- 1. 备份: 修改前创建.backup备份
- 顺序: 按高优先级 → 中优先级 → 低优先级修复
- 展示: 显示每次修改的差异对比
- 更新: 将更改传播到相关文件
- 日志: 记录所有更改
修复应用:
对于每个选定的问题:
1. 定位精确位置
2. 生成修复内容
3. 预览更改(差异对比)
4. 应用编辑
5. 记录更改
6. 如有需要,更新相关内容
输出: 修改后的技能文件 + 更改日志
质量标准: 参见 quality-standards.md
阶段5:验证
通过子代理测试优化效果。
测试类型:
- 1. 触发测试: 技能能被正确发现
- 理解测试: 工作流程能被正确解读
- 执行测试: 能执行实际任务
- 回归测试: 现有功能仍正常工作
流程:
- 1. 定义测试场景
- 分派子代理(并行)
- 分析结果
- 生成验证报告
如果验证失败:
- - 记录失败原因
- 返回阶段3或阶段4
- 应用修复
- 重新运行验证
- 迭代直至通过
验证指南: 参见 verification-guide.md
快速参考
格式化发现结果 | 诊断报告 |
| 3. 选择 | 用户选择 | 选定的问题 |
| 4. 执行 | 应用修复 | 修改后的文件 |
| 5. 验证 | 测试更改 | 验证报告 |
问题严重程度
影响质量/可用性 | 应该修复 |
|
低 | 次要改进 | 可修复可不修复 |
质量等级
- - A(优秀): 所有高优先级通过,中优先级失败少于2个
- B(良好): 所有高优先级通过,中优先级失败少于5个
- C(可接受): 所有高优先级通过
- D(需要改进): 有任何高优先级失败
- F(损坏): 多个高优先级失败
常见问题
元数据问题:
- - 名称格式错误 → 使用小写加连字符
- 描述缺少何时使用 → 添加触发条件
- 无关键词 → 添加特定触发词
架构问题:
- - SKILL.md过长 → 拆分到references/
- 嵌套过深 → 扁平化为1层
- 无渐进式披露 → 添加参见[file.md]链接
文本问题:
- - 解释冗长 → 删除,假设Claude了解基础知识
- 有时效性的信息 → 移至旧模式部分
- 术语不一致 → 标准化术语
代码问题:
- - 无错误处理 → 添加带有有用信息的try/except
- 魔法数字 → 添加理由注释
- 未声明的依赖项 → 在SKILL.md中列出
反模式
❌ 未经用户选择自动修复所有问题
❌ 跳过验证阶段
❌ 忽略上下文(领域特定需求)
❌ 破坏现有功能
❌ 对简单技能过度设计
集成
依赖项:
- - superpowers:writing-skills - 技能编写模式
- superpowers:test-driven-development - 验证方法论
协作对象:
- - skill-creator - 创建技能时使用质量标准
- superpowers:verification-before-completion - 部署前进行验证