Agent Skills: code-simplifier

Simplifies and refines code for clarity, consistency, and maintainability while preserving all functionality. Use when asked to "simplify code", "clean up code", "refactor for clarity", "improve readability", or review recently modified code for elegance. Focuses on project-specific best practices.

UncategorizedID: l-lin/dotfiles/code-simplifier

Install this agent skill to your local

pnpm dlx add-skill https://github.com/l-lin/dotfiles/tree/HEAD/home-manager/modules/share/ai/.config/ai/skills/code-simplifier

Skill Files

Browse the full folder contents for code-simplifier.

Download Skill

Loading file tree…

home-manager/modules/share/ai/.config/ai/skills/code-simplifier/SKILL.md

Skill Metadata

Name
code-simplifier
Description
Use when simplifying recently touched code without changing behavior, especially when asked to "simplify code", "clean up code", "refactor for clarity", or "improve readability".

Simplify recent code. Preserve behavior. Follow project standards.

  1. Find the code the user changed, or the code touched in this session. Ignore unrelated areas unless the user asks for a broader pass.
  2. Read the repo guidance, especially AGENTS.md when present, and match existing project conventions.
  3. Simplify for clarity:
    • remove dead helpers, duplication, and needless comments
    • reduce nesting and conditional sprawl
    • prefer explicit names and straightforward control flow
    • avoid clever one-liners and nested ternaries
  4. Keep the smallest safe diff. Do not add abstractions, config, or helpers unless they make the touched code easier to understand right now.
  5. Preserve behavior exactly. If intent or safety is unclear, stop and ask instead of guessing.
  6. Verify the result against the changed code, then report only the simplifications that matter to understanding.