mcpField
C
code-simplifier

code-simplifier

github.com/caarlos0Development22563 installsUpdated 1d ago
Repository

About code-simplifier

A code-review skill for simplifying a completed change while preserving its behavior and public interfaces. It guides repository- and language-specific checks before focused cleanup.

Key features

  1. 01Inspect changes against their base
  2. 02Preserve behavior and APIs
  3. 03Remove unnecessary abstractions
  4. 04Follow repository language guides
  5. 05Avoid unrelated cleanup

Use cases

  1. 01Simplify code after implementation
  2. 02Remove code orphaned by a change
  3. 03Review comments and documentation made inaccurate
  4. 04Keep refactoring within a focused diff

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/caarlos0/dotfiles --skill code-simplifier

After installing, type/code-simplifierin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

languages/
css.md
go.md
javascript.md
python.md
rust.md
typescript.md

Details

From the project README

Code Simplifier

Run after the behavior is correct. Repository instructions and correctness or language specialists take precedence; output-style skills affect presentation only.

Scope

Inspect only the current change against its base. Follow references outside the diff only to remove code orphaned by this change or text made false by it.

Read repository instructions and the matching guide under languages/:

  • TypeScript: languages/typescript.md
  • JavaScript: languages/javascript.md
  • Go: languages/go.md
  • Rust: languages/rust.md
  • Python: languages/python.md
  • CSS: languages/css.md

Pass

  • Preserve APIs, signatures, outputs, and behavior.
  • Remove unnecessary indirection, one-use abstractions, repeated branches, and comments that restate code.
  • Prefer clear statements over clever expressions.
  • Keep small intentional duplication when extraction would obscure behavior.
  • Use the standard library instead of adding a dependency.
  • Keep visibility private unless callers require otherwise.
  • Update comments, docs, errors, and names made false by the change.
  • Never add comments that explain the change, such as what was removed, renamed, or done differently before. That belongs in the commit message or PR description. Delete such comments if present.
  • Keep comments short and only for what the code cannot show, such as a hidden constraint or a non-obvious reason. Do not explain self-explanatory code.
  • Search the repository before deleting apparently unused code; account for tests, registration, reflection, configuration keys, and public consumers.
  • Update tests only when needed to preserve coverage after a legitimate refactor. Do not weaken assertions or alter expected behavior.

Do not reorder imports, mix unrelated cleanup into the diff, or redesign a working API. If simplification materially expands the diff, leave the code alone and explain why.

Use validation already run for the implementation. Run an additional targeted check only when this pass changes something not covered by it. Never stage or commit.

Comments

Markdown supported