/crg:refactor-check <function or class name> [intended change]from crg
Analyzes refactoring safety by mapping dependency graphs, test coverage, public API exposure, and blast radius before making changes.
Ships in crg. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Analyze whether a refactoring is safe BEFORE making changes. Produces a verdict with specific risks and mitigation steps.
Command surface: run the local CLI through the coding harness shell. Examples
use the installed crg command; from a source checkout,
prefix it with uv run. No MCP mapping is required.
Get the full dependency graph for the target:
crg graph build --base HEAD --repo-root "<path>" to index current working changescrg query query --pattern callers_of --target "<name>" --repo-root "<path>" -- who calls this--pattern callees_of to see what this calls--pattern imports_of to see what this imports--pattern inheritors_of and --pattern children_ofIdentify test coverage:
crg query query --pattern tests_for --target "<name>" --repo-root "<path>" -- direct teststests_for to see if callers have integration tests covering this function indirectlyFlag public API exposure:
__init__.py, index.ts, or similarEstimate blast radius:
crg query impact --changed-files "<target-file>" --repo-root "<path>" -- file-level impact analysis around the targetProduce verdict:
## Refactor Safety: <name>
### Target
- **Location**: <file_path>:<line>
- **Type**: function / class / method
- **Public API**: Yes / No
### Dependency Summary
- **Callers**: N functions depend on this
- **Callees**: Calls M other functions
- **Inheritance**: N subclasses (if class)
### Test Coverage
- **Direct tests**: N tests
- **Caller tests**: M/K callers have tests covering this path
- **Coverage gaps**: <list uncovered callers>
### Blast Radius
- **Impacted files**: N
- **Impacted functions**: M
- **Max depth**: K hops
### Verdict: SAFE / NEEDS MIGRATION / DANGEROUS
**SAFE** -- Low blast radius (<5 files), good test coverage, no public API exposure.
Make the change, run tests, done.
**NEEDS MIGRATION** -- Public API or moderate blast radius (5-15 files).
Recommended approach:
1. Create new version alongside old
2. Migrate callers incrementally
3. Deprecate old version
4. Remove after all callers migrated
**DANGEROUS** -- High blast radius (>15 files), poor test coverage, or public API with external consumers.
Specific risks:
- <risk 1 with affected files>
- <risk 2 with affected files>
Mitigation: <steps to reduce risk before proceeding>
| Condition | Verdict |
|---|---|
| <5 impacted files, not public API, >80% caller test coverage | SAFE |
| 5-15 impacted files OR public API with known consumers | NEEDS MIGRATION |
| >15 impacted files OR public API with unknown consumers OR <50% test coverage | DANGEROUS |
| Any external package/library depends on it | DANGEROUS |
What SKILL.md sets; muted values are Claude Code's defaults
Generated from the plugin's indexed repository (n24q02m/crg) — no native marketplace selected
npx claudepluginhub p/n24q02m-better-code-review-graph6 skills in this plugin
/impact-auditBlast radius of a change you have not made yet -- traces a symbol across federated repositories, splits impact per repo, and reports what must ship together./onboard-repoIndex an unfamiliar codebase into the knowledge graph, then produce a first orientation map -- entry points, most-depended-upon modules, hotspots, test topology./review-deltaReview uncommitted changes using impact analysis. Quick local delta review with blast-radius detection./review-prComprehensive PR review -- full branch diff against base, commit-by-commit analysis, breaking change detection, conventional commit verification./security-sweepGraph-driven security sweep -- scan for dangerous sinks, then rank each finding by whether an entry point can actually reach it, and triage the rest into suppressions.2 plugins ship this exact skill · first indexed Oct 4, 2026
Other plugins' skills for the same job