Refactor

ALWAYS use this skill before refactoring any code. It prevents over-refactoring and wrong refactoring by requiring an assessment first — catching code that is already clean, problems that are architectural rather than code-level, and missing test coverage that must exist before touching business logic. Trigger on: refactor, clean up, simplify, reduce complexity, code smells, messy code, break up function, reduce nesting, remove dead code, file too big, extract method, too many parameters, duplicated code, cognitive complexity, god class, magic numbers. Also trigger when a linter or static analysis tool flags complexity issues. Language-agnostic.

svyatov 1065a53 9 files · 30.1 KB Updated

File contents

svyatov/agent-toolkit/tree/main/plugins/refactor/skills/refactor commit 1065a533e3

Frequently asked questions

npx skillmds@latest add svyatov/refactor