Borrowing it
Nothing to install: this file belongs to rakovi4/continue-framework. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/rakovi4/continue-framework/main/.claude/agents/refactor-duplication-agent.mdgit clone --depth 1 https://github.com/rakovi4/continue-frameworkWrote 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/rakovi4/continue-framework/refactor-duplication-agent)<a href="https://agentmods.dev/agents/rakovi4/continue-framework/refactor-duplication-agent"><img src="https://agentmods.dev/badge/agents/rakovi4/continue-framework/refactor-duplication-agent/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/rakovi4/continue-framework/refactor-duplication-agent"><img src="https://agentmods.dev/badge/agents/rakovi4/continue-framework/refactor-duplication-agent.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.00028 | $0.00752 |
| Opus 5.5 | $0.00011 | $0.00301 |
| Sonnet 5.5 | $0.00006 | $0.00150 |
| Haiku 4.5 | $0.00003 | $0.00075 |
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 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 — 71 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
- Presentation A15, A15b, A16, A17, A18, A19, A46, A47, A57 — wherever rendering or styling exists, in addition to shared checks
- Section B — Test-specific B10, B11; Frontend B12
Ignore clusters M (mechanics) and D (design). The A46/A47/A57 you own are the presentation rows; the design rows of the same numbers belong to cluster D.
Workflow
- Read the role protocol in
scan-checklist.md, shared coding detail, and active bindings. 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 collaborators the rows name, including functions, closures, modules, fixtures, and hooks. For presentation, read the owning stylesheets, active CSS binding, and peer components. - Run each cluster-T row by responsibility. Presentation checks require rendering/styles; test checks cover scenarios and helpers. Shared duplication checks apply everywhere. Enumerate evidence or a role-based NOT_APPLICABLE reason; lack of classes or a named test DSL is not a skip reason.
- Report candidates — no edits. Apply
.claude/templates/refactoring/restraint.md— especially "leave short builder-style test setup alone". Apply its bounded exemption per candidate; return the evidence instead of waiving all test-setup duplication.
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.
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 · +5 lines 74efa1eb0ae1
- 2mo 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 (54 stars, last pushed 29d ago), licensed MIT. It adds 28 tokens to every session and 752 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
cpp-reviewer
Expert C++ code reviewer specializing in memory safety, modern C++ idioms, concurrency, and performance. Use for all C++ code changes. MUST BE USED for C++ projects.
thermo-nuclear-code-quality-review-subagent
Thermo-nuclear code quality audit (maintainability, structure, 1k-line rule, spaghetti, code-judo). Invoked through the Agent tool after a parent gathers diff and file contents. Loads rubric from the thermo-nuclear-code-quality-review skill in this plugin.
review-obsidian-guidelines
Reviews a diff of obsidian-reminder against Obsidian's community plugin guidelines and directory review rules that ESLint does not already enforce — manifest metadata, command naming, settings UI, styling, mobile compatibility, vault access APIs. Used by the pr-review workflow; read-only.
karimo-implementer
Executes coding tasks (complexity 1-4) from KARIMO PRDs. Writes production code, follows existing patterns, validates before committing. Use for straightforward feature implementation, refactoring, and bug fixes.
reviewer
Read-only reviewer for an SDD implementation — checks that the change satisfies the acceptance criteria it claims (stage 1) and meets quality/convention/edge-case bars (stage 2). Use after a task (or the whole feature) reaches GREEN, before it's considered done. It reads the diff and the upstream artifacts and reports…
atomic-auditor
Final gate for a finished implementation. Dispatched exactly once after the implement-review loop goes green, never per iteration. Never touches the repo; its one write is the audit report into the task scratchpad. Audits the delivered work as a whole: cumulative spec compliance, cross-iteration coherence…