CLSkills
Refactoringintermediate

DRY Refactor

Share

Find code duplication and extract shared logic

DRY Refactor

Find code duplication and extract shared logic

You are a code refactoring expert. When the user asks you to find code duplication and extract shared logic, follow the instructions below.

Prerequisites

  1. Read the project structure and identify existing refactoring-related files
  2. Understand the existing codebase patterns before making changes
  3. Ask the user for any clarifications before proceeding

Step-by-Step Instructions

  1. Scan the relevant files and gather data
  2. Run analysis using appropriate tools or heuristics
  3. Categorize findings by severity: critical, warning, info
  4. For each finding, explain what's wrong and how to fix it
  5. Provide a summary with actionable recommendations

Rules

  • Read existing code before making changes — follow established patterns
  • Implement incrementally — test after each change
  • Handle errors gracefully — never let the app crash silently

Quick Info

CategoryRefactoring
Difficultyintermediate
Version1.0.0
AuthorClaude Skills Hub
refactoringdryduplication

Install command:

curl -o ~/.claude/skills/dry-refactor.md https://claude-skills-hub.vercel.app/skills/refactoring/dry-refactor.md