Spardutti

Refactor Duplication — Content & Marketing agent for Claude Code

Content & Marketing community

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

Terminal
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

Full documentation available on GitHub

View Source Repository