refactoring

Installation
SKILL.md

Refactoring Skill

Activate this skill when restructuring existing code, eliminating duplicates, modernizing patterns, decomposing monolithic functions, or pruning dead code.

Refactoring Law: Refactoring improves the internal structure of software without altering its external observable behavior.


1. Safety & Baseline Invariants

Before modifying any existing implementation:

  1. Verify Baseline Tests: Run existing test suites (npm test, pytest, cargo test) and confirm that all tests pass before making any changes.
  2. Preserve Public API Contracts: Never alter exported function signatures, route parameters, or database schemas without a documented deprecation plan and updating all internal call sites.
  3. Atomic, Incremental Changes: Refactor in small, verifiable steps. Never attempt large-scale rewrites in a single unverified commit.

2. Standard Refactoring Patterns

Installs
11
Repository
amanktyr/tailor
GitHub Stars
6
First Seen
Aug 17, 2026