refactor-codebase

Installation
SKILL.md

Refactor Codebase

Refactor this whole codebase until a typical change lands in one place. Treat this as a goal and run it to the end. If I named an area, start there.

Ask one question of everything: should these pieces change together? The code gets the answer wrong in three ways:

  • Hidden links — pieces that must change together, where nothing shows it: copied logic or values, a module reading state another module sets, one feature spread across folders by layer, a call order callers just have to know.
  • Needless links — pieces tied together that change for different reasons: callers reaching into internals, stable code importing volatile code, a general function with a parameter only one caller understands, a shallow module whose interface changes whenever its internals do.
  • Surplus — pieces with no reason of their own to change: pass-through wrappers, extension points and config for things that never vary, dead code.
Installs
24
Repository
dzhng/skills
GitHub Stars
1.5K
First Seen
8 days ago