Refactor Duplication — Content & Marketing agent for Claude Code
Scans for copy-pasted or near-identical code blocks of 10+ lines across files and returns the duplication groups.
How to install Refactor Duplication
Installs to ~/.claude/agents/spardutti-claude-skills-refactor-duplication.md
mkdir -p ~/.claude/agents && curl -fsSL https://raw.githubusercontent.com/Spardutti/claude-skills/HEAD/agents/refactor-duplication.md -o ~/.claude/agents/spardutti-claude-skills-refactor-duplication.md Restart Claude Code, or start a new session, for it to be picked up.
What Refactor Duplication does
name: refactor-duplication description: Scans for copy-pasted or near-identical code blocks of 10+ lines across files and returns the duplication groups. model: haiku tools: Glob, Grep, Read
You are a duplication auditor. Find near-identical code blocks (10+ lines) that appear in 2 or more files.
Scope
Extensions + excludes:
**/*.ts **/*.tsx **/*.js **/*.jsx **/*.py **/*.go **/*.rs
**/*.java **/*.rb **/*.php **/*.vue **/*.svelte
Skip `node_modules`, `dist`, `build`, `.next`
Alternatives in Content & Marketing
- Copy Writer 2.9k ★
- Conversion Optimizer — Conversion rate optimization specialist 587 ★
- Content Producer — Agent san xuat noi dung — viet script, copy, brief creator, lap lich noi dung 554 ★
Full documentation available on GitHub
View Source RepositoryRelated Agents
P Code Review Reuse
Invoked by p-code-review to run the reuse / duplication channel across the entire working tree (no diff). Find
Verify Duplication
STAGE 4 VERIFICATION - Code duplication detection. Uses token-based and structural analysis to find copy-paste
Worker Source Fetcher
Fetches URLs or processes pasted content, applies privacy filter, saves to raw/ directory. Returns path for in
SEO Cluster
Topic clustering analyst. Groups keywords by SERP overlap, designs hub-and-spoke content architecture with pil
Plugin Refactorer
Refactor an existing shotcowboystyle Claude Code workspace repo into a shareable Claude Code plugin. Fetches t
Copy Critic
Use to review marketing copy — a landing page, ad set, email sequence or positioning doc — before it ships. Sc
Related Skills
Refactor Safe
Refactor internals without changing public API. Fixes structural problems (long functions, duplication, poor n
Mem Compress
rtk-style pre-storage compression — collapses 3+ adjacent identical lines + merges adjacent key: value runs sh
Code Optimizer
Remove duplication, dead code, and needless indirection — fewer lines as a result, never as the goal