
dry-refactoring
Guided workflow to eliminate copy-paste duplication detected by jscpd
by kucherenkoFree
Description
dry-refactoring is an agent skill from the jscpd project, listed on skills.sh. It gives an AI agent a guided workflow for removing copy-paste duplication that jscpd has found in source code. The skill starts from a jscpd report: it asks you to run jscpd with its AI reporter first, and, for codebases that mix related formats such as JavaScript and TypeScript, to add a cross-format option so clones across both are caught. On larger projects it recommends a summary mode that lists refactoring hotspots, the top files and folders with the share of each file that is duplicated. The workflow covers exact clones, renamed clones and near-miss clones, and it names the refactoring steps to choose from, such as extracting a function or parameterizing differences between copies. A skill is a SKILL.md file of instructions, sometimes with scripts and reference notes, that an AI agent loads only when a task calls for it, so the agent follows the same steps each time. The skill is listed as free on skills.sh, and its security audits show Pass for Gen Agent Trust Hub, Socket and Snyk. It is useful for teams that want to tidy duplicated code after a jscpd scan.…
Highlights
- Works from a jscpd duplication report
- Handles exact, renamed and near-miss clones
- Hotspot summary for large codebases
- Suggests extract and parameterize refactors
Ratings & Reviews
No ratings yet
Be the first to rate dry-refactoring.
People also visit
dry-refactoring FAQ
What does the dry-refactoring skill do?
It guides an AI agent through removing copy-paste code that jscpd has detected, one clone at a time.
How do I install it?
Run: npx skills add https://github.com/kucherenko/jscpd --skill dry-refactoring
Is it free?
Yes. The skill is listed as free on skills.sh.
Do I need jscpd first?
Yes. The skill starts from a jscpd report, which you run with npx jscpd and its AI reporter.
Which security audits does it pass?
Gen Agent Trust Hub: Pass. Socket: Pass. Snyk: Pass.
What are the best dry-refactoring alternatives?
Popular alternatives to dry-refactoring include jscpd, indexion-refactor and cqfn/aibolit-mcp-server. See all dry-refactoring alternatives

















