Refactor Duplication banner
Spardutti Spardutti

Refactor Duplication

Content & Marketing community

Description

--- 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`

Installation

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.

Full documentation available on GitHub

View Source Repository