jscpd
Copy-paste detector for 220+ languages. Detect duplicated code and measure duplication percentages.
npx skills add kucherenko/jscpd --skill jscpd --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# jscpd Copy-paste detector for programming source code, supports 150+ languages. Use this skill to run jscpd and understand its output. ## Quick Start ```bash # Run with ai reporter (compact output optimized for agents) npx jscpd --reporters ai <path> # With ignore patterns npx jscpd --reporters ai --ignore "**/node_modules/**,**/dist/**" <path> # Scope to specific formats npx jscpd --reporters ai --format "javascript,typescript" <path> ``` ## AI Reporter Output Format The `ai` reporter produces compact, token-efficient output designed for agent consumption: ``` Clones: src/ foo.ts:10-25 ~ bar.ts:42-57 src/utils/helpers.ts:100-120 ~ src/utils/other.ts:5-25 --- 3 clones · 4.2% duplication ``` Each line represents one clone pair: - **Same file**: `path/file.ts 10-25 ~ 45-60` (shared path shown once) - **Same directory**: `shared/prefix/ file-a.ts:10-25 ~ file-b.ts:42-57` (common prefix factored out) - **Different paths**: `path/a.ts:10-25 ~ path/b.ts:42-57` ## Options | Option | Description | |--------|-------------| | `--reporters ai` | Use the AI-optimized reporter (compact clone list for agents) | | `--reporters html` | Generate HTML report | | `--reporters json` | Output JSON re
- Quick Start
- AI Reporter Output Format
- Options
- Cross-Format Clone Detection
- Configuration File
- Refactoring Duplicated Code
Run with ai reporter (compact output optimized for agents) npx jscpd --reporters ai <path> With ignore patterns npx jscpd --reporters ai --ignore "**/node_modules/**,**/dist/**" <path> Scope to specific formats npx jscpd --reporters ai --format "javascript,typescript" <path> One group: compare JavaScript and TypeScript files together npx jscpd --reporters ai --cross-formats "javascript,typescript" <path> Preset covering javascript, jsx, typescript, tsx npx jscpd --reporters ai --cross-formats "js-ts" <path>
What does the jscpd skill do?
Copy-paste detector for 220+ languages. Detect duplicated code and measure duplication percentages.
How do I install it?
Run `npx skills add kucherenko/jscpd --skill jscpd --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From kucherenko/jscpd, a repository with 5,966 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
