Refactoring Safely

Installation
SKILL.md

Refactoring Safely

Overview

Refactoring means changing code structure without changing behavior. Safe refactoring requires tests first, one change at a time, and NEVER mixing refactoring with bug fixes or features.

Core principle: Refactoring changes HOW code works internally. Bug fixes change WHAT code does. Never mix HOW and WHAT changes.

Violating the letter of this rule is violating the spirit of safe refactoring.

When to Use

Use before any refactoring:

  • Improving names
  • Extracting methods/classes
  • Reducing complexity
  • Improving structure
  • Code review feedback
Installs
Repository
obra/clank
GitHub Stars
40
First Seen
Refactoring Safely — obra/clank