code-simplifier

Simplify modified code while preserving behavior and interfaces.

15|4|Updated Apr 25, 2026
One-click install
npx skills add https://github.com/yz5e/agent-skills --skill code-simplifier-yz5e
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-simplifier
Source: https://github.com/yz5e/agent-skills/tree/main/skills/code-simplifier
Command: npx skills add https://github.com/yz5e/agent-skills --skill code-simplifier-yz5e

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Simplify recently written or modified code for clarity, reuse, and maintainability without changing behavior. Apply three review lenses: reuse, quality, and efficiency. Use when the user asks to simplify, clean up, refine, polish, or make code clearer; after a feature, bug fix, or refactor leaves code working but harder to read; or when changed code feels too nested, repetitive, or inconsistent with the surrounding project style.

Core Features & Use Cases

  • Scope-first simplification to target touched regions and files.
  • Three-lens review (reuse, quality, efficiency) to improve readability while preserving behavior.
  • Non-deviating changes rule: preserve public interfaces, validation, and error handling; avoid unnecessary API changes.

Quick Start

Provide a concise plan and apply a single-pass simplification to the touched code while preserving behavior.

Frequently Asked Questions about code-simplifier

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I simplify code without changing behavior?

To simplify code without changing behavior, apply a single-pass review to touched files using reuse, quality, and efficiency lenses. This refines readability while preserving existing public interfaces, validation, and error handling.

When should I refactor code for readability and maintainability?

Refactor code for readability and maintainability when recently modified code feels too nested, repetitive, or inconsistent with project style. This is ideal after a feature, bug fix, or refactor leaves working code harder to read.

What is the best way to clean up recently modified code?

The best way to clean up recently modified code is scope-first simplification targeting touched regions. It applies a three-lense review for reuse, quality, and efficiency to improve clarity without deviating from existing behavior.

Can I refine code across multiple files without breaking interfaces?

Yes, you can refine code across small multi-file edits. The simplification process explicitly preserves existing public interfaces and validation, ensuring behavior remains unchanged while improving readability within the touched scope.

Does code simplification affect existing validation and error handling?

Code simplification does not affect existing validation and error handling. A non-deviating changes rule ensures these elements are strictly preserved, preventing unnecessary API changes while applying readability improvements.

Why does my refactored code feel harder to read after a bug fix?

Refactored code often feels harder to read after a bug fix due to added nesting or inconsistencies. Applying a targeted simplification pass to the touched scope restores clarity while maintaining the working behavior.