code-simplification
Skill2 starsChanged 6 months agoMITView on GitHub
Remove accidental complexity without changing behavior - apply Chesterton's Fence
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, observability-and-instrumentation and 8 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
borhen68Skillobservability-and-instrumentation
Instruments code so production behavior is visible and diagnosable. Use when adding logging, metrics, tracing, or alerting. Use when shipping any feature that runs in production and you need evidence it works. Use when production issues are reported but you can't tell what happened from the available data.
Also in 13 projects that use this
luischanciSkillinterview-me
Interactive interview to formalize a research idea into a structured specification with hypotheses and empirical strategy.
Also in 16 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
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 repository38 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- accessibility-engineeringSkill
- agent-orchestrationSkill
- ai-ml-engineeringSkill
- api-and-interface-designSkill
- architecture-designSkill
- backend-engineeringSkill
- ci-cd-and-automationSkill
- code-review-and-qualitySkill
- context-engineeringSkill
- database-designSkill
- data-pipeline-engineeringSkill
- debugging-and-error-recoverySkill
- deployment-strategySkill
- documentation-and-adrsSkill
- doubt-driven-developmentSkill
- frontend-engineeringSkill
- git-workflow-and-versioningSkill
- idea-refineSkill
- incident-responseSkill
- incremental-implementationSkill
- infrastructure-as-codeSkill
- llm-evaluationSkill
- microservices-designSkill
- mobile-developmentSkill
- observability-and-monitoringSkill
- performance-optimizationSkill
- planning-and-task-breakdownSkill
- prompt-engineeringSkill
- rag-system-designSkill
- requirements-analysisSkill
- risk-assessmentSkill
- security-and-hardeningSkill
- source-driven-developmentSkill
- spec-driven-developmentSkill
- test-driven-developmentSkill
- using-agent-skillsSkill
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 7 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 45 edited versions we read keep these.
7
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Every line of code is a liability.
- Distinctive: line 14
When a PR review reveals unnecessarily complex code
- Distinctive: line 15
When a function is hard to test because it does too many things
- Distinctive: line 16
When adding a feature to existing code requires understanding too much context
- Distinctive: line 22
Before removing any code that seems unnecessary: understand why it was written.
- Distinctive: line 28
Only remove accidental complexity.
- Distinctive: line 61
If you are not extending it now, the abstraction is premature.
“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
Overview
Every line of code is a liability. Complexity that serves no purpose makes systems harder to understand, harder to test, and harder to change. This skill removes accidental complexity while preserving intentional complexity and essential behavior.
When to Use
- When a PR review reveals unnecessarily complex code
- When a function is hard to test because it does too many things
- When adding a feature to existing code requires understanding too much context
- As part of the
/simplifyworkflow
Process
Step 1: Understand before you remove (Chesterton's Fence)
Before removing any code that seems unnecessary: understand why it was written. If you don't know why a fence exists, don't remove it. Find out first.
Step 2: Identify the complexity types
- Accidental complexity: complexity from poor implementation choices
- Essential complexity: complexity inherent to the problem domain
Only remove accidental complexity. Essential complexity cannot be removed - only managed.
Step 3: Look for these simplification opportunities
Dead code: Code that is never executed. Remove it (git remembers it).
Premature abstraction: Abstractions that are more complex than the thing they abstract. Inline them.
Unnecessary indirection: Function A calls function B which calls function C and each is 5 lines. Collapse them.
Redundant comments: Comments that say what the code already says. Delete them. Keep comments that explain WHY.
Magic numbers: Replace if (retries > 3) with if (retries > MAX_RETRIES).
Over-engineered error handling: 10 levels of nested try/catch for a case that can't happen. Simplify.
Duplicate logic: The same logic in 3 places. Extract to one place.
Step 4: Simplify in small steps
One simplification at a time. Run tests after each step.
Step 5: Verify behavior is unchanged
The test suite must pass. If there are no tests, write tests for the behavior you're simplifying before you simplify it.
Step 6: Check: is it simpler for a new reader?
Have someone unfamiliar with this code read it. Is it easier to understand than before?
Anti-Rationalizations
"Removing this might break something I don't know about" This is Chesterton's Fence. Understand it first. Then remove it.
"The abstraction makes it more extensible" If you are not extending it now, the abstraction is premature. Three identical lines are better than a wrong abstraction.
Verification Requirements
- Every removal preceded by understanding why it was written
- Tests pass after each simplification step
- No behavior changes (confirmed by tests)
- A new reader finds it simpler (validation)
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.

