← ClaudeAtlas

refactor-checklisted

Safety analysis before refactoring -- dependency graph, test coverage, public API exposure, blast radius verdict.
n24q02m/claude-plugins · ★ 3 · Code & Development · score 74
Install: claude install-skill n24q02m/claude-plugins
# Refactor Check Analyze whether a refactoring is safe BEFORE making changes. Produces a verdict with specific risks and mitigation steps. ## Steps 1. **Get the full dependency graph** for the target: - `graph(action="update")` to ensure graph is current - `query(action="query", pattern="callers_of", target="<name>")` -- who calls this - `query(action="query", pattern="callees_of", target="<name>")` -- what this calls - `query(action="query", pattern="imports_of", target="<name>")` -- what this imports - If it is a class: `query(action="query", pattern="inheritors_of", target="<name>")` and `query(action="query", pattern="children_of", target="<name>")` 2. **Identify test coverage**: - `query(action="query", pattern="tests_for", target="<name>")` -- direct tests - For each caller, also check `tests_for` to see if callers have integration tests covering this function indirectly - Record: number of direct tests, number of callers with tests, number of callers without tests 3. **Flag public API exposure**: - Check if the target is exported from a package `__init__.py`, `index.ts`, or similar - Check if the target is referenced from outside its own module/package - Check if the target appears in documentation or type stubs - Public API = any function/class importable by external consumers 4. **Estimate blast radius**: - `query(action="impact", target="<name>")` -- full impact analysis - Count: total impacted files, total impacted fu