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 n24q02m/claude-plugins --skill refactor-checkgit clone --depth 1 https://github.com/n24q02m/claude-pluginsWrote 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/n24q02m/claude-plugins/refactor-check)<a href="https://agentmods.dev/skills/n24q02m/claude-plugins/refactor-check"><img src="https://agentmods.dev/badge/skills/n24q02m/claude-plugins/refactor-check/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/n24q02m/claude-plugins/refactor-check"><img src="https://agentmods.dev/badge/skills/n24q02m/claude-plugins/refactor-check.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00024 | $0.00962 |
| Opus 5.5 | $0.00010 | $0.00385 |
| Sonnet 5.5 | $0.00005 | $0.00192 |
| Haiku 4.5 | $0.00002 | $0.00096 |
Grade A, and why
refactor-check 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 18d 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.
This is a copy
100% identical to refactor-check — 10 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 100 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Refactor Check
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.
Steps
-
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- use
--pattern callees_ofto see what this calls - use
--pattern imports_ofto see what this imports - If it is a class, also query
--pattern inheritors_ofand--pattern children_of
-
Identify test coverage:
crg query query --pattern tests_for --target "<name>" --repo-root "<path>"-- direct tests- For each caller, also query
tests_forto see if callers have integration tests covering this function indirectly - Record: number of direct tests, number of callers with tests, number of callers without tests
-
Flag public API exposure:
- Check if the target is exported from a package
__init__.py,index.ts, or similar - Check if the target is referenced from outside its own module/package
- Check if the target appears in documentation or type stubs
- Public API = any function/class importable by external consumers
- Check if the target is exported from a package
-
Estimate blast radius:
crg query impact --changed-files "<target-file>" --repo-root "<path>"-- file-level impact analysis around the target- Count: total impacted files, total impacted functions, depth of dependency chain
- Identify any impacted files outside the immediate package/module
-
Produce 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>
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.
- 18d ago Changed 7f4c95d83643
- 1mo ago First seen · 100 lines · 24 tokens per session scan A d12ca0aef337
refactor-check is a skill published in the GitHub repository n24q02m/claude-plugins (4 stars, last pushed yesterday), licensed Apache-2.0. It adds 24 tokens to every session and 962 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to refactor-check, differing in 10 lines, and is treated as a copy.
Other skills, from other repositories
oracle
Oracle second-model review: bundle prompts/files, debug, refactor, design.
semgrep-rule-creator
Creates custom Semgrep rules for detecting security vulnerabilities, bug patterns, and code patterns. Use when writing Semgrep rules or building custom static analysis detections.
variant-analysis
Find similar vulnerabilities and bugs across codebases using pattern-based analysis. Use when hunting bug variants, building CodeQL/Semgrep queries, analyzing security vulnerabilities, or performing systematic code audits after finding an initial issue.
code-review-web
Review web application code for bugs, security issues, performance problems, and stack-specific anti-patterns. Use this skill whenever the user wants to review code, debug a production issue, investigate a build failure, audit security, or check a PR before merging. Triggers on code review, review my code, debug…
ln-44-performance-optimizer
Profiles and improves a measured performance bottleneck; retains only verified improvements.
ai-diagnostic
A diagnostic framework that examines a problem across technology, processes, people, and business causes.