
Dry Refactoring
- 713 installs
- 6k repo stars
- Updated August 4, 2026
- kucherenko/jscpd
Helps with code review & quality tasks.
About
dry-refactoring is a Claude Code skill for code review & quality. It helps solo builders move faster with AI-assisted development.
- dry-refactoring
- Code Review & Quality
- AI-coding skill
Dry Refactoring by the numbers
- 713 all-time installs (skills.sh)
- +150 installs in the week ending Aug 2, 2026 (Skillselion tracking)
- Ranked #188 of 1,352 Code Review & Quality skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/kucherenko/jscpd --skill dry-refactoringAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 713 |
|---|---|
| repo stars | ★ 6k |
| Last updated | August 4, 2026 |
| Repository | kucherenko/jscpd ↗ |
What it does
Helps with code review & quality tasks.
Files
dry-refactoring
Guided workflow to eliminate copy-paste duplication in source code. Use after running jscpd to detect clones.
Prerequisites
First, run jscpd to identify duplications:
npx jscpd --reporters ai <path>See the [jscpd](../jscpd/SKILL.md) skill for full option reference.
Workflow
1. Run jscpd with --reporters ai on the target path 2. Parse each clone line to identify the two duplicated locations (file + line range) 3. Read both code fragments from the source files 4. Understand what the duplicated code does 5. Design a refactoring: extract a shared function, class, module, or constant 6. Apply the refactoring — update both locations and all other usages 7. Re-run jscpd to confirm the clone is eliminated 8. Repeat for remaining clones, highest-impact first
Refactoring Strategies
Extract function — when the duplicate is a block of logic:
// Before: same block in two places
// After: shared function called from both placesExtract module/utility — when the duplicate spans multiple files in different domains:
// Move shared logic to a shared utility file and import itExtract constant or config — when the duplicate is repeated data or configuration.
Template/base class — when the duplicate is structural (e.g., repeated class shape).
Always ensure:
- All call sites are updated, not just the two reported by jscpd
- Tests still pass after refactoring
- The extracted abstraction has a clear, descriptive name
Tips
- Start with clones that have the highest line count — they have the most impact
- A clone between test files may indicate a missing test helper
- Clones across unrelated modules may signal a missing shared utility
- Use
--min-lines 10to filter noise and focus on meaningful duplications