Refactor
termide/termide
Full-workspace code quality analysis and refactoring with validation
Plans a refactor from a code dependency graph, previews renames before applying them and checks that the final impact matches the plan.
$ npx skills add tirth8205/code-review-graph --skill refactor-safely -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install tirth8205/code-review-graph refactor-safely --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/tirth8205/code-review-graph.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/refactor-safely .claude/skills/refactor-safely && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "refactor-safely" agent skill from https://github.com/tirth8205/code-review-graph/tree/staging/skills/refactor-safely into .claude/skills/refactor-safely/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "refactor-safely", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/tirth8205/code-review-graph/tree/staging/skills/refactor-safelyType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add tirth8205/code-review-graph --skill refactor-safely -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install tirth8205/code-review-graph refactor-safely --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/tirth8205/code-review-graph.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/refactor-safely .agents/skills/refactor-safely && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "refactor-safely" agent skill from https://github.com/tirth8205/code-review-graph/tree/staging/skills/refactor-safely into .agents/skills/refactor-safely/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "refactor-safely", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add tirth8205/code-review-graph --skill refactor-safely -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install tirth8205/code-review-graph refactor-safely --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/tirth8205/code-review-graph.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/refactor-safely .cursor/skills/refactor-safely && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "refactor-safely" agent skill from https://github.com/tirth8205/code-review-graph/tree/staging/skills/refactor-safely into .cursor/skills/refactor-safely/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "refactor-safely", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/tirth8205/code-review-graph.git --path skills/refactor-safely--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add tirth8205/code-review-graph --skill refactor-safely -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install tirth8205/code-review-graph refactor-safely --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/tirth8205/code-review-graph.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/refactor-safely .gemini/skills/refactor-safely && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "refactor-safely" agent skill from https://github.com/tirth8205/code-review-graph/tree/staging/skills/refactor-safely into .gemini/skills/refactor-safely/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "refactor-safely", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install tirth8205/code-review-graph refactor-safelyInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add tirth8205/code-review-graph --skill refactor-safely -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/tirth8205/code-review-graph.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/refactor-safely .github/skills/refactor-safely && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "refactor-safely" agent skill from https://github.com/tirth8205/code-review-graph/tree/staging/skills/refactor-safely into .github/skills/refactor-safely/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "refactor-safely", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add tirth8205/code-review-graph --skill refactor-safely -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install tirth8205/code-review-graph refactor-safely --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/tirth8205/code-review-graph.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/refactor-safely .opencode/skills/refactor-safely && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "refactor-safely" agent skill from https://github.com/tirth8205/code-review-graph/tree/staging/skills/refactor-safely into .opencode/skills/refactor-safely/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "refactor-safely", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
refactor-safelyPlans a refactor from a code dependency graph, previews renames before applying them and checks that the final impact matches the plan.
The skill works through the tools of a code-graph server. For ideas it calls `refactor_tool` in suggest mode to list refactoring candidates, or in dead-code mode to find unreferenced code, and `find_large_functions_tool` points out functions worth splitting. For a rename it calls `refactor_tool` with the old and new names, checks the returned edit list, and then applies it with `apply_refactor_tool` using the returned refactor ID.
Before a large change it looks at the impact radius and affected flows to see dependents and critical paths, and afterwards it runs `detect_changes_tool` to confirm the real impact matches the plan. The skill also sets a token budget: start with `get_minimal_context_tool`, ask for minimal detail wherever a tool allows, prefer targeted graph queries to broad listings, keep to about five tool calls and 800 tokens of graph output per task, and still read the implementation and its tests before editing, since the graph narrows scope but does not replace the source.
6 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 6b12d11. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md.
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Graph-Guided Safe Refactoring loads about 332 tokens when it runs. Until then it costs about 19 tokens; SKILL.md has 164 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from tirth8205/code-review-graph at commit 6b12d11, republished under its MIT licence (© tirth8205). 164 words, ~332 tokens.
.claude/skills/refactor-safely/SKILL.md (or your agent's skills folder).Plan a refactor from the dependency graph and apply renames from a preview.
refactor_tool with mode="suggest" for refactoring candidates, or mode="dead_code" for unreferenced code.refactor_tool with mode="rename", old_name and new_name. Check the returned edit list before applying.apply_refactor_tool with the returned refactor_id to apply the rename.get_impact_radius_tool and get_affected_flows_tool to see the dependents and critical paths involved.find_large_functions_tool to find functions worth splitting.detect_changes_tool to confirm the impact matches the plan.get_minimal_context_tool(task="<your task>") before any other graph tool.detail_level="minimal" wherever a tool accepts it. Use "standard" only when minimal is not enough.query_graph_tool call over a broad listing call.© tirth8205, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/refactor-safely of tirth8205/code-review-graph.
Open the folder on GitHubat commit 6b12d11
We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in tirth8205/code-review-graph, which our catalogue first saw on October 7, 2026.
Graph-Guided Safe Refactoring next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Graph-Guided Safe Refactoring this skilltirth8205/code-review-graph | 32k | 1 repos | ~332 | Automated safety check: Pass | MIT | |
| Refactortermide/termide | 171 | — | ~2.8k | Automated safety check: Pass | MIT | |
| Trace-MCP Refactoringnikolai-vysotskyi/trace-mcp | 185 | — | ~672 | Automated safety check: Pass | MIT | |
| Codehealth MCPaffaan-m/ECC | 274k | 1 repos | ~1.8k | Automated safety check: Pass | MIT | |
| ast-grep Structural Searchcode-yeongyu/oh-my-openagent | 70k | — | ~3.3k | Automated safety check: Pass | MIT | |
| Systematic Code Refactoringluongnv89/claude-howto | 42k | — | ~3k | Automated safety check: Pass | MIT |
termide/termide
Full-workspace code quality analysis and refactoring with validation
nikolai-vysotskyi/trace-mcp
Refactors code safely in projects indexed by trace-mcp: assess risk, find candidates, check impact and rename symbols across every file without missing a reference.
affaan-m/ECC
Real-time structural Code Health via CodeScene MCP — review before edits, verify score deltas after changes, gate commits and PRs.
code-yeongyu/oh-my-openagent
Searches and rewrites code by syntax-tree shape across 25 languages with ast-grep, for codemods, structural queries and YAML lint rules, using a Python wrapper script.
luongnv89/claude-howto
Guides refactoring in phases based on Martin Fowler's method: research, test coverage check, planning and small tested steps, with your approval at each phase.
docling-project/docling
Applies opinionated production Python conventions chosen by the project's Python version: modern type syntax, pathlib, explicit checks and interface guidance.
tirth8205/code-review-graph
Reviews a pull request or branch diff with a code knowledge graph and produces a structured review that includes blast-radius analysis.
tirth8205/code-review-graph
Traces a bug through a code knowledge graph, following callers, callees and execution flow before opening source files, within a small token budget.
tirth8205/code-review-graph
Navigates a codebase through the code-review-graph MCP tools: architecture overview, symbol search, caller and callee tracing, flows and oversized functions.
tirth8205/code-review-graph
Reviews a change set using a code knowledge graph for risk scores, blast radius and test gaps, and ends with a merge recommendation.
tirth8205/code-review-graph
Builds or incrementally updates the code-review knowledge graph for a repository and reports whether the build succeeded, partly or failed.
tirth8205/code-review-graph
Reviews only the code changed since the last commit, using a code-graph MCP server to find risk-scored changes, test gaps and the blast radius, then writes a short report.
Works with
Categories
Plans a refactor from a code dependency graph, previews renames before applying them and checks that the final impact matches the plan. The skill works through the tools of a code-graph server. For ideas it calls `refactor_tool` in suggest mode to list refactoring candidates, or in dead-code mode to find unreferenced code, and `find_large_functions_tool` points out functions worth splitting.
Graph-Guided Safe Refactoring fits situations like: renaming a symbol across a codebase with a reviewable edit list; finding dead code or oversized functions worth cleaning up; estimating what a large refactor will touch before starting.
Run `npx skills add tirth8205/code-review-graph --skill refactor-safely -a claude-code`. Or copy the skill folder (skills/refactor-safely in tirth8205/code-review-graph) into .claude/skills/refactor-safely in your project. Claude Code loads it when a task matches its description.
Run `npx skills add tirth8205/code-review-graph --skill refactor-safely -a codex`. Or copy the skill folder (skills/refactor-safely in tirth8205/code-review-graph) into .agents/skills/refactor-safely in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add tirth8205/code-review-graph --skill refactor-safely -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/refactor-safely, .gemini/skills/refactor-safely, .github/skills/refactor-safely and .opencode/skills/refactor-safely in your project.
SKILL.md names no scripts, command-line tools or credentials: Graph-Guided Safe Refactoring is instructions for the agent only. Our summary lists: The code-review-graph MCP server with a built graph of the repository.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Graph-Guided Safe Refactoring is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 332 tokens (SKILL.md is roughly 1.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Graph-Guided Safe Refactoring: Refactor (termide/termide, 171 stars), Trace-MCP Refactoring (nikolai-vysotskyi/trace-mcp, 185 stars), Codehealth MCP (affaan-m/ECC, 274k stars) and ast-grep Structural Search (code-yeongyu/oh-my-openagent, 70k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
tirth8205 (a GitHub user) maintains it in tirth8205/code-review-graph, which has 31,943 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on October 6, 2026.
Source: tirth8205/code-review-graph on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.