refactor-safely

Plans and executes code refactoring using dependency graph analysis and impact previews.

Updated Aug 4, 2026
One-click install
npx skills add https://github.com/sarthkdobriyal/hisaabi --skill refactor-safely-sarthkdobriyal
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: refactor-safely
Source: https://github.com/sarthkdobriyal/hisaabi/tree/main/.gemini/skills/refactor-safely
Command: npx skills add https://github.com/sarthkdobriyal/hisaabi --skill refactor-safely-sarthkdobriyal

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Refactoring code without understanding its dependencies risks breaking callers, flows, and critical paths. This Skill uses a knowledge graph to analyze impact before changes are applied, so renames, dead code removal, and decomposition happen with full visibility into affected locations. ## Core Features & Use Cases - Refactoring Suggestions: Uses community-driven analysis to suggest refactoring opportunities and detect unreferenced dead code. - Safe Renames with Preview: Generates a complete edit list of all affected locations before applying a rename, then applies it via a refactor ID. - Impact Verification: Checks impact radius and affected flows before major refactors, and verifies changes afterward with change detection. - Use Case: Before renaming a core utility function used across a large codebase, preview every call site, confirm no critical flows break, apply the rename, and verify the impact — all in a few tool calls. ## Quick Start Ask the assistant to safely rename a function across the codebase and preview all affected locations before applying the change.

Frequently Asked Questions about refactor-safely

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I safely rename a function across a codebase?▼

Use the rename mode to preview every affected location as an edit list before applying anything. Once reviewed, apply the rename with the returned refactor ID, then run change detection to verify the impact.

How to find dead code in a large project?▼

Run the refactor tool in dead_code mode to identify unreferenced code through dependency graph analysis. This finds code no other part of the project calls, making it safe to review for removal.

How do I check what breaks before refactoring code?▼

Check the impact radius and affected flows before making changes. These graph queries show which components and critical execution paths depend on the code you plan to modify.

When should I not use graph-based refactoring tools?▼

Graph-based refactoring requires an indexed knowledge graph of the codebase, so it is less suitable for quick one-off edits in small files. For trivial changes, direct editing may be faster than building graph context.