simplify
Skill3 starsChanged 4 months agoMITView on GitHub
Use when the code is too complex — clarity over cleverness, removes speculative abstractions, dead complexity, and earns-its-cost structures. Triggers on "simplify", "too complex", "refactor for clarity", "简化", "太复杂", "重构求清晰". Not for cross-module structural changes (use refactoring) or architecture audit (use codebase-design) — single-file clarity stays here.
73 other projects use a version of this, 3 of them edited.
Adopted by
Most recently taken up by
- Sayhi-bzb/CharDesktheir own version, first seen Oct 6, 2026
- hmjBill/skillstheir own version, first seen Oct 5, 2026
- duncanmorris/agent-skillstheir own version, first seen Oct 5, 2026
- HMBSbige/skillstheir own version, first seen Oct 3, 2026
- LegendApp/legend-skillstheir own version, first seen Oct 2, 2026
- bex-co/bextheir own version, first seen Sep 29, 2026
Used with
Projects with it also use clonedeps, deepwork 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.
hbollonSkillclonedeps
Clone important project dependency source code into an ignored local workspace so OpenCode can inspect library internals. Use when the user asks to clone dependencies, inspect dependency/source internals, understand SDK/framework behavior from source, debug library implementation details, or make core dependency repos locally readable. Do not use for ordinary API/docs questions where @librarian is enough.
Also in 3 projects that use this
hbollonSkilldeepwork
Orchestrator-only workflow for heavy coding sessions, multi-phase implementation, and risky refactors. Use for complex work that needs planning, review gates, and persistent progress tracking.
Also in 3 projects that use this
JordanCoinSkillcodemap
Analyze codebase structure, dependencies, changes, cross-agent handoffs, and get code-aware intelligence. Use when user asks about project structure, where code is located, how files connect, what changed, how to resume work, before starting any coding task, when you need risk analysis and skill guidance, or when Codemap should tune project config before analysis.
Also in 4 projects that use this
llama-farmSkillcommit-push-pr
Commit changes, push to GitHub, and open a PR. Includes quality checks (security, patterns, simplification). Use --quick to skip checks.
Also in 3 projects that use this
nicolasestremSkillfinalize
Complete project finalization with quality gates and git workflow automation.
Also in 3 projects that use this
PostHogSkillreact-doctor
Diagnose and fix React codebase health issues. Use when reviewing React code, fixing performance problems, auditing security, or improving code quality.
Also in 3 projects that use this
Other versions73 projects use a version of this.
Word for word · 0
None found.
Edited · 3
- akitaonrails/my-skills★ 20522% same
- hbollon/opencode-config★ 122% same
- mike22890/opencode-skills-cn★ 118% same
Wrote their own version · 70
- huggingface/OpenEnv★ 2.6ksame name
- kdlbs/kandev★ 899same name
- Archive228/loopkit★ 756same name
- truffle-ai/dexto★ 650same name
- bex-co/bex★ 569same name
- Sayhi-bzb/CharDesk★ 547same name
- brianlovin/agent-config★ 375same name
- DeL-TaiseiOzaki/claude-code-orchestra★ 198same name
- sd0xdev/sd0x-harness★ 191same name
- bholmesdev/skills★ 177same name
60 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 repository49 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- brainstormSkill
- oss-strategySkill
- specSkill
- researchSkill
- api-designSkill
- architectureSkill
- codebase-designSkill
- design-researchSkill
- domain-modelingSkill
- frontend-designSkill
- imagegenSkill
- image-to-codeSkill
- prompt-engineeringSkill
- prototypeSkill
- schema-designSkill
- auth-implementationSkill
- breakdownSkill
- context-engineeringSkill
- error-handlingSkill
- i18nSkill
- implementSkill
- multi-agent-orchestrationSkill
- cost-optimizationSkill
- performanceSkill
- refactoringSkill
- api-testingSkill
- e2e-testingSkill
- load-testingSkill
- tddSkill
- test-generationSkill
- a11y-reviewSkill
- code-reviewSkill
- debuggingSkill
- lintingSkill
- security-reviewSkill
- ci-cdSkill
- deprecation-migrationSkill
- git-workflowSkill
- oss-polishSkill
- shippingSkill
- documentation-auditSkill
- handoffSkill
- incident-responseSkill
- observabilitySkill
- purity-auditSkill
- skill-authoringSkill
- using-skillsSkill
The file
We split this skill into the rules it gives an agent
9 rules. 0 are common, 9 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 71 edited versions we read keep these.
9
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 12
After a feature works and tests pass, but the implementation feels heavier than it needs to be
- Distinctive: line 14
When you encounter deeply nested logic, long functions, or unclear names
- Distinctive: line 15
After merging changes that introduced duplication or inconsistency
- Distinctive: line 24
Before changing or removing anything, understand why it exists.
- Distinctive: line 30
If you can't answer these, you're not ready.
- Distinctive: line 43
Follow project conventions: Read CLAUDE.md; study how neighboring code handles similar patterns.
- Distinctive: line 46
Scope to what changed: Default to recently modified code.
- Distinctive: line 55
Avoid batching multiple simplifications into one untested change.
- Distinctive: line 65
If the "simplified" version is harder to understand or review than the original, revert.
“Common” is measured: kept by at least 6 in 10 of the 71 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
Simplify code by reducing complexity while preserving exact behavior. The goal is not fewer lines — it's code that is easier to read, understand, modify, and debug. Every simplification must pass one test: "Would a new team member understand this faster than the original?"
When to use
- After a feature works and tests pass, but the implementation feels heavier than it needs to be
- During code review when readability or complexity issues are flagged
- When you encounter deeply nested logic, long functions, or unclear names
- After merging changes that introduced duplication or inconsistency
- Triggers on "simplify", "too complex", "refactor for clarity"
Not for: code you don't fully understand yet — comprehend before you simplify. Performance-critical code where the "simpler" version would be measurably slower. Throwaway code about to be rewritten entirely. Cross-module structural changes — extracting/moving modules, redrawing dependency boundaries, splitting or merging files → use refactoring. Designing where a seam or deep module should go (producing an audit, not executing) → use codebase-design. Single-file clarity stays here: naming, nesting, dead code.
Steps
1. Understand before touching (Chesterton's Fence)
Before changing or removing anything, understand why it exists. If you see a fence across a road and don't understand why it's there, don't tear it down.
- What is this code's responsibility? What calls it, what does it call?
- What are the edge cases and error paths? Are there tests defining expected behavior?
- Why might it have been written this way — performance? platform constraint? historical reason? Check
git blamefor the original context.
If you can't answer these, you're not ready. Read more context first.
2. Identify simplification opportunities
Scan for concrete signals — each is a specific pattern, not a vague smell. The full tables (structural complexity, naming, redundancy) with examples are in references/opportunities.md. Summary:
- Structural: deep nesting (3+ levels), long functions (50+ lines), nested ternaries, boolean parameter flags, repeated conditionals.
- Naming: generic names (
data,temp,result), abbreviations (usr,cfg), misleading names, comments restating "what" instead of "why". - Redundancy: duplicated logic, dead code, unnecessary abstractions, over-engineered patterns (factory-for-a-factory), redundant type assertions.
3. Apply the five principles
- Preserve behavior exactly. Same output for every input, same error behavior, same side effects and ordering, all existing tests pass without modification. If you're not sure a simplification preserves behavior, don't make it.
- Follow project conventions. Read CLAUDE.md; study how neighboring code handles similar patterns. Simplification that breaks project consistency is churn, not simplification.
- Prefer clarity over cleverness. Explicit code beats compact code when the compact version requires a mental pause to parse. A 1-line nested ternary is not simpler than a 5-line if/else.
- Maintain balance. Over-simplification is a failure mode: inlining too aggressively (removing a concept's name), combining unrelated logic into one complex function, removing abstractions that exist for extensibility or testability, optimizing for line count.
- Scope to what changed. Default to recently modified code. Avoid drive-by refactors of unrelated code unless explicitly asked to broaden scope — unscoped simplification creates noisy diffs and risks regressions.
4. Apply changes incrementally
One simplification at a time. Run the test suite after each change. The incremental-test, separate-PR, and Rule-of-500 rules are in §9 (behavior-preserving change discipline) of engineering-principles.md — apply them here.
- Make the change → run the suite + linter/formatter → pass: continue to the next; fail: revert and reconsider.
- Avoid batching multiple simplifications into one untested change. If something breaks, you need to know which simplification caused it.
5. Verify the result
Step back and evaluate the whole. Compare before and after:
- Is the simplified version genuinely easier to understand?
- Did you introduce any patterns inconsistent with the codebase?
- Is the diff clean and reviewable? Would a teammate approve?
If the "simplified" version is harder to understand or review than the original, revert. Not every simplification attempt succeeds.
Verify
- All existing tests pass without modification
- Build succeeds with no new warnings; linter/formatter passes (no style regressions)
- Each simplification is a reviewable, incremental change; the diff is clean — no unrelated changes mixed in
- Simplified code follows project conventions (checked against CLAUDE.md or equivalent)
- No error handling removed or weakened; no dead code left behind (unused imports, unreachable branches)
- The "simplified" code is genuinely easier to understand than the original
Red flags: simplification that requires modifying tests to pass (you likely changed behavior); "simplified" code that is longer and harder to follow than the original; renaming to match personal 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 hard-to-review commit; refactoring outside the current task's scope without being asked.
References
- ${CLAUDE_PLUGIN_ROOT}/references/engineering-principles.md — shared discipline (enforce simplicity, surgical scope, verify don't assume)
- ${CLAUDE_PLUGIN_ROOT}/references/clean-code.md — meaningful names, small functions, comments, error handling (Uncle Bob)
- references/opportunities.md — full simplification-opportunities tables (structural / naming / redundancy) + language-specific examples (TypeScript, Python, React/JSX)
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.

