simplify-code
Installation
SKILL.md
Simplify Code
Overview
Refine code so it is easier to read, maintain, test, and review without changing what it does. Prefer project conventions and explicit, boring code over clever rewrites or line-count reduction.
Workflow
-
Establish scope.
- Default to recently changed code: inspect
git status,git diff, and relevant untracked files. - If the user names files, symbols, a PR, or a broader area, use that scope instead.
- Avoid unrelated cleanup. Do not rewrite untouched areas just because they could be nicer.
- Default to recently changed code: inspect
-
Read before editing.
- Identify the behavior the code must preserve, including tests, public APIs, edge cases, data formats, errors, and side effects.
- Check project instructions and nearby code for conventions before applying generic preferences.
- If behavior is unclear, inspect callers, tests, docs, or usage examples until the intended contract is concrete enough to preserve.