code-simplification
Simplify code that works — remove speculative abstraction, dead flexibility, and needless indirection while keeping behaviour identical and verified.
Install / Use
npx skills add mohitagw15856/pm-claude-skills --skill code-simplificationInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Development & EngineeringSupported Platforms
Our assessment of code-simplification
code-simplification scores 82/100 on our quality scale, 2925th of 4,658 Development & Engineering skills we index.
Its SKILL.md is 4.9 KB long, well organised into 9 sections and no code examples: a solid amount of guidance for an agent.
With 1,396 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 8 days ago, so code-simplification is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
code-simplification compared with similar skills
All 4 of these similar skills score higher than code-simplification; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| code-simplification (this skill)by mohitagw15856 | 82 | 1.4k | 8d ago | SKILL.md |
| ai-job-searchby MadsLorentzen | 100 | 44.8k | today | CLAUDE.md |
| claude-howtoby luongnv89 | 100 | 41.7k | 2d ago | CLAUDE.md |
| algorithmic-artby anthropics | 100 | 177.9k | 10d ago | SKILL.md |
| pptxby anthropics | 100 | 177.9k | 10d ago | SKILL.md |
Frequently asked questions
- How do I install code-simplification?
- Run
npx skills add mohitagw15856/pm-claude-skills --skill code-simplification. The install tabs above show the steps for each supported agent. - Which AI agents does code-simplification work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is code-simplification safe to use?
- It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is code-simplification still maintained?
- The repository was last updated 8 days ago, so code-simplification is actively maintained.
Skill content
View source on GitHubname: code-simplification description: "Simplify code that works — remove speculative abstraction, dead flexibility, and needless indirection while keeping behaviour identical and verified. Use after a feature lands ('now simplify it'), when AI-generated code arrives over-engineered, when a file has grown hard to follow, or as the cleanup pass before review. Produces a smaller, flatter version with identical behaviour, plus a ledger of what was removed and why it was safe. For finding bugs use code-review-checklist / ai-code-review — this skill assumes it works and makes it simple."
Code Simplification Skill
Code accretes defensive complexity: abstractions for futures that never came, options nobody passes, indirection that once had a reason. AI-generated code arrives pre-accreted — interfaces with one implementer, config objects with nine unused knobs. Simplification is its own pass with its own rule: behaviour identical, verified; complexity removed, listed.
What This Skill Produces
- The simplified code — smaller, flatter, same behaviour
- A removal ledger: each simplification, why it was safe, and what future it forecloses (honestly)
- Verification evidence that behaviour held
Required Inputs
Ask for these if not provided:
- The code — what works today and should keep working
- The pressure — what made it feel complex: onboarding, a bug, a review comment
- What must not change — the public API, behaviour, or performance envelope
- Test coverage — whether there are tests to prove the simplification is safe
What to Hunt (in order of payoff)
- Speculative generality — the interface with one implementation, the parameter always called with the same value, the config option no caller sets, the "pluggable" thing nothing plugs into. Rule: the future that justified it must be on a roadmap, not in an imagination. YAGNI is a removal warrant.
- Indirection without insulation — layers that only forward: the wrapper that calls one function, the factory returning one type, the event fired for one listener sitting next door. Each hop costs a reader a jump; collapse hops that don't isolate change.
- Dead and duplicate paths — unreachable branches, handled-nowhere flags, the local re-implementation of a utility that exists (
grepbefore believing anything is unique). - Cleverness taxing readers — the nested ternary, the reduce that should be a loop, the regex doing four jobs. Rewrite for the next reader; "fewer characters" is not "simpler".
- Flatten control flow — guard clauses over nested ifs; early returns over else-pyramids; splitting the function that needs a comment per section into functions named by those comments.
The Safety Discipline (what makes this different from vandalism)
- Behaviour-preserving means verified, not asserted: run the full relevant suite before AND after; if coverage is thin over the code being simplified, add the pinning test first — simplifying untested code is refactoring blind.
- One hunt-class per pass where the code is load-bearing (remove speculation, verify; collapse indirection, verify) — mirrors incremental-implementation's rule.
- Chesterton's fence check on anything weird:
git log/blamethe strange bit before deleting it. Some "needless" complexity is a bug fix wearing an odd shape — if the history shows a fix, keep it and comment WHY it's shaped that way instead. - Public surface needs a wider net: simplifying exported/shared code means checking callers across the codebase, not just the local file.
Output Format
Simplification: [target]
Verification: [suite/build run before → after: identical] · pinning tests added: [n or none-needed because…]
Removal ledger | What was removed/flattened | Class | Why safe | Future foreclosed (honest) | |---|---|---|---|
Kept deliberately: [the weird-but-load-bearing bits, with their Chesterton evidence] Size: [LOC/complexity before → after]
Quality Checks
- [ ] Full verification ran before and after — identical behaviour, evidenced
- [ ] Thinly-tested code got pinning tests before simplification
- [ ] Every removal states the future it forecloses — "none" must be argued, not assumed
- [ ] Strange code was history-checked before deletion (Chesterton's fence)
- [ ] The result is simpler for a READER, not just shorter
Anti-Patterns
- [ ] Do not simplify and change behaviour in one pass — the moment behaviour shifts, this became a rewrite without a spec
- [ ] Do not delete weirdness without checking why it's weird — some of it is a production incident's scar tissue
- [ ] Do not confuse terse with simple — code golf raises the reading tax this skill exists to cut
- [ ] Do not remove flexibility that's actually on the roadmap — YAGNI applies to imagined futures, not planned ones
- [ ] Do not skip the ledger — invisible simplification is indistinguishable from unexplained deletion in review
Related Skills
ai-job-search
44.8kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
claude-howto
41.7kA visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
pptx
177.9kUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an em…
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
