code-refactoring-patterns

Installation
SKILL.md

Code Refactoring Patterns

A comprehensive guide to refactoring code systematically while maintaining functionality and improving quality.

When to Refactor

  • Code smells detected (duplicated code, long functions, etc.)
  • Before adding new features to complex areas
  • After understanding improves ("now I see a better way")
  • When tests are in place
  • Performance optimization needed

Refactoring Rules

  1. Never refactor without tests: Write tests first if they don't exist
  2. Small steps: Make one change at a time
  3. Run tests after each change: Ensure nothing breaks
  4. Commit often: Each working refactor is a commit
  5. Don't mix refactoring with feature work: Separate concerns
Related skills

More from majiayu000/claude-skill-registry

Installs
1
GitHub Stars
303
First Seen
Feb 5, 2026