بنقرة واحدة
dry-refactoring
Guided workflow to eliminate copy-paste duplication detected by jscpd-rs.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Guided workflow to eliminate copy-paste duplication detected by jscpd-rs.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | dry-refactoring |
| description | Guided workflow to eliminate copy-paste duplication detected by jscpd-rs. |
Guided workflow to eliminate copy-paste duplication in source code. Use after
running jscpd-rs to detect clones.
First, run jscpd-rs to identify duplications:
npx jscpd-rs --reporters ai <path>
See the jscpd-rs skill for option details.
jscpd-rs with --reporters ai on the target path.jscpd-rs to confirm the clone is gone or reduced.Extract function: use when the duplicate is a repeated logic block.
Extract module or utility: use when the duplicate spans files that can depend on a shared helper.
Extract constant or config: use when the duplicate is repeated data, configuration, selectors, strings, or magic values.
Template or base abstraction: use when the duplicate is structural and the shared shape is stable.
npx jscpd-rs --reporters ai --min-lines 10 <path>
npx jscpd-rs --reporters json --output /tmp/jscpd-report <path>