code-simplification
Skill0 starsChanged 29 days agoMITView on GitHub
Simplifies code for clarity. Use when refactoring code for clarity without changing behavior. Use when code works but is harder to read, maintain, or extend than it should be.
86 other projects use a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- zademy/lu-querytheir own version, first seen Nov 16, 2026
- dmoreq/precepttheir own version, first seen Nov 15, 2026
- dvy1987/agent-loomtheir own version, first seen Nov 15, 2026
- iuliandita/skillstheir own version, first seen Nov 15, 2026
- JPeetz/agent-skillstheir own version, first seen Nov 14, 2026
- addyosmani/agent-skillstheir own version, first seen Nov 14, 2026
Used with
Projects with it also use constraint-driven-development, performance-optimization and 9 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.
MrCipherSmithSkillconstraint-driven-development
Use when a project needs a persistent, measurable quality bar — starting a project without documented standards, 'set up constraints', or when coverage/perf/a11y thresholds get re-debated per-PR. Produces CONSTRAINTS.md with enforceable numbers, ratchets, and a guard against silent weakening. NOT for throwaway prototypes or a one-off CI setup.
Also in 16 projects that use this
barisariburnuSkillperformance-optimization
Complete performance optimization guide for Next.js applications including frontend, backend, database, caching, and general optimization strategies. Use when improving performance, reducing bundle size, optimizing queries, or implementing caching.
Also in 47 projects that use this
GSA-TTSSkillarchitecture-decision-records
Load when a user wants architecture decision records (ADRs) drafted from requirements or a design discussion, asks which decisions need an ADR, or wants an ADR draft reviewed for one-sided trade-offs, weak alternatives or missing requirement links. Not for setting up a project's whole documentation system (project-documentation-system).
Also in 4 projects that use this
JohnJBorenSkillci-cd
CI/CD pipeline design, GitHub Actions, testing automation, and deployment strategies
Also in 3 projects that use this
OpenAISkillsecurity-best-practices
Perform language and framework specific security best-practice reviews and suggest improvements. Trigger only when the user explicitly requests security best practices guidance, a security review/report, or secure-by-default coding help. Trigger only for supported languages (python, javascript/typescript, go). Do not trigger for general code review, debugging, or non-security tasks.
Also in 3 projects that use this
GitHubSkillconventional-commit
Prompt and workflow for generating conventional commit messages using a structured XML format. Guides users to create standardized, descriptive commit messages in line with the Conventional Commits specification, including instructions, examples, and validation.
Also in 3 projects that use this
Other versions86 projects use a version of this.
Word for word · 0
None found.
Edited · 1
- jacksonwilliamsva/kiro-skills-library★ 215% same
Wrote their own version · 85
- addyosmani/agent-skills★ 118ksame name
- sanity-io/sanity★ 6.4ksame name
- luxury-yacht/app★ 445same name
- shashankswe2020-ux/whoop-mcp★ 181same name
- sammcj/agentic-coding★ 169same name
- HybridAIOne/hybridclaw★ 162same name
- muratgur/ordinus★ 111same name
- tranhieutt/software_development_department★ 71same name
- lgbarn/shipyard★ 66same name
- c-kick/hnl-agent-skills★ 56same name
75 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 repository21 other files it gives its agents.
- .codex/AGENTS.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- animate-expoSkill
- animateSkill
- break-uiSkill
- claritySkill
- code-reviewSkill
- diagnoseSkill
- grill-with-docsSkill
- idea-refineSkill
- improve-codebase-architectureSkill
- incremental-implementationSkill
- interactive-test-planSkill
- manual-test-planSkill
- planning-and-task-breakdownSkill
- review-animationsSkill
- security-and-hardeningSkill
- spec-driven-developmentSkill
- tddSkill
- write-a-skillSkill
- zoom-outSkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.
0
Common
Most of the 80 edited versions we read keep these.
1
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 52
Before removing anything, understand why it exists.
“Common” is measured: kept by at least 6 in 10 of the 80 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
Reduce complexity while preserving exact behavior. The goal is not fewer lines — it's code that is easier to read, understand, modify, and debug.
Five Principles
- Preserve behavior exactly — same outputs, same errors, same side effects. If unsure, don't change it.
- Follow project conventions — match the codebase style, not your preferences. Inconsistency is not simplification.
- Prefer clarity over cleverness — explicit > compact when compact requires mental parsing.
- Maintain balance — don't over-simplify. Removing a well-named helper makes call sites harder to read.
- Scope to what changed — simplify recently modified code. Avoid drive-by refactors of unrelated code.
Simplification Patterns
Structural:
| Pattern | Simplification |
| Deep nesting (3+ levels) | Guard clauses or extract helper functions |
| Long functions (50+ lines) | Split into focused functions |
| Nested ternaries | Replace with if/else or lookup objects |
| Boolean parameter flags | Options objects or separate functions |
| Repeated conditionals | Extract to named predicate function |
Naming:
| Pattern | Simplification |
Generic names (data, result, temp) | Rename to describe content |
| Comments explaining "what" | Delete — code is clear enough |
| Comments explaining "why" | Keep — they carry intent code can't express |
| Misleading names | Rename to reflect actual behavior |
Redundancy:
| Pattern | Simplification |
| Duplicated logic (5+ lines) | Extract to shared function |
| Dead code, commented-out blocks | Remove (after confirming truly dead) |
| Wrapper that adds no value | Inline it |
| Over-engineered patterns | Replace with direct approach |
Process
1. Understand Before Touching (Chesterton's Fence)
Before removing anything, understand why it exists. Check git blame. If you can't answer why it was written this way, you're not ready to simplify.
2. Apply Changes Incrementally
One simplification at a time. Run tests after each. Submit refactoring separately from feature or bug fix changes.
3. Verify
- Is the simplified version genuinely easier to understand?
- Is the diff clean and reviewable?
- Did any tests need modification? (If yes, you likely changed behavior.)
Red Flags
- Simplification that requires modifying tests to pass
- "Simplified" code that is longer or harder to follow
- Renaming to match your preferences rather than project conventions
- Removing error handling because "it makes the code cleaner"
- Simplifying code you don't fully understand
- Refactoring code outside the current task scope without being asked
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.

