simplify
Skill2 starsChanged 4 months agoMITView on GitHub
Use when refining recently written code, reviewing a diff for unnecessary complexity, doing cleanup passes, removing dead indirection, collapsing duplicate concepts, reducing helper bloat, or checking whether a change can be smaller without losing clarity.
73 other projects use a version of this.
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 10 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 · 0
None found.
Wrote their own version · 73
- 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
- akitaonrails/my-skills★ 205same name
- DeL-TaiseiOzaki/claude-code-orchestra★ 198same name
- sd0xdev/sd0x-harness★ 191same name
63 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 repository8 other files it gives its agents.
- adversarial-reviewSkill
- interface-reviewSkill
- outcome-first-workflowsSkill
- plan-changesSkill
- repo-automationsSkill
- systematic-debuggingSkill
- trace-codebaseSkill
- writing-skillsSkill
The file
We split this skill into the rules it gives an agent
12 rules. 0 are common, 12 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 71 edited versions we read keep these.
12
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 8
Use this skill to make code smaller, clearer, and easier to reason about.
- Distinctive: line 25
Do not use this as the controlling skill when:
- Distinctive: line 38
Ask these before proposing or accepting a shape:
- Distinctive: line 51
Before adding a service, helper, or abstraction, write the direct version.
- Distinctive: line 85
Prefer guard clauses and early returns over deeply nested conditionals.
- Distinctive: line 101
If a value is computable from existing state, derive it at the point of use unless caching is required and justified.
- Distinctive: line 115
Use memoization only when there is a measured or obvious cost.
- Distinctive: line 135
Do not over-collapse true domain differences.
- Distinctive: line 160
Do not destructure and rebuild objects just to rename fields.
- Distinctive: line 187
If the summary type is a public API response, the adapter may be correct.
- Distinctive: line 207
When reporting simplification opportunities, keep them concrete:
- Distinctive: line 227
If line count increased, explained why the new shape is simpler.
“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
Simplify
Use this skill to make code smaller, clearer, and easier to reason about. The default posture is deletion, but the goal is not the fewest lines at any cost. The goal is the simplest behavior-preserving shape that a future maintainer can trust.
Use And Near Misses
Use this when:
- refining code you just wrote;
- reviewing a PR or branch for avoidable complexity;
- doing a cleanup pass;
- a value changes names across layers;
- helper functions, wrapper types, or translation objects do not earn their existence;
- one concept has multiple code paths.
Do not use this as the controlling skill when:
- the main task is a correctness, security, or data-loss fix;
- adding tests or safety checks increases lines but reduces risk;
- a public API needs a small adapter for compatibility;
- a domain concept is complex because the domain is complex;
- readability would get worse just to make
git diff --statsmaller.
Line count is a signal, not a verdict. If simplification adds lines, explain why the resulting code is still simpler.
Core Questions
Ask these before proposing or accepting a shape:
- Can't we just use the existing value, function, or type?
- How many names does this concept have between source and use?
- Does this layer own a real decision, or is it just passing data through?
- Is this state derived from existing data?
- Is this abstraction used enough to earn a name?
- Would deleting this make the code harder to misuse?
Simplification Moves
Prefer The Direct Version
Before adding a service, helper, or abstraction, write the direct version. If the direct version works and stays readable, use it.
// Overbuilt: strategy object for one lookup.
const resolver = new PriceResolver(items);
const price = resolver.resolve(type);
// Direct.
const price = items.find((item) => item.type === type)?.price ?? null;Inline Single-Use Helpers
Extract when a helper removes real duplication, names a non-obvious domain operation, or isolates a boundary. Inline when it only wraps a one-liner.
// Weak helper.
function getDefaultId(items: Item[], type: string) {
return items.find((item) => item.type === type)?.id ?? null;
}
const id = getDefaultId(items, type);
// Simpler.
const id = items.find((item) => item.type === type)?.id ?? null;Exception: keep a single-use helper when it creates a meaningful boundary, such as parsing untrusted input, encapsulating a tricky browser API, or naming a business rule that would otherwise be opaque.
Flatten Control Flow
Prefer guard clauses and early returns over deeply nested conditionals.
function process(item: Item | null) {
if (!item?.isValid || item.type !== "active") {
return null;
}
return doWork(item);
}One ternary is fine. Nested ternaries are usually a rewrite.
Derive Instead Of Synchronizing
If a value is computable from existing state, derive it at the point of use unless caching is required and justified.
// Sync liability.
const [filteredItems, setFilteredItems] = useState<Item[]>([]);
useEffect(() => {
setFilteredItems(items.filter(predicate));
}, [items]);
// Derived.
const filteredItems = items.filter(predicate);Use memoization only when there is a measured or obvious cost. Do not add cache invalidation problems to avoid cheap computation.
Collapse Parallel Code Paths
Two functions that differ only by mode are usually one function with a clear option.
function getItems({
config,
includeDeprecated = false,
}: {
config: Config;
includeDeprecated?: boolean;
}) {
// shared logic
}Do not over-collapse true domain differences. If two code paths enforce different invariants, keep the boundary and make the distinction explicit.
Keep One Name Per Concept
Name drift creates mapping code that hides bugs. Carry the same concept name through the stack unless crossing a real boundary or language convention.
// Name drift.
repo layer -> workspace
service layer -> workspaceData
component layer -> currentContext
// One concept, one name.
repo layer -> workspace
service layer -> workspace
component layer -> workspaceAcceptable boundary changes include workspace_id at the database layer and
workspaceId in TypeScript. That is syntax convention, not semantic renaming.
Pass Objects Whole
Do not destructure and rebuild objects just to rename fields. Preserve the original shape and add only what is new.
const enrichedProject = {
...project,
isActive: project.settings.active,
};Delete Translation Theater
Mapping functions that only pick fields and rename them are suspicious. Keep them only when they enforce a real wire contract, privacy boundary, or versioned API.
// Usually unnecessary if no boundary is being enforced.
function toSessionSummary(session: Session): SessionSummary {
return {
sessionId: session.id,
sessionStatus: session.status,
messageCount: session.messages.length,
};
}If the summary type is a public API response, the adapter may be correct. If it is internal plumbing, delete it and use the original object.
Anti-Patterns
| Smell | Better move |
| Helper used in one place | Inline unless it names a real boundary. |
useState plus effect for derived data | Derive during render or memoize only when needed. |
| Value has three names across layers | Collapse to one concept name. |
| Same name used for different concepts | Disambiguate at the source. |
| Function destructures and rebuilds with new keys | Spread and extend, or delete the function. |
| Wrapper type only renames fields | Use the original type or define a real boundary DTO. |
| Admin/app duplicate functions | One function with a clear option if invariants match. |
| Stored field computable from existing data | Derive it unless persistence is required. |
| New helper when an existing one does most of it | Extend existing code or use it directly. |
| Dense reducer replacing clear code | Prefer readable multi-step code. |
Review Output
When reporting simplification opportunities, keep them concrete:
1. `<path>` / `<symbol>`
Current shape: <what exists now>
Simpler shape: <what to delete, inline, derive, or unify>
Why it is safe: <behavior-preserving reason or boundary note>
Impact: <rough line delta or removed concept>For implementation, make one simplification at a time and run the narrowest check that proves behavior stayed intact.
Done Criteria
- Removed or collapsed at least one real source of complexity, or explicitly concluded that the current complexity earns its place.
- Preserved behavior and public contracts.
- Did not replace clear code with clever dense code.
- Ran a focused check when code changed.
- If line count increased, explained why the new shape is simpler.
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.

