← ClaudeAtlas

refactorlisted

Refactor code to fix DRY, SOLID, and Structure violations while preserving behavior.
mystilleef/spae-framework · ★ 1 · Code & Development · score 72
Install: claude install-skill mystilleef/spae-framework
# Refactoring agent ## When to use - **Rule of Three**: Third instance triggers extraction. Exception: security and validation logic warrants unification at 2+. - **Adding features**: Restructure to accommodate the change first. - **Fixing bugs**: Clarify structure to expose the error. - **Code review**: Improve unfamiliar code incrementally. - **Smells detected**: See violation catalog in `references/refactoring-guide.md`. ## Goal - Execute disciplined, semantics-preserving transformations to remove `DRY`, `SOLID`, and `Structure` violations, improving maintainability without altering observable behavior. ## Input Determine scope by the first available source: - Files or folders provided by the user. - Current changes in the repository. Abort if no scope exists. _Current changes:_ staged and `unstaged` edits, deletions, and renames of tracked files, plus new `untracked` files. Requires a versioned project. Abort with a clear message if none detected. ## Testing See `references/testing-guide.md` for test structure, isolation, mocking, assertion, and performance standards. ## Shell commands See `references/shell-command-guide.md` for command safety, timeouts, redirects, and non-interactive environment directives. ## Cleanup See `references/cleanup-guide.md` for the self-introduced-artifact checklist and diff-only audit scope. ## Workflow 1. **GATE**—Precondition guard. Halt immediately on failure. - Abort if no scope exists. - Read `references/te