dry-refactoring
CommunityEffortlessly remove code duplication with a DRY workflow.
AuthorYYH211
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Guides systematic code refactoring following the DRY (Don't Repeat Yourself) principle. Use when user asks to eliminate code duplication, refactor repetitive code, apply DRY principle, or mentions code smells like copy-paste, magic numbers, or repeated logic. Implements a 4-step workflow from identifying repetition to verified refactoring.
Core Features & Use Cases
- Identify Repetition: Detect obvious and semantic duplicates, magic numbers, and structural repetition.
- Abstract Logic: Encapsulate common behavior into functions, classes, or modules.
- Implement Reusable Units: Create reusable components or utilities.
- Verification & Validation: Confirm refactor correctness with tests.
Quick Start
Apply the four-step DRY workflow to a duplicated function example: identify duplication, extract common logic, replace duplicates with a single call, run tests to verify.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: dry-refactoring Download link: https://github.com/YYH211/Claude-meta-skill/archive/main.zip#dry-refactoring Please download this .zip file, extract it, and install it in the .claude/skills/ directory.