← ClaudeAtlas

code-refactoringlisted

Use when the user says 'refactor this', 'rename class', or 'move method'. Safely refactors code in any language — finds all callers, updates downstream dependencies, verifies via quality tools.
event4u-app/agent-config · ★ 7 · AI & Automation · score 84
Install: claude install-skill event4u-app/agent-config
# refactorer ## When to use Use this skill when renaming, moving, extracting, or restructuring code — any change that may have downstream effects on callers, interfaces, tests, documentation, or API contracts. Do NOT use when: - New feature development (use `feature-planning` skill) - Bug fixes that don't involve restructuring (use `bug-analyzer` skill) ## Before refactoring 1. **Read the agent docs** — check `agents/reference/docs/` and `agents/settings/contexts/` for the area you're refactoring. For modules, also read the project's module-docs directory (path varies by stack — Laravel: `app/Modules/{Module}/agents/`; Nx: `apps/{app}/docs/`; mono-repo: per-package `docs/`). See the `project-docs` skill for the mapping. 2. **Understand the scope** — what exactly needs to change and why? 3. **Find ALL references** — use `codebase-retrieval` and `view` with `search_query_regex` to find every caller, implementation, test, and configuration that references the code being changed. 4. **Map the impact** — create a list of all files that will need changes. 5. **Present the plan** — show the user what will be affected before starting. ## Procedure: Refactor code ### Step 1: Make the core change - Rename, extract, move, or restructure the target code. - Keep the change minimal and focused. ### Step 2: Update all downstream dependencies For each affected file (from the impact analysis): - **Callers**: Update method calls, constructor arguments, imports. - **Interfaces