code-review-graph-refactor

Plan and apply dependency-validated code refactors using code-review graph analysis.

51|6|Updated Mar 10, 2019
One-click install
npx skills add https://github.com/AniTrend/anitrend-v2 --skill code-review-graph-refactor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-review-graph-refactor
Source: https://github.com/AniTrend/anitrend-v2/tree/main/.agents/skills/code-review-graph-refactor
Command: npx skills add https://github.com/AniTrend/anitrend-v2 --skill code-review-graph-refactor

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It reduces the risk of breaking code during refactors by using a code-review dependency graph to understand reachability, dead code, and rename impact before making changes.

Core Features & Use Cases

  • Dependency-aware refactor planning: Uses graph context to reason about affected symbols and call paths rather than relying on manual searching.
  • Dead code detection: Identifies unreferenced code paths to support cleanup and decomposition work.
  • Rename and apply workflow with previews: Plans renames with an edit list preview and applies changes using a graph-validated refactor lifecycle.

Use this when you need to rename symbols, remove dead code, or break apart large functions while keeping blast radius controlled.

Quick Start

Start by orienting with mcp_code-review-g_get_minimal_context_tool using your refactor task, then preview the rename or dead-code plan with the graph refactor tool before applying any changes.

Frequently Asked Questions about code-review-graph-refactor

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

FAQPage Schema
How do I safely rename symbols and remove dead code without breaking dependencies?

Safe refactoring uses a dependency graph to analyze reachability and impact radius before applying changes. This approach previews rename edit lists and validates affected call paths, preventing unintended breakage during dead code removal or symbol renaming.

What is impact-aware planning in code refactoring?

Impact-aware planning is a refactoring strategy that uses a dependency graph to reason about affected symbols and call paths. It identifies the blast radius of a change before execution, ensuring safe code modifications during function decomposition or dead code cleanup.

How do I detect unreferenced code paths for safe cleanup?

Dead code detection identifies unreferenced code paths by analyzing the dependency graph for reachability. This supports safe cleanup work by validating scope and impact before removing unused functions or decomposing large code blocks.

Does this graph-first refactoring workflow require manual searching for affected symbols?

Graph-first refactoring does not require manual searching because it uses dependency graph context to reason about affected symbols and call paths. The workflow validates scope and impact automatically, previewing suggestions before applying changes.

What's the best way to break apart large functions while keeping blast radius controlled?

Decomposing large functions safely requires using a dependency graph to validate scope and understand the blast radius before making changes. Planning with an edit list preview and verifying after applying changes keeps the impact radius controlled.

When do I need a dependency graph for refactoring tasks?

A dependency graph is needed for refactoring tasks like renaming symbols, removing dead code, or decomposing functions when you must prevent unintended breakage. It provides the minimal context required to validate impact and affected-flow before applying changes.