Skip to Content
Skillsnav-simplify

nav-simplify

Simplifies recently modified code for clarity, consistency, and maintainability while preserving exact functionality.

Triggers

Natural-language phrases that auto-invoke the skill:

  • “simplify this code”
  • “review for clarity”
  • “clean up recent changes”
  • “refactor for readability”
  • “simplify modified files”

Also auto-invokes after implementation skills (backend-endpoint, frontend-component, database-migration) and any task with code changes. Skips docs-only or config-only changes.

What it does

  • Identifies modified files via git diff (or user-specified scope / session context).
  • Loads simplification config and project standards from CLAUDE.md before changing anything.
  • Flattens nested ternaries, reduces nesting past 3 levels with early returns, extracts helpers, and renames unclear variables.
  • Preserves functionality absolutely — clarity over brevity, never behavior changes.
  • Honors the auto_apply decision matrix: applies silently in autonomous flows, prompts per-file diff when interactive; skips entirely when invoked autonomously with auto_apply: false.
  • Optional ROI scoring gate skips low-value files based on cost/benefit math.

Example

"simplify this code"

The skill analyzes recently changed files, converts a nested ternary to an if-else chain, renames x to activeUserNames, and reports the changes by category with functionality preserved.