refactor-safely
Skill4 starsChanged 4 months agoMITView on GitHub
Plan and execute safe refactoring using dependency analysis
21 other projects use a version of this, 2 of them edited.
Adopted by
Most recently taken up by
- Kuan-AI-com/agent-skillstheir own version, first seen Nov 15, 2026
- tirth8205/code-review-graphtheir own version, first seen Nov 11, 2026
- rumotion/ai-agent-project-templatetheir own version, first seen Nov 1, 2026
- yaohuangguan/remote-arctheir own version, first seen Nov 1, 2026
- Remote-Arc/remote-arctheir own version, first seen Nov 1, 2026
- VelimirMueller/claude-skillstheir own version, first seen Nov 1, 2026
Used with
Projects with it also use audit-test-suite, change-data-safely and 9 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
yaohuangguanSkillaudit-test-suite
Find where an existing test suite is weak and decide what to test next, ranked by risk. Use this when asked to add missing tests, find gaps, raise coverage, assess test quality or see which areas are thin, even if the request only mentions a coverage percentage.
Also in 3 projects that use this
yaohuangguanSkillchange-data-safely
Change a database schema or stored data without breaking running code or losing data. Use this for any migration, new or changed column, backfill, bulk update, delete, index, or change to a stored format, including in small projects. Data mistakes are often impossible to undo.
Also in 3 projects that use this
SauravSrivastavSkilldebug-failure
Diagnose a failing test, command, or runtime behavior using evidence and produce a minimal verified fix.
Also in 3 projects that use this
ficaviolaodorata520Skillsecurity-pass
Review an MCP server for common security gaps: LLM-facing surfaces as injection vector (tools, resources, prompts, descriptions), scope blast radius, destructive ops without consent, upstream auth shape, input sinks (URL / path / roots / shell / sampling / schema strictness / ReDoS), tenant isolation, leakage through errors and telemetry, unbounded resources, and HTTP-mode deployment surface. Use before a release, after a batch of handler changes, or when the user asks for a security review, audit, or hardening pass. Produces grouped findings and a numbered options list.
Also in 3 projects that use this
Codagent-AISkillimplement-change
Implements an approved change in one continuous session, with tiered test runs. Use when asked to implement a change from its approved definition, or to invoke codagent:implement-change.
Also in 5 projects that use this
- +6 more from yaohuangguan
Other versions21 projects use a version of this.
Word for word · 0
None found.
Edited · 2
- imMamdouhaboammar/get-things-done★ 279% same
- exactbee/claude-code-workflow★ 193% same
Wrote their own version · 19
- tirth8205/code-review-graph★ 33ksame name
- techygarg/lattice★ 209same name
- VelimirMueller/ai-development-skills★ 7same name
- VelimirMueller/claude-skills★ 7same name
- Remote-Arc/remote-arc★ 5same name
- yaohuangguan/remote-arc★ 5same name
- Arasz/ai-badger★ 3same name
- hamakyo/okf-skills★ 2same name
- contextosai/skills★ 1same name
- rpraharaj/ai-engineer★ 1same name
9 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository4 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- debug-issueSkill
- explore-codebaseSkill
- review-changesSkill
The file
We split this skill into the rules it gives an agent
11 rules. 0 are common, 2 are distinctive, and 9 are very specific to this project.
0
Common
Most of the 19 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use the knowledge graph to plan and execute refactoring with confidence.
- Very specific: line 12
Use refactor_tool with mode="suggest" for community-driven refactoring suggestions.
- Very specific: line 13
Use refactor_tool with mode="dead_code" to find unreferenced code.
- Very specific: line 15
Use apply_refactor_tool with the refactor_id to apply renames.
- Very specific: line 16
After changes, run detect_changes_tool to verify the refactoring impact.
- Distinctive: line 20
Always preview before applying (rename mode gives you an edit list).
- Very specific: line 21
Check get_impact_radius_tool before major refactors.
- Very specific: line 22
Use get_affected_flows_tool to ensure no critical paths are broken.
- Very specific: line 23
Run find_large_functions to identify decomposition targets.
- Very specific: line 26
ALWAYS start with get_minimal_context(task="<your task>") before any other graph tool.
- Very specific: line 27
Use detail_level="minimal" on all calls.
“Common” is measured: kept by at least 6 in 10 of the 19 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Refactor Safely
Use the knowledge graph to plan and execute refactoring with confidence.
Steps
- Use
refactor_toolwith mode="suggest" for community-driven refactoring suggestions. - Use
refactor_toolwith mode="dead_code" to find unreferenced code. - For renames, use
refactor_toolwith mode="rename" to preview all affected locations. - Use
apply_refactor_toolwith the refactor_id to apply renames. - After changes, run
detect_changes_toolto verify the refactoring impact.
Safety Checks
- Always preview before applying (rename mode gives you an edit list).
- Check
get_impact_radius_toolbefore major refactors. - Use
get_affected_flows_toolto ensure no critical paths are broken. - Run
find_large_functionsto identify decomposition targets.
Token Efficiency Rules
- ALWAYS start with
get_minimal_context(task="<your task>")before any other graph tool. - 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.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

