code-simplifierlisted
Install: claude install-skill 10xequity/claude-skill-library
# Code Simplifier Skill
## Purpose
Refine recently written code for clarity, consistency, and maintainability while preserving behaviour exactly.
## When to use
Use this skill immediately after writing or modifying code, and before review. It improves quality only — use a dedicated review skill to hunt for bugs.
## Inputs
- the recently modified files or diff
- project coding standards, including `CLAUDE.md` if present
- test command for verifying behaviour is unchanged
## Output
Return:
- the refined code
- a short list of the significant changes and the reasoning
- confirmation that tests still pass
- anything left alone deliberately, with the reason
## Constraints
- never change what the code does — only how it does it; all outputs, side effects, and error behaviour stay identical
- scope to recently touched code unless told otherwise
- clarity over brevity: explicit beats compact, and fewer lines is not the goal
- no nested ternaries; use `if`/`else` or `switch` for multiple conditions
- reduce nesting, remove redundant abstractions and dead code, consolidate related logic
- delete comments that restate the code; keep the ones that explain why
- keep helpful abstractions — over-simplification that harms organisation is a regression
- do not combine unrelated concerns into one function to save a line
- run the tests; a simplification that is not verified is not a simplification
## Examples
- Clean up a feature branch before opening a pull request
- Flatten a de