refactor-safely

Plan and execute safe refactoring using dependency analysis

By tirth8205 · 203 installs

npx skills add tirth8205/code-review-graph --skill refactor-safely

Source repository · Upstream listing

Refactor Safely Use the knowledge graph to plan and execute refactoring with confidence. Steps 1. Use refactor tool with mode="suggest" for community driven refactoring suggestions. 2. Use refactor tool with mode="dead code" to find unreferenced code. 3. For renames, use refactor tool with mode="rename" to preview all affected locations. 4. Use apply refactor tool with the refactor id to apply renames. 5. After changes, run detect changes tool to verify the refactoring impact. Safety Checks Always preview before applying (rename mode gives you an edit list). Check get impact radius tool before major refactors. Use get affected flows tool to ensure no critical paths are broken. Run find large functions tool to identify decomposition targets. Token Efficiency Rules Start with get minimal context tool(task="<your task ") before other graph tools. Use detail level="minimal" on all calls. Only escalate to "standard" when minimal is insufficient. Target: complete any review/debug/refactor task in ≤5 tool calls and ≤800 total output tokens. Read the implementation and its tests before changing code. The graph narrows scope; it does not replace the source.