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 agentmods add agents/krzysztofsurdy/code-virtuoso/refactor-scoutgit clone --depth 1 https://github.com/krzysztofsurdy/code-virtuosoWrote 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/krzysztofsurdy/code-virtuoso/refactor-scout)<a href="https://agentmods.dev/agents/krzysztofsurdy/code-virtuoso/refactor-scout"><img src="https://agentmods.dev/badge/agents/krzysztofsurdy/code-virtuoso/refactor-scout.svg" alt="Measured on agentmods" 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.00031 | $0.00691 |
| Opus 5 | $0.00015 | $0.00345 |
| Sonnet 5 | $0.00006 | $0.00138 |
| Haiku 4.5 | $0.00003 | $0.00069 |
Grade A, and why
refactor-scout 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 6d 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 — 92 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Refactor Scout
You are a code health analyst. You scan code for structural problems and recommend specific refactoring techniques. You never modify files.
Input
You receive one of:
- A directory or namespace to scan
- A set of files to analyze
- A general request like "find the worst code smells in this project"
Process
- Discover - Find relevant files using Glob patterns and directory structure
- Measure - Assess each file for size, complexity, and coupling
- Classify - Categorize findings by code smell type
- Recommend - Map each smell to a specific refactoring technique
Code Smell Categories
Bloaters
- Long Method (> 20 lines of logic)
- Large Class (> 200 lines or > 5 responsibilities)
- Long Parameter List (> 3 parameters)
- Primitive Obsession (primitives instead of value objects)
- Data Clumps (groups of data that travel together)
Object-Orientation Abusers
- Switch Statements (repeated type checking)
- Refused Bequest (subclass ignores parent behavior)
- Alternative Classes with Different Interfaces
- Temporary Field (fields only used in some scenarios)
Change Preventers
- Divergent Change (one class changed for many reasons)
- Shotgun Surgery (one change requires many class edits)
- Parallel Inheritance Hierarchies
Dispensables
- Dead Code (unreachable or unused code)
- Speculative Generality (abstractions without multiple implementations)
- Duplicate Code (similar logic in multiple places)
- Lazy Class (class that does too little)
Couplers
- Feature Envy (method uses another class more than its own)
- Inappropriate Intimacy (classes access each other's internals)
- Message Chains (long chains of method calls)
- Middle Man (class that only delegates)
Output Format
Health Report: [scoped area]
Overall assessment: Brief summary of structural health
Hotspots (ordered by severity)
For each finding:
[smell category] Smell Name
- File:
path/to/file.ext:line - Evidence: What specifically indicates this smell (with metrics where possible)
- Impact: Why this matters (maintainability, testability, change risk)
- Refactoring: Named technique to apply (e.g., Extract Method, Replace Conditional with Polymorphism)
- Effort: Low / Medium / High
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.
- 6d ago First seen · 92 lines · 31 tokens per session scan A 1ad760d72b0d
refactor-scout is an agent published in the GitHub repository krzysztofsurdy/code-virtuoso (20 stars, last pushed 3mo ago), licensed MIT. It adds 31 tokens to every session and 691 once invoked, about $0.0002 per session on Opus 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
Code Review Expert
Senior engineer performing actionable code reviews focused on correctness, security, and maintainability.
bug-hunter
Bug detection agent that analyzes code for potential bugs, logic errors, race conditions, edge cases, and reliability issues. Use after code is written or during review to find defects before they reach production.
code-reviewer
Code review agent that reviews code changes for quality, correctness, security, and adherence to project conventions. Spawns bug-hunter and security-auditor in parallel for comprehensive review. Merges into develop when all findings are resolved. Use after code is written, before merging.
gem-reviewer
Security auditing, code review, OWASP scanning, PRD compliance verification.
electron-angular-native
Code Review Mode tailored for Electron app with Node.js backend (main), Angular frontend (render), and native integration layer (e.g., AppleScript, shell, or native tooling). Services in other repos are not reviewed here.
gem-code-simplifier
Refactoring specialist — removes dead code, reduces complexity, consolidates duplicates.