ng-refactor
ng-refactor
Over years, Angular components accumulate features, special cases, and workarounds until
responsibilities blur between UI, state, and business logic – any spreads, lifecycle hooks
multiply, templates fill with logic, and files cross 400, 600, 800 lines. Such "dusty"
components carry a high mental load, make every change risky, and are harder for an AI agent
to grasp than for a human. Clean names, small functions, and precise types reduce both
misunderstandings and hallucinations.
This skill modernizes one component (or a small set) at a time through a repeatable blueprint of seven steps, each over a chosen scope, each verified by the full gauntlet and paused at a clean checkpoint for human review before the next. AI accelerates the rebuild; the architecture decisions stay human.
ng-refactor orchestrates the seven-step refactoring flow. For Angular version updates,
automatic update migrations, and official @angular/core migration schematics, invoke
ng-migrate from the relevant step and let that skill own the migration
workflow.