01
It starts by itself
weekly duplication scan. Runs in GitHub Actions or cron.
- ↻ weekly duplication scan
0 7 * * 1
Copy-pasted code stops growing.
Install the jscpd skill and make it a habit: follow https://gethabit.dev/skills/kucherenko/jscpd.md
3K installs6K starsMIT licenceSource on GitHub ↗

jscpd
by kucherenko · 3K installs
The skill
The jscpd skill runs the jscpd copy-paste detector across 220+ languages, finds exact, renamed and near-miss clones, and ranks refactoring hotspots with a codebase summary.
Only when you ask.
The habit
Copy-pasted code stops growing.
↻ Runs by itselfweekly duplication scan
When does it start? How does it check its work? What does it remember?
One scan per run, at most one extra noisy pass and the top 10 hotspots.
Open the log to get the last duplication share and hotspot files.
Run npx jscpd --reporters ai --summary --no-tips with --ignore for node_modules and dist.
Run with --threshold so the scan exits with an error when duplication is too high.
If exact clones are handled, run one --ignore-identifiers --min-tokens 70 pass and treat hits as leads.
Pick the large files with a high dup% from the summary as refactoring targets.
Pass the top targets to the dry-refactoring skill for a guided cleanup.
Save the share, clone count, flags used and top files for the next run.
It writes only in its own folder and asks you before anything goes out.
Read both lists. If the left one sounds like you, the jscpd skill helps.
Not until the team has reviewed what those noisy passes report. Gate on exact clones first.
No. It finds and ranks them and hands targets to the dry-refactoring skill.
The ai reporter, a compact clone list with a duplication share at the end.
Copy the prompt at the top into your agent. It installs the skill from kucherenko/jscpd and sets up the habit. Or run npx skills add kucherenko/jscpd --skill jscpd.
Yes. It is published under MIT. Habit is free too.
Install the jscpd skill and make it a habit: follow https://gethabit.dev/skills/kucherenko/jscpd.md
All kucherenko skills →More code skills →
Works in
Made by kucherenko, published under MIT. Habit links to the original and never changes it. Is this your skill?