refactor-skill-structure
Installation
SKILL.md
Refactor Skill Structure
Refactor a SKILL.md that has exceeded the 500-line limit or developed structural problems. This skill extracts extended code examples to references/EXAMPLES.md, splits compound procedures into focused sub-procedures, adds cross-references for progressive disclosure, and verifies the skill remains complete and valid after restructuring.
When to Use
- A skill exceeds the 500-line limit enforced by CI
- A single procedure step contains multiple unrelated operations that should be separate steps
- Code blocks longer than 15 lines dominate the SKILL.md and could be extracted
- The skill has accumulated ad-hoc sections that break the standard six-section structure
- After a content update pushed the skill over the line limit
- A skill review flagged structural issues that go beyond content quality
Inputs
- Required: Path to the SKILL.md file to refactor
- Optional: Target line count (default: aim for 80% of the 500-line limit, i.e., ~400 lines)
- Optional: Whether to create
references/EXAMPLES.md(default: yes, if extractable content exists) - Optional: Whether to split into multiple skills (default: no, prefer extraction first)
Related skills