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.
git clone --depth 1 https://github.com/KevinZai/commanderWrote 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/commands/kevinzai/commander/ccc-refactor-clean)<a href="https://agentmods.dev/commands/kevinzai/commander/ccc-refactor-clean"><img src="https://agentmods.dev/badge/commands/kevinzai/commander/ccc-refactor-clean/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/commands/kevinzai/commander/ccc-refactor-clean"><img src="https://agentmods.dev/badge/commands/kevinzai/commander/ccc-refactor-clean.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.00043 | $0.01231 |
| Opus 5.5 | $0.00017 | $0.00492 |
| Sonnet 5.5 | $0.00009 | $0.00246 |
| Haiku 4.5 | $0.00004 | $0.00123 |
Grade A, and why
ccc-refactor-clean 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 1mo 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
89% identical to refactor-clean — 135 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 — 98 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/ccc-refactor-clean — remove dead code under test
CC Commander · /ccc-refactor-clean · detects dead code, sorts it by risk, deletes the safe items one at a time with a green test run after each, and reports what was removed.
Arguments
$ARGUMENTS: optional path to limit the scan. Default: the repository root.
What happens
-
Check the starting state.
git status --porcelainA revert in step 5 restores files from
HEAD, which would discard uncommitted edits. If the tree is dirty, ask with AskUserQuestion (Codex: plain-text question):- 🟢 Stop so I can commit first — nothing is changed.
- Continue on clean files only — files with uncommitted changes are excluded from deletion.
-
Name the test command and establish a baseline. Use the project's own script first (
npm test,pnpm test,pytest,go test ./...,cargo test, or theMakefile/justfiletarget). Run it. If the baseline is not green, report the failures and stop; dead-code removal needs a passing suite to prove anything. -
Detect dead code with the tools that fit the stack and are available (run through
npxonly when the project already uses npm):Tool Finds Command knip Unused exports, files, dependencies npx knipdepcheck Unused npm dependencies npx depcheckts-prune Unused TypeScript exports npx ts-prunevulture Unused Python code vulture <src>deadcode Unused Go code deadcode ./...cargo-udeps Unused Rust dependencies cargo +nightly udepsIf no tool is available, find exported names and count their references:
rg --no-filename -o -r '\$1' '^export (?:const|function|class|type|interface) (\w+)' <path> | sort -u rg -n --fixed-strings '<name>' --glob '!<defining-file>' <path>A name with zero references outside its defining file is a candidate.
-
Categorize every finding:
Tier Examples Action SAFE Unused utilities, test helpers, internal functions Delete in the loop below CAUTION Components, API routes, middleware Run the CAUTION checks in step 6 first DANGER Config files, entry points, type definitions, public package API Report only; do not delete
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.
- 1mo ago Changed 77b1ad05ce54
- 1mo ago Changed · +13 lines · +29 tokens per session 4bd808bfa585
- 3mo ago First seen · 85 lines · 14 tokens per session scan A faf32cd5e23a
ccc-refactor-clean is a command published in the GitHub repository KevinZai/commander (6 stars, last pushed today), licensed MIT. It adds 43 tokens to every session and 1,231 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 89% identical to refactor-clean, differing in 135 lines, and is treated as a copy.
ccc-refactor-clean compared with commands from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| ccc-refactor-cleanKevinZai/commander | Command | 6 | today | MIT | A | 43 | Claude Code |
| quick-fixdamusix/atomic-claude | Command | 117 | yesterday | MIT | A | 73 | Claude Code |
| dashboardskullninja/coco-workflow | Command | 7 | 1mo ago | MIT | A | 22 | Claude Code |
| dare-bugfix-designdewtech-technologies/dare-method | Command | 5 | 4mo ago | MIT | A | 0 | Claude Code |
| run-reviewBandersnatch0x/design-playbook | Command | 4 | 2d ago | none | A | 24 | Claude Code |
| doctorgf-labs/claude-toolbox | Command | 2 | 20d ago | MIT | C | 7 | Claude Code |
| doctoralexander-vyh/claude-profiles | Command | 1 | 23d ago | GPL-3.0 | A | 9 | Claude Code |