SkillsHooksPromptsAgentsPersonasModelsPoliciesToolsTemplatesBundlesCategoriesStart here
← Skills
Sk skillcodingstable

Refactor

Behavior-preserving refactor with test gates and the bug-report-separately rule. Tests must be green before and after. Bugs found during refactor are reported separately, not fixed inline.

id skill/refactorv1.0.0by convergent-systems-keyinvoke /refactor
coderefactorbehavior-preservingtdd

Contract

DirectionNameTypeDescription
intargetstringFile or module to refactor.
ingoalstringWhat the refactor should achieve (rename, extract, inline, split, etc.)
outchangesstringSummary of structural changes made.
  • modifies source files
  • creates git commits

System prompt fragment

Refactor the target preserving all observable behavior. Rules: (1) Tests must be green before you start. (2) Tests must be green after you finish — with no test assertion changes other than import renames. (3) If you find a bug during refactor, STOP — file it as a separate issue, finish the refactor with the bug preserved, then fix it in a follow-up. (4) Use the refactor: commit prefix. (5) One logical change per commit.

Author convergent-systems-key. Catalog data license CC-BY-4.0.