code-simplification
Skill2 starsChanged 7 months agoMITView on GitHub
Use when refactoring code for clarity without changing behavior, when code works but is harder to read or maintain than it should be, or when reviewing code that has accumulated unnecessary complexity
101 other projects use a version of this, 3 of them edited.
Adopted by
Most recently taken up by
- dzikrisyairozi/agent-skillstheir own version, first seen Nov 29, 2026
- aakash1552005/universal-agent-skillstheir own version, first seen Nov 29, 2026
- karanmrn/karanagentskillstheir own version, first seen Nov 29, 2026
- karanmrn/kstacktheir own version, first seen Nov 29, 2026
- alexj11324/Mikkatheir own version, first seen Nov 29, 2026
- e-landeros/gauntlettheir own version, first seen Nov 29, 2026
Used with
Projects with it also use accessibility-engineering, constraint-driven-development 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.
steven123397Skillaccessibility-engineering
Audits existing interfaces for WCAG 2.2 AA conformance and remediates the violations found. Use when auditing a page or component for accessibility, running axe-core or pa11y, triaging a11y violations, or checking screen reader and contrast issues before shipping.
Also in 4 projects that use this
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 22 projects that use this
LLl0k0laDSkillincremental-implementation
Use when implementing any feature or change that touches more than one file. Use when you're about to write a large amount of code at once, or when a task feels too big to land in one step.
Also in 53 projects that use this
xfstudioSkillpostmortem-writing
Write effective blameless postmortems with root cause analysis, timelines, and action items. Use when conducting incident reviews, writing postmortem documents, or improving incident response processes.
Also in 3 projects that use this
MicrosoftSkillask-emil
Ask which skill or flow fits your situation. A router over the skills in this repo.
Also in 3 projects that use this
MicrosoftSkillchoreograph
Coordinate several elements that animate together — decide what moves, in what order, how much they overlap, and what stays still — so a group reads as one intentional motion instead of a pile of separate animations. Use when building or fixing a staggered list, a hero entrance, a view swap inside a container, a multi-step flow, an element leaving while its siblings close the gap, a morph between rich states, or any interaction with several moving parts (icon + background + lines, panel + content, items flying into a target). Triggers on — stagger, sequence, choreography, "one after another", crossfade, AnimatePresence mode, hero entrance, multi-step, useAnimate, "feels mechanical", "too much going on", "feels slow to open".
Also in 3 projects that use this
- +3 more from microsoft
Other versions101 projects use a version of this.
Word for word · 0
None found.
Edited · 3
- muratgur/ordinus★ 11111% same
- hi-donwi/Donwi-Skills★ 010% same
- JBSommeling/claude-config★ 018% same
Wrote their own version · 98
- addyosmani/agent-skills★ 121ksame name
- sanity-io/sanity★ 6.4ksame name
- luxury-yacht/app★ 448same name
- shashankswe2020-ux/whoop-mcp★ 181same name
- sammcj/agentic-coding★ 174same name
- HybridAIOne/hybridclaw★ 165same name
- alexj11324/Mikka★ 90same name
- aspectly-labs/Mikka★ 90same name
- tranhieutt/software_development_department★ 71same name
- lgbarn/shipyard★ 66same name
88 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 repository26 other files it gives its agents.
- api-and-interface-designSkill
- brainstormingSkill
- ci-cd-and-automationSkill
- code-reviewSkill
- context-engineeringSkill
- deprecation-and-migrationSkill
- dispatching-parallel-agentsSkill
- executing-plansSkill
- finishing-a-development-branchSkill
- grill-meSkill
- mentorSkill
- performance-optimizationSkill
- receiving-code-reviewSkill
- requesting-code-reviewSkill
- security-guidanceSkill
- session-synthesisSkill
- shipping-and-launchSkill
- source-driven-developmentSkill
- subagent-driven-developmentSkill
- systematic-debuggingSkill
- test-driven-developmentSkill
- using-git-worktreesSkill
- verification-before-completionSkill
- verification-phaseSkill
- writing-plansSkill
- writing-skillsSkill
The file
We split this skill into the rules it gives an agent
3 rules. 2 are common, 1 is distinctive, and 0 are very specific to this project.
2
Common
Most of the 95 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
- Common: line 13
Don't change what code does — only how it's expressed.
- Distinctive: line 22
Before changing or removing anything, understand why it exists.
- Common: line 25
Default to simplifying recently modified code.
“Common” is measured: kept by at least 6 in 10 of the 95 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. Not fewer lines — code a new team member understands faster.
Five Principles
1. Preserve Behavior Exactly
Don't change what code does — only how it's expressed. Inputs, outputs, side effects, error behavior, and edge cases must remain identical. If unsure, don't make the change.
2. Follow Project Conventions
Simplification means consistency with the codebase, not imposing preferences. Study neighboring code for naming, error handling, and idioms. Simplification that breaks project consistency is churn.
3. Prefer Clarity Over Cleverness
Explicit beats compact when the compact version requires a mental pause. Early returns over deep nesting. Named functions over inline lambdas. Readable mappings over chained ternaries.
4. Chesterton's Fence
Before changing or removing anything, understand why it exists. Check git blame. If you can't explain the original reason, you're not ready to simplify.
5. Scope to What Changed
Default to simplifying recently modified code. Avoid drive-by refactors of unrelated code unless explicitly asked. Unscoped simplification creates noisy diffs and risks regressions.
Simplification Workflow
- Understand first — What does it do? What calls it? What are the edge cases? Why was it written this way?
- Identify opportunities — Deep nesting, long functions, generic names, duplicated logic, dead code, over-engineered patterns
- Apply incrementally — One simplification at a time. Run tests after each. Separate refactoring commits from feature/bugfix commits.
- Verify — Use the verification-before-completion skill. All existing tests must pass without modification. Build succeeds. Linter passes. Diff is clean.
Anti-Rationalization Table
| Rationalization | Reality |
| "It's working, no need to touch it" | Hard-to-read code is hard to fix when it breaks |
| "Fewer lines is always simpler" | A 1-line nested ternary is not simpler than a 5-line if/else |
| "I'll simplify this unrelated code too" | Unscoped simplification creates noisy diffs and risks regressions |
| "This abstraction might be useful later" | Speculative abstractions are complexity without value — remove and re-add when needed |
| "The original author must have had a reason" | Apply Chesterton's Fence — but accumulated complexity often has no reason |
| "I'll refactor while adding this feature" | Separate refactoring from feature work. Mixed changes are harder to review and revert |
Red Flags — STOP If You See
- Simplification that requires modifying tests to pass (you changed behavior)
- "Simplified" code that is longer or harder to follow than the original
- 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
- Batching many simplifications into one large commit
- Refactoring code outside the current task's 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.

