Skip to Content
MeowKit
Skills

mk:simplify

Phase 3.5 step that removes dead code and reduces complexity in the current diff without changing behaviour.

Source.claude/skills/simplify/SKILL.md
Ownerdocs
Runtimeclaude-code
Riskmedium

What it does

mk:simplify runs after the build is green and before verification and review. It shrinks the code in the current diff and must not change behaviour: every simplification has to pass the same tests as before, and one that fails is reverted.

When not to use it

For ad-hoc quality review outside the current diff, use mk:clean-code. Simplify only touches code in the diff.

Usage

/mk:simplify [file_or_directory]

What it looks for

ActionTargets
RemoveDead code, commented-out code, wrappers that add nothing, interfaces with one implementation, null checks a guard already covers
SimplifyNesting three or more levels deep (use guard clauses), functions over 50 lines, logic duplicated in three or more places, complex conditions (name them)
Leave aloneWorking code that is only written differently from how you would write it, performance-tuned code, anything outside the diff

Steps

  1. Scan the changed files for complexity.
  2. List each change with a before and after.
  3. Apply them one at a time.
  4. Run the full test suite after each change, not in a batch.
  5. Report what was simplified and why.

Gotchas

  • Check string references before deleting code that looks dead. It may be used through reflection or a dynamic import.
  • Two copies do not justify a shared utility. Wait for three.
  • Changing an exported signature is a breaking change, not a simplification.
  • Leave test helpers and fixtures alone. They favour readability over DRY.

On this page