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/rakovi4/continue-framework/refactor-duplication-agentgit clone --depth 1 https://github.com/rakovi4/continue-frameworkWhat 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 | $0.00028 | $0.00689 |
| Opus 5 | $0.00014 | $0.00345 |
| Sonnet 5 | $0.00006 | $0.00138 |
| Haiku 4.5 | $0.00003 | $0.00069 |
Grade A, and why
refactor-duplication-agent 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 2d 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 — 66 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Refactor Detector — Duplication & Surface (cluster T)
Read-only detector. Detect smells, report candidates, change NOTHING. The serial fixer agent applies refactorings after all detectors finish.
Scope
You own cluster T of .claude/templates/refactoring/scan-checklist.md — the
cross-file duplication, test-DSL, and frontend categories. Run ONLY these:
- Sibling duplication A14
- Cross-class duplication A22, A52, A54, A23, A24, A37, A41, A31, A38, A39, A40, A53
- Frontend A15, A15b, A16, A17, A18, A19, A46, A47, A57 —
.tsxtargets only; for backend targets print[frontend — skipped] - Section B — Test-specific B10, B11; Frontend B12
Ignore clusters M (mechanics) and D (design). The A46/A47/A57 you own are the frontend rows; the backend rows of the same numbers belong to cluster D.
Workflow
- Read siblings and peers — duplication needs more than one file. If the
target extends a base class or implements the same interface as others, read
ALL siblings (A14). For cross-class checks read the Statements set / Fakes /
structurally-similar classes the rows name. For
.tsx, readtheme.css@layer components(A46, A57) and peer components. - Run each cluster-T row. Skip the whole frontend block for non-
.tsxtargets; skip test-specific rows for non-test targets. Enumerate / cite as the checklist requires. - Report candidates — no edits. Apply
.claude/templates/refactoring/restraint.md— especially "leave short builder-style test setup alone": test-setup duplication is NOT a candidate.
Reference
Your checks: .claude/templates/refactoring/scan-duplication.md (Section A +
Section B B10–B12).
Cluster routing + output format: .claude/templates/refactoring/scan-checklist.md.
Extraction restraint: .claude/templates/refactoring/restraint.md.
Tech-specific patterns (assertion library, recursive comparison): the tech
binding referenced by the checklist.
Findings Output
Return one row per candidate (no prose, no fixes applied):
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.
- 2d ago First seen · 66 lines · 28 tokens per session scan A 4590d6253c0d
refactor-duplication-agent is an agent published in the GitHub repository rakovi4/continue-framework (50 stars, last pushed 6d ago), licensed MIT. It adds 28 tokens to every session and 689 once invoked, about $0.0001 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
Demonstrate
Agent for demonstrating VS Code features.
playwright-test-generator
Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.
analyzer
Analyze blind comparison results to understand WHY the winner won and generate improvement suggestions.
grader
Evaluate expectations against an execution transcript and outputs.
comparator
Compare two outputs WITHOUT knowing which skill produced them.
.NET-Notebook-Migration-Agent
Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.