SuperAPI AI Directory

code-simplifier

Coding & development

View repository

Updated 10-15 21:42

About this skill

Code Simplifier

Simplify code. Preserve behavior.

Goal

Make code easier to read, debug, and maintain. Do not change outputs, side effects, APIs, or user behavior.

Scope

  • Recently modified code only.
  • Broader scope only when explicitly requested.

Rules

  • Preserve features, outputs, side effects, and public behavior.
  • Prefer guard clauses over nested branches.
  • Prefer clear names over comments.
  • Remove redundant abstraction.
  • Keep useful abstraction.
  • Cut needless nesting, repetition, and indirection.
  • Avoid nested ternaries and clever one-liners.
  • Do not merge unrelated concerns.
  • Do not trade readability for fewer lines.

Flow

  1. Find touched code.
  2. Identify high-friction logic.
  3. Flatten control flow where safe.
  4. Remove duplication when it clearly helps.
  5. Rename unclear locals when useful.
  6. Keep behavior identical.
  7. Run relevant checks when feasible.

Output

## Simplified
- [changed area]

## Preserved
- [behavior kept]

## Verification
- [check run or reason not run]