From refactor
Apply Collapse Hierarchy when you see Lazy Element, Speculative Generality. A subclass that no longer differs meaningfully from its parent merges back in.
How this skill is triggered — by the user, by Claude, or both
Slash command
/refactor:collapse-hierarchyThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Target state:** A subclass that no longer differs meaningfully from its parent merges back in.
Target state: A subclass that no longer differs meaningfully from its parent merges back in.
Why apply it: Smaller hierarchy, less ceremony, fewer files to navigate.
Pitfall: Collapsing too eagerly destroys an extension point you'll later want — only collapse when the variant has been zero-sum for a sustained period.
// Avoid:
class Employee {}
class FullTimeEmployee extends Employee {}
// Prefer:
class Employee {}
Removes smells: Lazy Element, Speculative Generality
npx claudepluginhub wallacedrew/ritl --plugin refactorGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.