code-review-graph is a local-first code intelligence graph that builds a persistent structural map of a codebase and supplies relevant context to AI coding tools through MCP and a CLI. It is used for code review and large-repository workflows, with catalogue add-ons providing integrations and instructions for operating it.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add tirth8205/code-review-graph --skill refactor-safelygit clone --depth 1 https://github.com/tirth8205/code-review-graphWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/tirth8205/code-review-graph/refactor-safely)<a href="https://agentmods.dev/skills/tirth8205/code-review-graph/refactor-safely"><img src="https://agentmods.dev/badge/skills/tirth8205/code-review-graph/refactor-safely/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/tirth8205/code-review-graph/refactor-safely"><img src="https://agentmods.dev/badge/skills/tirth8205/code-review-graph/refactor-safely.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- Socket pass
- Snyk pass
- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00015 | $0.00330 |
| Opus 5.5 | $0.00006 | $0.00132 |
| Sonnet 5.5 | $0.00003 | $0.00066 |
| Haiku 4.5 | $0.00002 | $0.00033 |
Grade A, and why
refactor-safely scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 17d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
Copies of this mod
1 near-identical copy found in the catalogue:
- refactor-safely — 100% identical, 27 lines differ
What it actually says
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"unless it is not enough. Minimal drops source, so leavesemantic_search_nodes_tool(include_source=True)andget_review_context_toolat standard. - Prefer a targeted
query_graph_toolcall over a broad listing call. - Budget: about five tool calls per task. Source snippets stand in for file reads.
- Read the implementation and its tests before changing code. The graph narrows scope; it does not replace the source.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 17d ago Changed f99da4b53e51
- 2mo ago Changed · -5 lines 4b8aeb462113
- 3mo ago First seen · 30 lines · 15 tokens per session scan A 95e60c797d62
refactor-safely is a skill published in the GitHub repository tirth8205/code-review-graph (32,974 stars, last pushed 13d ago), licensed MIT. It adds 15 tokens to every session and 330 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
refactor-safely compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| refactor-safelytirth8205/code-review-graph | Skill | 33k | 13d ago | MIT | A | 15 | Claude Code, Codex |
| go-testingGentleman-Programming/gentle-ai | Skill | 9.7k | yesterday | MIT | A | 26 | Claude Code, Codex |
| find-simplificationsQwenLM/qwen-code | Skill | 31k | today | Apache-2.0 | C | 103 | Claude Code, Codex |
| aoe-sandbox-boundaryagent-of-empires/agent-of-empires | Skill | 5.2k | today | MIT | A | 85 | Claude Code, Codex |
| cross-model-reviewhashgraph-online/awesome-codex-plugins | Skill | 1.6k | 2d ago | Apache-2.0 | A | 56 | Claude Code, Codex |
| gitnexushashgraph-online/awesome-codex-plugins | Skill | 1.6k | 2d ago | Apache-2.0 | A | 58 | Codex |
| swarm-pr-reviewZaxbyHub/opencode-swarm | Skill | 549 | today | MIT | A | 91 | Claude Code |