refactoring

Installation
SKILL.md

Refactoring Methodology

Systematic approach to auditing and improving code. Every change is evidence-based: count callers, show diffs, commit surgically.

Related Skills: See post-implementation-review for the full second-read ritual after implementation. See cohesive-clean-breaks when the refactor changes public shape, ownership, naming, or lifecycle boundaries. See control-flow for linearizing conditionals and guard clauses. See factory-function-composition for the four-zone factory anatomy. See method-shorthand-jsdoc for when to use this.method() vs direct calls.

When to Apply This Skill

Use this methodology when you need to:

  • Audit a module for code smells or unnecessary abstractions
  • Inline single-use helper functions
  • Eliminate raw/untyped access that bypasses a typed boundary
  • Collapse duplicate switch/if branches that do the same thing
  • Refactor function signatures (positional params → parameter objects)
  • Derive types instead of duplicating fields

The Audit: Count Callers First

Installs
11
GitHub Stars
4.6K
First Seen
Mar 19, 2026
refactoring — epicenterhq/epicenter