refactor-safely
Skill32k starsChanged 6 months agoMITView on GitHub
Plan and execute safe refactoring using dependency analysis
6 other projects use a version of this, 2 of them edited; 2 of 2 edited versions we compared changed its rules.
How people change it
2 of 2 edited versions changed its rules, and some changes recur.
Of the 2 edited versions we compared: 2 made changes of their own.
Rules people drop
- Call
refactor_toolwithmode="suggest"for refactoring candidates, ormode="dead_code"for unreferenced code.dropped by 2 of 2 - Call
apply_refactor_toolwith the returnedrefactor_idto apply the rename.dropped by 2 of 2 - Before a large refactor, call
get_impact_radius_toolandget_affected_flows_toolto see the dependents and critical paths involved.dropped by 2 of 2 - Call
find_large_functions_toolto find functions worth splitting.dropped by 2 of 2 - After the change, call
detect_changes_toolto confirm the impact matches the plan.dropped by 2 of 2 - Prefer a targeted
query_graph_toolcall over a broad listing call.dropped by 2 of 2 - Call
get_minimal_context_tool(task="<your task>")before any other graph tool.dropped by 1 of 2 - Read the implementation and its tests before changing code. The graph narrows scope; it does not replace the source.dropped by 1 of 2
Rules people add
- Use the knowledge graph to plan and execute refactoring with confidence.added by 2 of 2
- Use
refactor_toolwith mode="suggest" for community-driven refactoring suggestions.added by 2 of 2 - Use
refactor_toolwith mode="dead_code" to find unreferenced code.added by 2 of 2 - Use
apply_refactor_toolwith the refactor_id to apply renames.added by 2 of 2 - After changes, run
detect_changes_toolto verify the refactoring impact.added by 2 of 2 - Always preview before applying (rename mode gives you an edit list).added by 2 of 2
- Check
get_impact_radius_toolbefore major refactors.added by 2 of 2 - Use
get_affected_flows_toolto ensure no critical paths are broken.added by 2 of 2
We split this file and each edited version into the rules they give an agent and match them by wording. A version that adds no rule of its own and has not changed since this file last did reads as an older text, so what it lacks is not counted as dropped. We keep no past texts of a file, so that is inferred, and an edited version that started from an older text still counts its gaps as drops.
Adopted by
Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Most recently taken up by
- techygarg/latticetheir own version, first seen Sep 3, 2026
- imMamdouhaboammar/get-things-doneedited, first seen Sep 1, 2026
- adiutama/skillstheir own version, first seen Aug 25, 2026
- hamakyo/okf-skillstheir own version, first seen Aug 21, 2026
- leandrodslv/claude-skills-libraryedited, first seen Aug 14, 2026
- SerhatKumas/AI--ClaudeCodeStartertheir own version, first seen Jun 7, 2026
Who's talking about tirth8205/code-review-graph
- A Hacker News story“Code-review-graph: persistent code graph that cuts Claude Code token usage”Hacker News · Mar 9, 2026 · 12 points
- @camilleroux.com“`code-review-graph` construit un graphe de votre codebase pour que Claude ne lise que les fichiers …”Bluesky · Apr 6, 2026 · 10 likes
- @qdrddr.bsky.social“Helper for #Agents for token efficiency. #MCP or #CLI: Builds #Code #Graph: #AST & Tree-sitter. Continuous …”Bluesky · Apr 7, 2026 · 7 likes
- @dailygithubtrends.bsky.social“今日のGitHubトレンド tirth8205/code-review-graph AIコーディングツールがレビュー時にコードベースを過剰に読み込み、トークンを浪費する問題を解決するためのツールです。…”Bluesky · Jul 21, 2026 · 4 likes
- @github-trending.bsky.social“🚀 Skyrocketing! 🚀 (200+ new stars) 📦 tirth8205 / code-review-graph ⭐ 28,816 (+232) 🗒 Python Local-first …”Bluesky · Aug 6, 2026 · 3 likes
The biggest 5 of 72 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 72
Talked about on GitHub, Bluesky and Hacker News (72 times).
On GitHub · 50
- Nov 20, 2026Bump tirth8205/code-review-graph from 2.3.9 to 2.4.0 — StBritto/Zion-Calvary0 reactions
- Nov 20, 2026Bump tirth8205/code-review-graph from 2.3.9 to 2.4.0 — StBritto/St-brittos-school0 reactions
- Nov 20, 2026Bump tirth8205/code-review-graph from 2.3.9 to 2.4.0 — StBritto/shri-saibaba-ordering-app0 reactions
- Nov 20, 2026Bump tirth8205/code-review-graph from 2.3.9 to 2.4.0 — StBritto/RJ-Digital-Solutions0 reactions
- Nov 20, 2026Bump tirth8205/code-review-graph from 2.3.9 to 2.4.0 — StBritto/shri-saibaba-associates0 reactions
45 more on GitHub
- Nov 20, 2026Bump tirth8205/code-review-graph from 2.3.9 to 2.4.0 — StBritto/spice-courtyard0 reactions
- Nov 15, 2026ci(deps): bump the github-actions group across 1 directory with 2 updates — im47cn/etf-radar0 reactions · 3 comments
- Nov 11, 2026agent-skills.github.tirth8205.code-review-graph: 2.3.9 → 2.4.0 — sudosubin/agents.nix0 reactions
- Nov 9, 2026chore(deps)(deps): bump the actions-patch-minor group across 1 directory with 16 updates — setiyadijoko/template-ai-native-profile-starter-pilot0 reactions · 2 comments
- Nov 9, 2026chore(deps)(deps): bump the actions-patch-minor group across 1 directory with 16 updates — setiyadijoko/template-ai-native-profile-standard-pilot0 reactions · 2 comments
- Nov 9, 2026chore(deps)(deps): bump the actions-patch-minor group across 1 directory with 16 updates — setiyadijoko/rinjani0 reactions · 2 comments
- Nov 9, 2026chore(deps)(deps): bump the actions-patch-minor group across 1 directory with 16 updates — setiyadijoko/template-ai-native-profile-enterprise-pilot0 reactions · 2 comments
- Nov 2, 2026chore(deps)(deps): bump the actions-patch-minor group across 1 directory with 14 updates — setiyadinamikaintegrasi/service-desk-triage-pilot0 reactions · 2 comments
- Oct 26, 2026chore(deps)(deps): bump the actions-patch-minor group across 1 directory with 14 updates — setiyadijoko/template-ai-native0 reactions · 3 comments
- Oct 26, 2026chore(deps)(deps): bump the actions-patch-minor group across 1 directory with 14 updates — setiyadinamikaintegrasi/template-java-pilot0 reactions · 2 comments
- Oct 26, 2026chore(deps)(deps): bump the actions-patch-minor group across 1 directory with 14 updates — setiyadijoko/template-ai-native-python-coverage-pilot0 reactions · 2 comments
- Oct 26, 2026chore(deps)(deps): bump the actions-patch-minor group across 1 directory with 14 updates — setiyadijoko/template-ai-native-profile-starter-pilot0 reactions · 3 comments
- Oct 26, 2026chore(deps)(deps): bump the actions-patch-minor group across 1 directory with 14 updates — setiyadinamikaintegrasi/mangahub0 reactions · 2 comments
- Oct 26, 2026chore(deps)(deps): bump the actions-patch-minor group across 1 directory with 14 updates — setiyadijoko/template-ai-native-profile-standard-pilot0 reactions · 3 comments
- Oct 26, 2026chore(deps)(deps): Bump the actions-patch-minor group across 1 directory with 16 updates — setiyadinamikaintegrasi/ev-charge-tracker0 reactions · 2 comments
- Oct 26, 2026chore(deps)(deps): bump the actions-patch-minor group across 1 directory with 14 updates — setiyadinamikaintegrasi/media-belajar-anak0 reactions · 2 comments
- Oct 26, 2026chore(deps)(deps): bump the actions-patch-minor group across 1 directory with 14 updates — setiyadijoko/rinjani0 reactions · 3 comments
- Oct 26, 2026chore(deps)(deps): bump the actions-patch-minor group across 1 directory with 14 updates — setiyadijoko/template-ai-native-profile-enterprise-pilot0 reactions · 3 comments
- Oct 26, 2026chore(deps)(deps): bump the actions-patch-minor group across 1 directory with 14 updates — setiyadinamikaintegrasi/template-dotnet-pilot0 reactions · 2 comments
- Oct 19, 2026chore(deps)(deps): bump the actions-patch-minor group across 1 directory with 13 updates — setiyadijoko/template-ai-native-python-coverage-pilot0 reactions · 3 comments
- Oct 19, 2026chore(deps)(deps): bump the actions-patch-minor group across 1 directory with 13 updates — setiyadinamikaintegrasi/mangahub0 reactions · 3 comments
- Oct 19, 2026chore(deps)(deps): bump the actions-patch-minor group across 1 directory with 13 updates — setiyadinamikaintegrasi/media-belajar-anak0 reactions · 3 comments
- Oct 19, 2026chore(deps)(deps): bump the actions-patch-minor group across 1 directory with 13 updates — setiyadijoko/rinjani0 reactions · 3 comments
- Oct 6, 2026Waiting on the owner: one list of pending decisions — uehaj/sys1grep0 reactions
- Oct 5, 2026chore(deps): bump the python-dependencies group with 22 updates — paulnsorensen/milknado0 reactions · 6 comments
- Oct 3, 2026agent-skills.github.tirth8205.code-review-graph: init at 2.3.9 — sudosubin/agents.nix0 reactions
- Oct 1, 2026chore(deps): bump tirth8205/code-review-graph from 2.3.8 to 2.3.9 — neomatrix369/AgentVetter0 reactions · 1 comment
- Oct 1, 2026build(deps): bump tirth8205/code-review-graph from 2.3.8 to 2.3.9 — neomatrix369/rag-params-finder0 reactions
- Oct 1, 2026chore(deps): bump tirth8205/code-review-graph from 2.3.7 to 2.3.9 — matematicsolutions/patron0 reactions
- Sep 27, 2026ci(deps): bump the github-actions group across 1 directory with 2 updates — im47cn/etf-radar0 reactions · 3 comments
- Sep 21, 2026chore(deps): bump tirth8205/code-review-graph from 2.3.8 to 2.3.9 — zenonlab/ctxroute-blueprint0 reactions · 2 comments
- Sep 20, 2026Freshness: code-review-graph v2.3.8 -> v2.3.9 — thoroc/context-radar0 reactions
- Sep 14, 2026chore(deps-dev): update code-review-graph requirement from >=2.3.7 to >=2.3.8 — mrnicholasbcarter-code/verdict-core0 reactions · 5 comments
- Sep 8, 2026Configure Git Hooks and Claude Code tooling with code-review-graph and graphify — pluto-atom-4/balancing-robot-controller0 reactions
- Sep 8, 2026Configure Git Hooks and Claude Code Tooling with Graphify and code-review-graph — pluto-atom-4/IntVue0 reactions · 1 comment
- Sep 6, 2026Configure Claude Code with code-review-graph, better-code-review-graph, and graphify tooling — pluto-atom-4/ats-showcase0 reactions · 1 comment
- Sep 6, 2026Configure Claude Code with code-review-graph, better-code-review-graph, and Graphify for enhanced architecture planning — pluto-atom-4/ng-graphql-showcase0 reactions · 2 comments
- Sep 2, 2026[staging] watch: an emitter that dies before the first liveness tick is never reported — loonister1/code-review-graph0 reactions · 1 comment
- Sep 1, 2026Bump tirth8205/code-review-graph from 2.3.7 to 2.3.8 in the github-actions group — RaySmalley/aurelia-falling0 reactions
- Sep 1, 2026chore(deps): bump tirth8205/code-review-graph from 2.3.7 to 2.3.8 — matematicsolutions/patron0 reactions · 2 comments
- Aug 31, 2026[Feature]: Expose runtime coverage and static test support through get_test_health — Luqueee/kivgraph0 reactions
- Aug 30, 2026ci(deps): bump the github-actions group across 1 directory with 2 updates — im47cn/etf-radar0 reactions · 3 comments
- Aug 29, 2026chore(deps): bump the python-dependencies group with 6 updates — duxvfeng/entrix0 reactions
- Aug 25, 2026chore(deps-dev): bump code-review-graph from 2.3.6 to 2.3.8 — flext-sh/flext0 reactions · 3 comments
- Aug 24, 2026chore(deps-dev): bump code-review-graph from 2.3.6 to 2.3.7 — flext-sh/flext0 reactions · 3 comments
On Bluesky · 20
- Apr 6, 2026`code-review-graph` construit un graphe de votre codebase pour que Claude ne lise que les fichiers réellement impactés par un changement —… — @camilleroux.com10 likes and reposts · 2 replies
- Apr 7, 2026Helper for #Agents for token efficiency. #MCP or #CLI: Builds #Code #Graph: #AST & Tree-sitter. Continuous updates with changes. 19… — @qdrddr.bsky.social7 likes and reposts
- Jul 21, 2026今日のGitHubトレンド tirth8205/code-review-graph AIコーディングツールがレビュー時にコードベースを過剰に読み込み、トークンを浪費する問題を解決するためのツールです。… — @dailygithubtrends.bsky.social4 likes and reposts
- Aug 6, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 tirth8205 / code-review-graph ⭐ 28,816 (+232) 🗒 Python Local-first code intelligence graph for MCP… — @github-trending.bsky.social3 likes and reposts · 1 reply
- Jul 27, 2026コードベースの構造をグラフ化してAIツールのトークン消費を抑えるツールっぽい 大規模リポジトリでのコードレビューや開発効率化に使えそう yug1224 starred tirth8205/code-review-graph… — @yug1224.com2 likes and reposts · 1 reply
15 more on Bluesky
- Jul 27, 2026コードベースを構造化してAIのトークン消費を抑えるコード解析ツールらしい 大規模なリポジトリでのAI開発が快適になりそうかも yug1224 starred tirth8205/code-review-graph… — @yug1224.com2 likes and reposts
- Jul 27, 2026github.com/tirth8205/code-... GitHub - tirth8205/code-review-graph: Local-first code intelligence graph for MCP and CLI. Build... — @technews4869.bsky.social2 likes and reposts
- Jul 22, 2026💎 Hidden Gem! 💎 (1000+ new stars) 📦 tirth8205 / code-review-graph ⭐ 24,263 (+1,921) 🗒 Python Local-first code intelligence graph for… — @github-trending.bsky.social2 likes and reposts · 1 reply
- Jul 19, 2026今日のGitHubトレンド tirth8205/code-review-graph AIコーディングツールがレビュー時に広範囲なコードを再読み込みし、トークンを浪費する問題を解決するためのツールです。… — @dailygithubtrends.bsky.social2 likes and reposts
- Jul 17, 2026📦 tirth8205 / code-review-graph ⭐ 19,601 (+57) 🗒 Python Local-first code intelligence graph for MCP and CLI. Builds a persistent map of… — @github-trending.bsky.social2 likes and reposts
- Jul 4, 2026code-review-graph maps your whole codebase into a local-first graph, so your ai coding tools read only what matters. plugs into mcp + cli,… — @epicvibecoder.bsky.social2 likes and reposts · 1 reply
- May 2, 2026This looks like a nice tool - an MCP server to build a knowledge graph of your code, claims several times less tokens spent.… — @ayourtch.bsky.social2 likes and reposts · 1 reply
- Apr 15, 2026code-review-graph Local knowledge graph for Claude Code. Builds a persistent map of your codebase so Claude reads only what matters - 6.8×… — @pythonhub.dev2 likes and reposts · 1 reply
- Apr 11, 2026code-review-graph : graphe de code local pour réduire les tokens avec Claude Code — @news.humancoders.com2 likes and reposts
- Nov 10, 2026https://github.com/tirth8205/code-review-graph — @sigmanor.net1 likes and repost
- Jul 27, 2026コードベースの構造をグラフ化してAIのトークン消費量を劇的に減らすツールっぽい 大規模なプロジェクトでのAIコードレビューにすごく使えそう yug1224 starred tirth8205/code-review-graph… — @yug1224.com1 likes and repost
- Jul 20, 2026📈 Today's GitHub Trending: 1. https://github.com/tirth8205/code-review-graph - Python, 1876 stars today 2.… — @ghtrend.newsmast.social.ap.brid.gy1 likes and repost · 1 reply
- Aug 18, 2026公式READMEを読むと、現在の数値は中央値約65倍、最大376倍。しかも比較は「リポジトリ全ファイルを読む」対「グラフの検索結果」です。 公式自身が、熟練したエージェントのgrep+必要なファイル読みに対する比較ではない、と明記しています。… — @mint-echosphere.bsky.social0 likes and reposts · 1 reply
- Jul 19, 2026📈 Today's GitHub Trending: 1. https://github.com/tirth8205/code-review-graph - Python, 551 stars today 2.… — @ghtrend.newsmast.social.ap.brid.gy0 likes and reposts · 1 reply
- Apr 22, 2026Claude only reads the necessary parts, achieving 49x reduction for large monorepos. https://github.com/tirth8205/code-review-graph 4. Token… — @adityamitra.bsky.social0 likes and reposts · 1 reply
On Hacker News · 2
- Mar 9, 2026Code-review-graph: persistent code graph that cuts Claude Code token usage12 points · 2 comments
- Apr 3, 2026Code-review-graphv 2.1.0, 8× fewer tokens for code reviews via structural graph1 point
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 2
- imMamdouhaboammar/get-things-done★ 218% same
- leandrodslv/claude-skills-library★ 011% same
Wrote their own version · 4
- techygarg/lattice★ 197same name
- hamakyo/okf-skills★ 2same name
- adiutama/skills★ 1same name
- SerhatKumas/AI--ClaudeCodeStarter★ 1same name
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 repository9 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- build-graphSkill
- debug-issueSkill
- explore-codebaseSkill
- review-changesSkill
- review-deltaSkill
- review-prSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 1 is distinctive, and 7 are very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Call refactor_tool with mode="suggest" for refactoring candidates, or mode="dead_code" for unreferenced code.
- Very specific: line 14
Call apply_refactor_tool with the returned refactor_id to apply the rename.
- Very specific: line 15
Before a large refactor, call get_impact_radius_tool and get_affected_flows_tool to see the dependents and critical paths involved.
- Very specific: line 16
Call find_large_functions_tool to find functions worth splitting.
- Very specific: line 17
After the change, call detect_changes_tool to confirm the impact matches the plan.
- Very specific: line 20
Call get_minimal_context_tool(task="<your task>") before any other graph tool.
- Very specific: line 22
Prefer a targeted query_graph_tool call over a broad listing call.
- Distinctive: line 24
Read the implementation and its tests before changing code.
“Common” is measured: kept by at least 6 in 10 of the 6 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
Plan a refactor from the dependency graph and apply renames from a preview.
Steps
- Call
refactor_toolwithmode="suggest"for refactoring candidates, ormode="dead_code"for unreferenced code. - For a rename, call
refactor_toolwithmode="rename",old_nameandnew_name. Check the returned edit list before applying. - Call
apply_refactor_toolwith the returnedrefactor_idto apply the rename. - Before a large refactor, call
get_impact_radius_toolandget_affected_flows_toolto see the dependents and critical paths involved. - Call
find_large_functions_toolto find functions worth splitting. - After the change, call
detect_changes_toolto confirm the impact matches the plan.
Token Efficiency Rules
- Call
get_minimal_context_tool(task="<your task>")before any other graph tool. - Pass
detail_level="minimal"wherever a tool accepts it. Use "standard" only when minimal is not enough. - Prefer a targeted
query_graph_toolcall over a broad listing call. - Budget: about five tool calls and 800 tokens of graph output per task.
- Read the implementation and its tests before changing code. The graph narrows scope; it does not replace the source.
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.

