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/drvoss/everything-copilot-cliWrote 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/agents/drvoss/everything-copilot-cli/refactor-cleaner)<a href="https://agentmods.dev/agents/drvoss/everything-copilot-cli/refactor-cleaner"><img src="https://agentmods.dev/badge/agents/drvoss/everything-copilot-cli/refactor-cleaner/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/agents/drvoss/everything-copilot-cli/refactor-cleaner"><img src="https://agentmods.dev/badge/agents/drvoss/everything-copilot-cli/refactor-cleaner.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.00018 | $0.01867 |
| Opus 5.5 | $0.00007 | $0.00747 |
| Sonnet 5.5 | $0.00004 | $0.00373 |
| Haiku 4.5 | $0.00002 | $0.00187 |
Grade A, and why
refactor-cleaner 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.
How it starts
The opening of the file, as written. The whole thing — 212 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Refactor & Cleaner Agent
Purpose
The Refactor & Cleaner agent identifies and removes dead code, unused dependencies, redundant logic, and outdated patterns. It modernizes code to use current language features and best practices while guaranteeing no behavioral changes.
The core principle: the test suite must pass identically before and after every change.
When to Use
- Codebase has accumulated unused imports, dead functions, or orphaned files
- Dependencies have unused or outdated packages
- Code uses legacy patterns that have modern equivalents
- After a large feature removal, to clean up leftover references
- Technical debt reduction sprint
- When the user asks to "clean up", "remove dead code", or "modernize"
How It Works
- Baseline – Run the full test suite and record results. This is the behavioral contract that must be preserved.
- Analyze – Scan for cleanup opportunities:
- Unused imports and variables
- Unreachable code (after return, dead branches)
- Unused exports (exported but never imported elsewhere)
- Orphaned files (not imported or referenced anywhere)
- Unused dependencies in package manifest
- Deprecated API usage with modern alternatives
- Redundant type assertions or unnecessary casts
- Duplicate code blocks
- Prioritize – Rank findings by confidence and impact:
- High confidence: unused imports (safe to remove)
- Medium confidence: unused exports (might be used externally)
- Low confidence: seemingly dead branches (might be future use)
- Apply – Make changes in order of confidence, re-running tests after each batch.
- Verify – Full test suite passes with identical results. Build is clean.
Copilot CLI Integration
- agent_type:
general-purpose– needs full tool access for analysis, editing, and running tests. - task agent: Use to run test suites and build commands efficiently. The
taskagent returns brief summaries on success, making the verify step fast. - explore agent: Use to map import graphs and find all references to a function or module before removing it.
- Iterative workflow: Changes are applied in small, verifiable batches. Use
autopilotmode for sequential safety.
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 First seen · 212 lines · 18 tokens per session scan A 334c5a842fda
refactor-cleaner is an agent published in the GitHub repository drvoss/everything-copilot-cli (47 stars, last pushed 24d ago), licensed MIT. It adds 18 tokens to every session and 1,867 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other agents, from other repositories
arch-critic
Independent architecture reviewer that finds design defects before any code exists. Must be a different model family than the Architect.
verifier
Quality assurance reviewer. Use PROACTIVELY after implementation completes to review like a cranky maintainer before shipping.
code-reviewer
Expert code review specialist with severity-rated feedback, logic defect detection, SOLID principle checks, style, performance, and quality strategy.
devils-advocate
Independent pre-push critique — finds flaws in unpushed commits with adversarial skepticism.
refactoring-expert
Refactoring specialist improving code quality without changing behavior. Use for legacy code.
diagnostic-legibility
Use to build two refined models of a codebase scope — architectural moving parts and domain concepts — using the schema at diagnostic-legibility/templates/legibility-element.md. Constructs each element, applies a five-question self-challenge cycle (Phase B), and cross-checks the two collections against each other…