skill-improver

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Skill Improver

Skill 改进工具

Execute improvement plans generated by
skill-quality-reviewer
to automatically update and fix issues in Claude Skills.
执行由
skill-quality-reviewer
生成的改进计划,自动更新并修复Claude Skills中的问题。

Core Workflow

核心工作流程

Read improvement-plan-{name}.md
Parse improvement items (High/Medium/Low priority)
Group changes by file
Detect and resolve conflicts
Backup original files
Execute updates (Edit or Write tools)
Verify results
Generate update-report
Read improvement-plan-{name}.md
Parse improvement items (High/Medium/Low priority)
Group changes by file
Detect and resolve conflicts
Backup original files
Execute updates (Edit or Write tools)
Verify results
Generate update-report

When to Use

适用场景

Trigger phrases:
  • "Apply improvements from improvement-plan-git-workflow.md"
  • "Update my skill based on the quality report"
  • "Execute the improvement plan for api-helper"
  • "Fix the issues identified in quality review"
Use this skill when:
  • Applying improvements from an improvement plan
  • Updating a skill based on quality review feedback
  • Executing recommended fixes from
    skill-quality-reviewer
  • Implementing structured improvements to skill documentation
触发短语:
  • "Apply improvements from improvement-plan-git-workflow.md"
  • "根据质量报告更新我的技能"
  • "为api-helper执行改进计划"
  • "修复质量审查中发现的问题"
在以下场景使用本Skill:
  • 应用改进计划中的改进措施
  • 根据质量审查反馈更新技能
  • 执行
    skill-quality-reviewer
    推荐的修复方案
  • 对技能文档进行结构化改进

Step-by-Step Guide

分步指南

Step 1: Load the Improvement Plan

步骤1:加载改进计划

Read the
improvement-plan-{skill-name}.md
file generated by
skill-quality-reviewer
.
bash
undefined
读取由
skill-quality-reviewer
生成的
improvement-plan-{skill-name}.md
文件。
bash
undefined

Plan is typically in current directory

Plan is typically in current directory

ls improvement-plan-*.md
ls improvement-plan-*.md

Or specify full path

Or specify full path

read /path/to/improvement-plan-my-skill.md

**Validate the plan:**
- File exists and is readable
- Contains priority sections (High/Medium/Low)
- Has structured improvement items
- Includes file paths and suggested changes

See `references/plan-format.md` for detailed plan structure.
read /path/to/improvement-plan-my-skill.md

**验证计划:**
- 文件存在且可读取
- 包含优先级章节(高/中/低)
- 有结构化的改进项
- 包含文件路径和建议的更改

详细的计划结构请参考`references/plan-format.md`。

Step 2: Parse and Group Changes

步骤2:解析并分组更改

Extract all improvement suggestions and organize by target file.
Extract from each item:
  • File path (e.g.,
    SKILL.md:line:line
    or
    references/file.md
    )
  • Dimension (Description Quality, Content Organization, etc.)
  • Impact (+X points)
  • Current content
  • Suggested content
  • Reason for change
Build update queue:
by_file = {
  "SKILL.md": [change1, change2, ...],
  "references/guide.md": [change3, ...],
  "examples/demo.md": [change4, ...],
}
提取所有改进建议,并按目标文件进行整理。
从每个项中提取:
  • 文件路径(例如:
    SKILL.md:line:line
    references/file.md
  • 维度(描述质量、内容组织等)
  • 影响(+X分)
  • 当前内容
  • 建议内容
  • 更改原因
构建更新队列:
by_file = {
  "SKILL.md": [change1, change2, ...],
  "references/guide.md": [change3, ...],
  "examples/demo.md": [change4, ...],
}

Step 3: Detect and Resolve Conflicts

步骤3:检测并解决冲突

Check for conflicts when multiple changes affect the same content.
Resolution strategy:
  1. High priority takes precedence over medium/low
  2. If same priority, preserve first change
  3. Flag conflicts for manual review
  4. Document resolution in update report
See
references/merge-strategies.md
for detailed merge logic.
当多个更改影响同一内容时,检查冲突。
解决策略:
  1. 高优先级优先于中/低优先级
  2. 若优先级相同,保留第一个更改
  3. 标记冲突以便人工审查
  4. 在更新报告中记录解决过程
详细的合并逻辑请参考
references/merge-strategies.md

Step 4: Sort by Priority

步骤4:按优先级排序

Order changes by priority within each file.
Priority order:
  1. High Priority (execute first)
  2. Medium Priority (execute second)
  3. Low Priority (execute last)
在每个文件内按优先级对更改排序。
优先级顺序:
  1. 高优先级(优先执行)
  2. 中优先级(其次执行)
  3. 低优先级(最后执行)

Step 5: Backup and Execute

步骤5:备份并执行

Backup location:
~/.claude/skills/backup/{skill-name}-{timestamp}/
bash
undefined
备份位置:
~/.claude/skills/backup/{skill-name}-{timestamp}/
bash
undefined

Use backup script

Use backup script

~/.claude/skills/skill-improver/scripts/backup-skill.sh <skill-path>

**Apply changes:**
- Use Edit tool for existing content
- Use Write tool for new files
- Verify each change was applied
~/.claude/skills/skill-improver/scripts/backup-skill.sh <skill-path>

**应用更改:**
- 对现有内容使用Edit工具
- 对新文件使用Write工具
- 验证每个更改已应用

Step 6: Verify and Report

步骤6:验证并生成报告

Verification checks:
  1. YAML syntax valid
  2. All modified files exist and are valid
  3. New files were created successfully
  4. No unintended changes occurred
bash
undefined
验证检查:
  1. YAML语法有效
  2. 所有修改后的文件存在且有效
  3. 新文件已成功创建
  4. 未发生意外更改
bash
undefined

Use verify script

Use verify script

~/.claude/skills/skill-improver/scripts/verify-update.sh <skill-path>

**Generate update-report-{skill-name}-{timestamp}.md** documenting:
- Summary (files modified, files created, total changes)
- Changes Applied (per-file breakdown)
- Quality Improvement (before/after scores)
- Verification Results
- Backup Location

See `examples/update-report-example.md` for report template.
~/.claude/skills/skill-improver/scripts/verify-update.sh <skill-path>

**生成update-report-{skill-name}-{timestamp}.md**,记录以下内容:
- 摘要(修改的文件、创建的文件、总更改数)
- 已应用的更改(按文件细分)
- 质量提升(更改前后分数)
- 验证结果
- 备份位置

报告模板请参考`examples/update-report-example.md`。

Priority Handling

优先级处理

High Priority

高优先级

Execute first. These typically address:
  • Critical description issues
  • Major writing style problems
  • Missing structural elements
  • Security-related concerns
优先执行。这些通常解决:
  • 关键描述问题
  • 主要写作风格问题
  • 缺失的结构元素
  • 安全相关问题

Medium Priority

中优先级

Execute after High. These typically address:
  • Content organization improvements
  • Additional examples
  • Documentation enhancements
在高优先级之后执行。这些通常解决:
  • 内容组织改进
  • 补充示例
  • 文档增强

Low Priority

低优先级

Execute last. These typically address:
  • Minor clarifications
  • Nice-to-have improvements
  • Polish and refinement
最后执行。这些通常解决:
  • 小的澄清说明
  • 锦上添花的改进
  • 打磨和优化

Integration with Skill Quality Reviewer

与Skill Quality Reviewer的集成

This skill works seamlessly with
skill-quality-reviewer
:
Current Skill (67/100 D+)
    ↓ [skill-quality-reviewer]
Improvement Plan
    ↓ [skill-improver]
Improved Skill (87/100 B+)
    ↓ [skill-quality-reviewer]
Quality Report (validation)
Iterate until desired quality level reached.
本Skill与
skill-quality-reviewer
无缝协作:
Current Skill (67/100 D+)
    ↓ [skill-quality-reviewer]
Improvement Plan
    ↓ [skill-improver]
Improved Skill (87/100 B+)
    ↓ [skill-quality-reviewer]
Quality Report (validation)
迭代直至达到期望的质量水平。

Additional Resources

其他资源

Reference Files

参考文件

  • references/plan-format.md
    - Improvement plan file structure and format
  • references/merge-strategies.md
    - Detailed merge algorithms and conflict resolution
  • references/error-handling.md
    - Error handling strategies
  • references/supported-updates.md
    - Supported update types with examples
  • references/plan-format.md
    - 改进计划文件的结构和格式
  • references/merge-strategies.md
    - 详细的合并算法和冲突解决方法
  • references/error-handling.md
    - 错误处理策略
  • references/supported-updates.md
    - 支持的更新类型及示例

Example Files

示例文件

  • examples/improvement-plan-example.md
    - Sample improvement plan
  • examples/update-report-example.md
    - Sample update report
  • examples/improvement-plan-example.md
    - 示例改进计划
  • examples/update-report-example.md
    - 示例更新报告

Scripts

脚本

  • scripts/backup-skill.sh
    - Create backup of skill before updates
  • scripts/verify-update.sh
    - Verify skill integrity after updates
  • scripts/backup-skill.sh
    - 更新前创建技能备份
  • scripts/verify-update.sh
    - 更新后验证技能完整性

Best Practices

最佳实践

Before Applying Updates

应用更新前

  1. Review the improvement plan - Understand what will change
  2. Verify backup location - Ensure backups can be restored
  3. Check for manual changes - Note any uncommitted local modifications
  4. Estimate impact - Review expected quality improvement
  1. 审查改进计划 - 了解将要进行的更改
  2. 验证备份位置 - 确保备份可恢复
  3. 检查手动更改 - 记录任何未提交的本地修改
  4. 评估影响 - 查看预期的质量提升

During Update Execution

执行更新期间

  1. Process in priority order - High → Medium → Low
  2. Verify after each file - Check updates were applied correctly
  3. Log all changes - Document what was modified
  4. Handle conflicts gracefully - Flag for review if needed
  1. 按优先级处理 - 高 → 中 → 低
  2. 每个文件后验证 - 检查更新是否正确应用
  3. 记录所有更改 - 记录修改内容
  4. 妥善处理冲突 - 如有需要标记以便审查

After Applying Updates

应用更新后

  1. Review the update report - Confirm all changes were intended
  2. Test the skill - Verify it still works correctly
  3. Compare scores - Check quality improvement matches expectations
  4. Keep backup - Retain backup until confident in changes
  1. 查看更新报告 - 确认所有更改均为预期
  2. 测试技能 - 验证技能仍能正常工作
  3. 对比分数 - 检查质量提升是否符合预期
  4. 保留备份 - 直到对更改有信心后再删除

Usage Examples

使用示例

Example 1: Apply improvements to local skill
User: "Apply improvements from improvement-plan-git-workflow.md"

[Claude executes the workflow:]
1. Reads improvement-plan-git-workflow.md
2. Parses all improvement items
3. Groups changes by file
4. Detects and resolves conflicts
5. Sorts by priority
6. Backs up git-workflow skill
7. Executes updates
8. Verifies results
9. Generates update-report-git-workflow-timestamp.md
Example 2: Update skill from quality review
User: "Update my api-helper skill based on quality report"

[Claude:]
1. Locates improvement-plan-api-helper.md
2. Applies all recommended changes
3. Verifies skill structure
4. Reports quality improvement: 72/100 → 91/100
示例1:对本地技能应用改进
User: "Apply improvements from improvement-plan-git-workflow.md"

[Claude executes the workflow:]
1. Reads improvement-plan-git-workflow.md
2. Parses all improvement items
3. Groups changes by file
4. Detects and resolves conflicts
5. Sorts by priority
6. Backs up git-workflow skill
7. Executes updates
8. Verifies results
9. Generates update-report-git-workflow-timestamp.md
示例2:根据质量审查更新技能
User: "Update my api-helper skill based on quality report"

[Claude:]
1. Locates improvement-plan-api-helper.md
2. Applies all recommended changes
3. Verifies skill structure
4. Reports quality improvement: 72/100 → 91/100