What problem does it solve?
Projects often accumulate duplicated code blocks, creating maintenance headaches and drift. This Skill scans code across files to surface DRY violations and proposes targeted extractions to improve long-term readability and reuse.
Core Features & Use Cases
- Cross-file duplicate detection: identifies exact and near-duplicate code blocks across a codebase.
- Refactoring guidance: suggests ownership for shared code and a candidate function signature for the extracted helper.
- Reporting & metrics: summarizes total blocks found, affected files, and recommended extractions to guide code reviews.
- Use Case: when consolidating common utilities into a shared module, use this Skill to surface candidates for extraction and a plan to implement them.
Quick Start
Run /trw-dry-check [file-patterns...] to scan the repository for duplicated code patterns and generate a refactoring plan.