dry-refactor

Installation
SKILL.md

DRY Refactoring

Process

  1. Identify - Exact copies, similar patterns, parallel hierarchies, naming patterns (data1/data2, handleXClick)
  2. Analyze - Coupling, cohesion, frequency (Rule of Three: wait for 3+ occurrences), volatility
  3. Refactor - Choose technique below, extract incrementally, test after each step

Techniques

Extract Function - Same logic in multiple places

getFullName(user: User) => `${user.firstName} ${user.lastName}`

Extract Variable - Repeated expression

Related skills

More from paulrberg/dot-claude

Installs
3
GitHub Stars
73
First Seen
Jan 23, 2026