code-simplifier
Skill1 starsChanged 19 days agoMITView on GitHub
Simplify and refine code for clarity, consistency, and maintainability while preserving all functionality. Use this skill when the user asks to "simplify this", "clean this up", "tidy this code", "make this more readable", or "refactor for clarity". Focuses on recently modified code unless told otherwise.
62 other projects use a version of this.
Adopted by
Most recently taken up by
- Rain-kl/OpenFlaretheir own version, first seen Nov 30, 2026
- UIhoshi/AgentLogictheir own version, first seen Nov 29, 2026
- gromov0737/skillstheir own version, first seen Nov 29, 2026
- yeisonrestrepo/code-conductortheir own version, first seen Nov 26, 2026
- kopp0510/claude-ddtheir own version, first seen Nov 17, 2026
- axot/agent-skillstheir own version, first seen Nov 16, 2026
Used with
Projects with it also use tdd-rust, comment-analyzer and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
FlorianBruniauxSkilltdd-rust
Also in 3 projects that use this
PaulKinlanSkillcomment-analyzer
Analyzes code comments for accuracy, completeness, and long-term maintainability. Identifies misleading comments, comment rot, and documentation gaps.
Also in 4 projects that use this
PaulKinlanSkilltype-design-analyzer
Analyzes type design quality focusing on encapsulation, invariant expression, usefulness, and enforcement. Provides quantitative ratings (1-10) for each dimension.
Also in 3 projects that use this
ufodev-ioSkillsecurity-guardian
Comprehensive security layer for all interactions with Claude: audits code, dependencies, commands, configs, and AI-generated output for vulnerabilities. Protects against prompt injection, data leaks, unsafe advice, and social engineering. Works in Cursor, Claude Code, claude.ai, and API contexts. Use always as a background security protocol in any Claude-powered environment.
Also in 3 projects that use this
AJBcodingSkillsql-optimization-patterns
Master SQL query optimization, indexing strategies, and EXPLAIN analysis to dramatically improve database performance and eliminate slow queries. Use when debugging slow queries, designing database schemas, or optimizing application performance.
Also in 5 projects that use this
SentrySkillfind-bugs
Find bugs, security vulnerabilities, and code quality issues in local branch changes. Use when asked to review changes, find bugs, security review, or audit code on the current branch.
Also in 4 projects that use this
- +1 more from PaulKinlan
Other versions62 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 62
- rtk-ai/rtk★ 88ksame name
- elie222/inbox-zero★ 13ksame name
- getsentry/skills★ 1.2ksame name
- DoubleML/doubleml-for-py★ 806same name
- Azure/azqr★ 804same name
- deadlock-mod-manager/deadlock-mod-manager★ 638same name
- microsoft/ghqr★ 532same name
- Rain-kl/OpenFlare★ 305same name
- feiskyer/codex-settings★ 248same name
- wesm/middleman★ 201same name
52 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository16 other files it gives its agents.
- airbnb-javascript-styleSkill
- code-reviewerSkill
- commit-and-pushSkill
- commitSkill
- debugSkill
- explainSkill
- find-skillsSkill
- frontend-designSkill
- generate-commit-messageSkill
- humanizerSkill
- ponytailSkill
- pr-descriptionSkill
- prompt-optimizerSkill
- readme-generatorSkill
- testSkill
- thermo-nuclear-code-quality-reviewSkill
The file
We split this skill into the rules it gives an agent
9 rules. 0 are common, 8 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 58 edited versions we read keep these.
8
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
Default to code that was recently written or modified — the current diff or the files touched this session.
- Distinctive: line 20
Only widen the scope if the user asks.
- Distinctive: line 22
Do not simplify code you were not asked about.
- Very specific: line 35
Before changing anything, read the surrounding code and any CLAUDE.md, .editorconfig, or linter config in the repo.
- Distinctive: line 50
Remove redundant code, dead branches, and abstractions with a single caller that only obscure the logic.
- Distinctive: line 55
Delete comments that restate the code.
- Distinctive: line 72
Read enough of the surrounding code to learn the local conventions.
- Distinctive: line 76
Run the project's tests and linter if they exist.
- Distinctive: line 80
If the code is already clear, say so and change nothing.
“Common” is measured: kept by at least 6 in 10 of the 58 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Code Simplifier
Improve the clarity and consistency of code without changing what it does. Readable and explicit beats short and clever, every time.
Scope
Default to code that was recently written or modified — the current diff or the
files touched this session. Run git diff and git diff --staged to find it.
Only widen the scope if the user asks.
Do not simplify code you were not asked about. A sprawling refactor buried in an unrelated change is hard to review and easy to get wrong.
The one hard rule
Behaviour must not change. Same inputs, same outputs, same side effects, same error cases, same public API. If a change would alter behaviour — even to fix what looks like a bug — stop and raise it with the user instead. Fixing bugs is a separate task from simplifying, and mixing them makes both harder to review.
Follow the project, not your preferences
Before changing anything, read the surrounding code and any CLAUDE.md,
.editorconfig, or linter config in the repo. Match:
- Module and import style, and how imports are ordered.
- Function declaration style, and whether return types are annotated.
- Component and props conventions.
- Error-handling patterns already in use.
- Naming conventions for variables, functions, files, and types.
Where the project has a convention, it wins over your default — even if you'd write it differently on a blank page.
What to simplify
- Reduce nesting: early returns and guard clauses instead of deep
ifpyramids. - Remove redundant code, dead branches, and abstractions with a single caller that only obscure the logic.
- Give things names that say what they are; replace magic values with named constants.
- Consolidate logic that is duplicated verbatim a few lines apart.
- Delete comments that restate the code. Keep comments explaining why.
- Replace nested ternaries with
if/elsechains or aswitch.
What not to do
Over-simplification is a real failure mode. Avoid changes that:
- Trade clarity for fewer lines — dense one-liners are not an improvement.
- Produce clever code that the next reader has to decode.
- Collapse separate concerns into one function that now does too much.
- Strip a helpful abstraction just because it is small.
- Make the code harder to debug, extend, or step through.
- Reformat whole files, burying the real change in whitespace noise.
Process
- Find the recently modified code.
- Read enough of the surrounding code to learn the local conventions.
- Apply the simplifications that clearly help; skip the marginal ones.
- Confirm behaviour is unchanged — re-read the diff specifically asking "could this produce a different result for any input?"
- Run the project's tests and linter if they exist.
- Summarise only the changes that affect how the code reads or works. A list of trivial edits is noise.
If the code is already clear, say so and change nothing. That is a valid result.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

