cc-refactoring-guidance

Installation
SKILL.md

cc-refactoring-guidance

Refactoring is behavior-preserving change to working code. Three rules govern it:

  • Fix first, then refactor — never in the same change; separate commits with a boundary between them.
  • Small changes need MORE rigor, not less — 1–5-line changes have the highest error rate.
  • Over half of changes fail the first attempt — review and test even "trivial" ones; the error rate is per change, not cumulative.
Rule Value Source
Small-change error rate Peaks at 1–5 lines Weinberg 1983
First-attempt success <50% for any change Yourdon 1986b
Review effect on 1-line changes 55% → 2% error rate Freedman and Weinberg 1982

Shared thresholds (routine length, parameters, cohesion): Read(${CLAUDE_PLUGIN_ROOT}/references/cc-foundations.md). The full 40-item refactoring checklist: Read(${CLAUDE_SKILL_DIR}/checklists.md).

Installs
6
GitHub Stars
369
First Seen
Mar 9, 2026
cc-refactoring-guidance — ryanthedev/code-foundations