code-simplification
Skill1 starsChanged 3 months agoMITView on GitHub
Cut a diff's complexity without moving behaviour — deep nesting, dead code, duplication, one-caller abstractions, generic names — one change per finding, one verdict, nothing edited. Reach for it code-cold when a slice is green but reads heavy. Five-axis defect hunting is `code-review`; vulnerabilities are `security-and-hardening`.
46 other projects use a version of this.
Adopted by
Most recently taken up by
- GuillemRoca/agent-skills-androidtheir own version, first seen Oct 3, 2026
- addyosmani/agent-skillstheir own version, first seen Oct 3, 2026
- weisser-dev/agentic-skillstheir own version, first seen Oct 3, 2026
- JPeetz/agent-skillstheir own version, first seen Sep 29, 2026
- iuliandita/skillstheir own version, first seen Sep 24, 2026
- ZeroTokenClaw/agents-skillstheir own version, first seen Sep 21, 2026
Used with
Projects with it also use constraint-driven-development, minimalist-ui and 6 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.
vinvcnSkillconstraint-driven-development
把一个项目的质量线确立为书面契约,并阻止 agent 悄悄降低它。通过访谈确定用户在意哪些维度,当用户心里没有数字时提供合理的默认阈值,把一切记录进 CONSTRAINTS.md,并盯住 diff 中质量线被削弱的迹象——新增的 @ts-ignore 或 eslint-disable 抑制注释、被跳过或删除的测试、被剥掉的断言、未实现的 stub、被调低的阈值。当没有任何质量线被写下来时使用;当用户说 "set up constraints" 或 "define our standards" 时;当用户希望把他们在意的维度——无障碍性、Web 性能、覆盖率——设置成被强制执行的约束时;当 agent 为了变绿不断静默检查或跳过测试时;当你需要一个覆盖率或性能阈值却不知道该选什么数字时;或者当 agent 写下的代码超出任何人会读的体量时。
Also in 4 projects that use this
Jonathan0823Skillminimalist-ui
Clean editorial-style interfaces. Warm monochrome palette, typographic contrast, flat bento grids, muted pastels. No gradients, no heavy shadows.
Also in 4 projects that use this
CloudflareSkillreceiving-code-review
Use when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation
Also in 6 projects that use this
OpenAISkillimage-to-code
Implement a selected image, screenshot, mockup, or Image Gen reference as a faithful, responsive frontend.
Also in 3 projects that use this
OpenAISkillrequesting-code-review
Use when completing tasks, implementing major features, or before merging to verify work meets requirements
Also in 5 projects that use this
Jonathan0823Skilldesign-taste-frontend
Senior UI/UX Engineer. Architect digital interfaces overriding default LLM biases. Enforces metric-based rules, strict component architecture, CSS hardware acceleration, and balanced design engineering.
Also in 4 projects that use this
- +1 more from openai
Other versions46 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 46
- addyosmani/agent-skills★ 101ksame name
- shashankswe2020-ux/whoop-mcp★ 165same name
- HybridAIOne/hybridclaw★ 157same name
- muratgur/ordinus★ 109same name
- thiientv/godmode★ 96same name
- tranhieutt/software_development_department★ 72same name
- lgbarn/shipyard★ 66same name
- c-kick/hnl-agent-skills★ 51same name
- az9713/addyosmani-agent-skills★ 38same name
- vinvcn/addyosmani-agent-skills-zh★ 38same name
36 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 repository40 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- acceptance-criteriaSkill
- api-designSkill
- architecture-designSkill
- browser-testing-with-devtoolsSkill
- ci-cdSkill
- codebase-designSkill
- codebase-researchSkill
- code-reviewSkill
- comprehension-quizSkill
- debugging-and-error-recoverySkill
- deprecation-and-migrationSkill
- documentation-and-adrsSkill
- doubt-driven-developmentSkill
- environment-manifestSkill
- gauntlet-loopSkill
- git-workflowSkill
- handoffSkill
- idea-refineSkill
- incremental-implementationSkill
- interview-meSkill
- literate-explainerSkill
- observability-and-instrumentationSkill
- orchestratorSkill
- performance-optimizationSkill
- plan-breakdownSkill
- preflight-readinessSkill
- project-setupSkill
- pull-requestSkill
- quality-verificationSkill
- security-and-hardeningSkill
- shipping-and-launchSkill
- source-driven-developmentSkill
- spec-grillingSkill
- spec-reviewSkill
- test-driven-developmentSkill
- to-prdSkill
- using-agent-skillsSkill
- worktreeSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.
0
Common
Most of the 45 edited versions we read keep these.
1
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 14
Read a slice's diff for what carries more weight than it has to, and return a ranked findings list and one verdict.
- Very specific: line 25
Not this: defects across five axes — code-review.
“Common” is measured: kept by at least 6 in 10 of the 45 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 simplification
Adapted from the Claude Code Simplifier plugin, rewritten here as a model-agnostic process.
Purpose
Stage: Review. Principles 1, 6, 7, 8.
Read a slice's diff for what carries more weight than it has to, and return a ranked findings list and one verdict. It edits nothing: sibling axes are mid-read in those same files, and a checker that rewrites what it graded has stopped being a checker.
When to use / when to skip
- A slice is verify-green and its pull request opens next; the Review fan-out dispatches you code-cold
beside
code-review,security-and-hardeningandperformance-optimization(references/safety-rails.md, Code-cold dispatch). - Working code reads heavier than it should — a long function, copy-paste, a wrapper that only forwards, two spellings of one rule after a rushed merge.
- Not this: defects across five axes —
code-review. Secrets, OWASP, dependencies —security-and-hardening. A profiled hot path —performance-optimization. A seam before the code exists —codebase-design. - Skip code you cannot yet explain, code about to be rewritten wholesale, and a hot path where the plainer version measurably costs more. Clean code needs no pass; returning nothing is a result.
Inputs
On a code-cold pass nobody is present, so derive what is absent and name it in the findings; with a person there, ask at most three questions, only where the gap changes the shape of the pass.
- the diff — helps: the material in scope, and its edge is where scope ends · without it: read
git diff <base>..HEADor the working tree and name the range,derived. An empty range is apass. - the slice's row in
docs/features/<slug>/plan.md— helps: itsRegression surface, the file set a finding may land in · without it: bound the findings by the diff's own paths,derived. - the changed files' tests, passing — helps: the oracle that makes a finding safe to take · without
them, or with them red: mark which findings rest on reading alone,
derived. CLAUDE.md,CONTEXT.md, the neighbouring code — helps: the house style a finding converges on, so the report is this codebase's taste and not yours · without them: read the files around the diff,derived.
The simplification process
- Understand a candidate before cutting it — its responsibility, callers and callees, edge and
error paths, the tests that pin it, what
git blamesays. Read further where an answer is missing (Chesterton's Fence: an odd branch is often a platform workaround, and cutting it ships a regression under a cleanup's name). - Preserve behaviour exactly — same output per input, same errors at the same points, same side effects in the same order. Drop a candidate you cannot say that about, and never trade error handling away for tidiness.
Scan the changed lines for the concrete signals, not for a feeling — and leave untouched code alone, since a drive-by refactor is diff noise and unowned regression risk.
Axis The signal, and the shape it wants Structure nesting three deep, or a function past ~50 lines → guard clauses and focused functions · nested ternaries → if/else, a switch, a lookup · a boolean flag parameter → an options object, or two functions · one conditional repeated across call sites → a named predicate Naming data,tmp,val→ a name for the content ·usr,cfg,evt→ full words, keepingid,url,api· agetthat also mutates → a name that admits the write · a comment restating the line under it → deleted, and every "why" comment keptRedundancy the same five-plus lines twice → one shared function · unreachable branches, unused variables, commented-out blocks → deleted once confirmed dead · a forwarding wrapper, or a factory for one product → the direct call · a cast to an already-inferred type → nothing - Prefer the explicit version wherever the compact one costs the reader a pause — if/else over a nested ternary, a named intermediate over a chained reduce. Watch the far end too: inlining a helper that named a concept, merging two simple functions into one complex one, cutting an abstraction that exists for testability. Comprehension, not line count, is the goal.
- Write the proposed version out and hold it against the original. Drop it where it reads or reviews worse, or imports a pattern this codebase does not use — a dropped attempt costs nobody, a reported one costs a round.
- Give each finding exactly one change:
path:line, the before, an after that leaves no unused import or unreachable branch behind, the tests that pin the behaviour, and what the reader gains — never a line count, never four rewrites bundled as "clean this up", since the implementer runs the suite against one change and needs to know which one broke it. Say that the refactor lands apart from feature or bug-fix work, and recommend a codemod over hand edits where it would touch more than ~500 lines. - Name what a finding would move. Nothing here is frozen, so one wanting a test rewritten, an
assertion re-shaped or a file outside the surface touched is still legitimate — report what it moves
and the disclosure the pull request owes (
pull-request). - Rank structural first, cosmetic last, and return one verdict —
pass · concerns · block:passwhere every finding is taste the author may ignore (code-review'sOptional:/Nit:band),concernswhere one should be taken before merge,blockfor a stop-list item alone (references/safety-rails.md), a secret read in passing being the likeliest.
Rationalizations
| The excuse | The reality |
| "Fewer lines is simpler." | A one-line nested ternary parses slower than a five-line if/else. |
| "The original author had a reason." | git blame says whether they did; accumulated complexity often has none. |
| "This abstraction might be useful later." | One caller is not a pattern — it is complexity carried without payment. |
| "I'll tidy the neighbouring file too." | It belongs to a slice nobody is reviewing, and its regression lands unowned. |
| "This one is small enough to just apply." | A sibling axis is mid-read in that file, and the fix is the implementer's. |
Red flags
- A finding with no
path:line, or one outside what the diff changed. - A proposed "after" longer and harder to follow than the before.
- Renaming toward personal taste rather than the conventions around the file.
- Error handling gone in the name of cleanliness.
- Several rewrites bundled into one "clean this up" item.
- A working-tree edit made after this pass began.
Verification
- Every finding cites a
path:lineinside the changed files, carries one change with its before and its after, and names the tests pinning the behaviour — or says it rests on reading alone. - Every finding preserves behaviour exactly, or names what it moves and the disclosure the pull request owes.
- Proposals reading worse than the original were dropped rather than reported.
- The list runs structural first, cosmetic last, and the derived inputs are named.
- The verdict is one of
pass · concerns · block,blocka stop-list item alone. - Code and tests are byte-identical to what arrived.
Outputs & handoff
Writes nothing, so there is no cap to measure. The findings and the verdict come back in conversation
under ## Findings and ## Verdict, structural first, for the Review fan-out to merge with the sibling
axes' lists. No code and no test is edited, the ones a finding names included — the implementer applies
the fix on the route-back. No board row, no gate flip: the caller owns the transition
(state-schema.md).
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.

