Refactoring And Reviewing Code

Use when asked to refactor, clean up, restructure, simplify, review, untangle, decouple, flatten, or improve existing code without changing its behavior; when diagnosing code smells; when preparing a codebase for a new feature by first making the change easy; or when the user says "this is messy / confusing / hard to follow / too complex" and wants it improved. Trigger on "refactor", "clean up", "restructure", "simplify", "review this code", "code smell", "tidy", "improve", "untangle", "decouple", "flatten", "extract", "rename", or when the user pastes code and asks what is wrong with it, what could be better, or how it could be more readable. Do NOT use when writing new code from scratch (use writing-good-code); do NOT use for the specific question of whether one abstraction is worth extracting (use abstraction-quality). When a task genuinely requires both behavior change and cleanup, refactor first under this skill, commit, then switch to writing-good-code for the behavior change.

terion-labs 6b5ea44 6 files · 59.0 KB Updated

File contents

terion-labs/skills/tree/main/skills/refactoring-and-reviewing-code commit 6b5ea447e9

Frequently asked questions

npx skillmds@latest add terion-labs/refactoring-and-reviewing-code