Automatically reviews and fixes Claude Code skills through iterative refinement cycles using the skill-reviewer agent. Continues until quality bar is met or max iterations reached.
Overview
The Skill Improver plugin runs automated fix-review cycles on Claude Code skills until they meet quality standards. It uses theskill-reviewer agent from the plugin-dev plugin to identify issues, then fixes them and re-reviews iteratively.
Author: Paweł Płatek
Prerequisites
Verify it’s enabled:plugin-dev is missing, install from the Trail of Bits plugin repository.
Commands
/skill-improver <SKILL_PATH> [—max-iterations N]
Start an improvement loop for a skill:<SKILL_PATH>- Path to skill directory or SKILL.md file--max-iterations N- Maximum iterations (default: 20)
/cancel-skill-improver [SESSION_ID]
Stop the active improvement loop:How It Works
Review Phase
Calls the
skill-reviewer agent to identify quality issues, categorized by severity:- Critical - Blocks skill loading or causes runtime failures
- Major - Significantly degrades skill effectiveness
- Minor - Polish items, may be false positives
Fix Phase
- Critical issues - Fixed immediately (always valid)
- Major issues - Fixed immediately (required by standards)
- Minor issues - Evaluated before fixing (may be false positives)
Issue Categorization
Critical Issues (MUST fix immediately)
These block skill loading or cause runtime failures:Missing Frontmatter
Missing
name or description fields - Claude cannot index or trigger the skillInvalid YAML
Frontmatter syntax errors - Parsing fails, skill won’t load
Broken References
Referenced files don’t exist - Runtime errors when Claude follows links
Broken Paths
Invalid file paths - Tool failures at runtime
Major Issues (MUST fix)
These significantly degrade skill effectiveness:- Weak trigger descriptions - Claude may not recognize when to use the skill
- Wrong writing voice - Second person “you” instead of imperative
- SKILL.md exceeds 500 lines - Should use
references/for details - Missing “When to Use” - Required by project standards
- Missing “When NOT to Use” - Required by project standards
- Description doesn’t specify when to trigger - Skill may never be selected
Minor Issues (Evaluate before fixing)
These are polish items that may or may not improve the skill:- Subjective style preferences
- Optional enhancements
- “Nice to have” improvements
- Formatting suggestions
Evaluate minor issues before fixing. Ask:
- Is this a genuine improvement?
- Could this be a false positive?
- Would this actually help Claude use the skill?
Installation
Usage Example
Iteration 1 - Fix
Claude fixes critical and major issues:
- Adds
namefield to frontmatter - Rewrites description in third person
- Adds “When NOT to Use” section
- Evaluates minor issue: “Line 45 is verbose”
- Decision: Verbosity provides useful context, skip
Iteration 2 - Evaluate
Claude evaluates minor issue again:
- Line 45 communicates effectively as-is
- Verbosity provides useful context
- No change needed
Completion Criteria
When to Output the Marker
When NOT to Output the Marker
- Any critical issue remains unfixed
- Any major issue remains unfixed
- Haven’t run skill-reviewer to verify fixes worked
Multiple Sessions
Multiple improvement loops can run simultaneously on different skills. Each gets:- Unique session ID
- Separate state file in
.claude/skill-improver.*.local.md - Independent iteration tracking
Troubleshooting
subagent not found
subagent not found
Install the
plugin-dev plugin:Loop never completes
Loop never completes
Check state:Cancel manually:
Orphaned state files
Orphaned state files
Remove orphaned state files:
Max iterations reached
Max iterations reached
The default limit is 20 iterations. If reached:
- Review remaining issues in state file
- Manually fix complex issues
- Restart loop with higher limit:
Rationalizations to Reject
Best Practices
Fix Critical First
Always address critical issues immediately - they block skill loading.
Verify Major Fixes
Run skill-reviewer again after fixing major issues to ensure they’re resolved.
Evaluate Minors
Don’t blindly fix minor issues - evaluate for false positives.
Output Marker
Always output
<skill-improvement-complete> when done - it’s the ONLY way to stop the loop.Related Skills
- Workflow Skill Design - Teaches skill architecture patterns
- Ask Questions If Underspecified - Uses similar iterative refinement approach