What problem does it solve?
This Skill reduces technical debt by systematically discovering, planning, and applying safe refactors while ensuring zero-regression through automated test verification and controlled retries.
Core Features & Use Cases
- Scope analysis: Scan a module path, feature area, or entire codebase to identify duplication, complexity, naming, dependency, dead code, and pattern violations.
- Plan-driven tasks: Generate a structured plan and per-task JSON artifacts with read-first files, convergence criteria, verification commands, and risk ordering.
- Safe execution loop: Execute refactors via synchronous agent runs, run the test suite after each change, revert on failures, retry with adjusted strategy, and record reflections and summaries.
- Use Case: Incrementally reduce tech debt in a legacy authentication module by producing discrete, test-verified tasks that can be audited, reverted, and improved across multiple iterations.
Quick Start
Run the quality-refactor skill with a scope (for example src/auth or all) and optional flags such as --max-iterations N to start an iterative, test-verified refactor.