원클릭으로
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>