antfu-simplify
Simplify the changes of the current PR or working tree with an ablation study - remove each piece of the diff and keep only what is proven needed - so the result has just-right abstraction, minimal clean code, and stays robust and universal
Install / Use
npx skills add antfu/skills --skill antfu-simplifyInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Development & EngineeringSupported Platforms
Our assessment of antfu-simplify
antfu-simplify scores 85/100 on our quality scale, 2612th of 4,628 Development & Engineering skills we index.
Its SKILL.md is 6.3 KB long, split into 7 sections with 1 code example: a thorough specification that gives an agent plenty to work with.
With 5,920 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated about 4 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 98/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands.
Automated pattern scan on 2026-11-03. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
antfu-simplify compared with similar skills
All 4 of these similar skills score higher than antfu-simplify; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| antfu-simplify (this skill)by antfu | 85 | 5.9k | 4mo ago | SKILL.md |
| taste-skillby Leonxlnx | 100 | 108.6k | 2d ago | CLAUDE.md |
| ai-job-searchby ai-job-search-dev | 100 | 69.0k | today | CLAUDE.md |
| claude-howtoby luongnv89 | 100 | 46.4k | today | CLAUDE.md |
| algorithmic-artby anthropics | 100 | 177.9k | 41d ago | SKILL.md |
Frequently asked questions
- How do I install antfu-simplify?
- Run
npx skills add antfu/skills --skill antfu-simplify. The install tabs above show the steps for each supported agent. - Which AI agents does antfu-simplify work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is antfu-simplify safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. It is MIT-licensed and scores 98/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is antfu-simplify still maintained?
- The repository was last updated about 4 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
Skill content
View source on GitHubname: antfu-simplify description: Simplify the changes of the current PR or working tree with an ablation study - remove each piece of the diff and keep only what is proven needed - so the result has just-right abstraction, minimal clean code, and stays robust and universal. Use when asked to simplify, slim down, clean up, or reduce the current changes or PR. metadata: author: Anthony Fu version: "2026.10.31"
Simplify Changes
Review the current changes (PR branch or working tree) and cut them down to the smallest correct diff, the way a skilled developer would. The method is an ablation study: remove each piece, check whether anything that matters breaks, and keep only what earns its place.
Goal: clean, minimal code with the just-right abstraction, that is also robust (handles real edge cases) and universal (solves the general case, not only the one that triggered the change).
Hard Rules
- Behavior stays the same. Simplify only. Do not add features, change public APIs, or fix unrelated issues. Report unrelated findings instead.
- Scope is the diff. Only touch code the change introduced or modified, plus code that must change to remove it. Do not refactor the surrounding codebase.
- Every removal is verified. Run the repo's tests, typecheck, and lint after each batch. If a check has no coverage for the removed piece, reason about it explicitly or keep it.
- Match the surrounding code's style, naming, and comment density.
Workflow
- Get the diff. Pick the base: PR target branch merge base (
git merge-base HEAD origin/<default>), elsegit diff HEADfor uncommitted work. Read the full diff and the files around it. Note the goal of the change in one sentence; it is the yardstick for everything below. - Inventory the pieces. List each unit the diff adds: function, parameter, option, branch, type, file, dependency, abstraction layer, comment, test. See Ablation Study.
- Ablate. For each piece, try removing, inlining, or merging it. Decide keep or cut using Keep vs Cut.
- Apply the cuts in small steps. After each batch run focused checks (tests, typecheck, lint). Revert a cut that breaks behavior; that piece is now proven needed.
- Check the result. Re-read the final diff as a reviewer. Is each remaining line explained by the one-sentence goal? Is it still robust and general?
- Report. Show a short table of what was cut or kept and why, plus the diff size before and after (
git diff --stat). Do not commit unless asked.
Ablation Study
For every piece in the diff, ask: if I delete this, what concretely breaks?
| Piece | Ablation | Keep if | |-------|----------|---------| | New function / helper | Inline it at the call site | Called from 2+ places, or the name explains a non-obvious step | | Wrapper / abstraction layer | Call the underlying thing directly | It hides real complexity or a likely-to-change boundary | | Parameter / option / config | Hardcode the only used value | A real caller needs a different value now | | Type / interface / generic | Use the inferred or existing type | It is exported, or inference gives a worse or wrong type | | Branch / guard / try-catch | Delete it and run tests | It guards a reachable case (real input, real failure), not an impossible one | | New file / module | Merge it into its only consumer | It has multiple consumers or a distinct responsibility | | Dependency | Replace with a few lines or an existing dep | It handles hard edge cases you would otherwise get wrong | | Duplicate logic | Reuse an existing util in the repo | No equivalent exists (search first) | | Comment | Delete it | It explains why (constraint, workaround, surprising choice), not what | | Test | Remove it and see what is unprotected | It covers behavior or a regression nothing else covers | | Changed lines unrelated to the goal | Revert them | Never keep drive-by edits |
Keep vs Cut
Cut when the piece is:
- Speculative: built for a future need nobody has (extra options, hooks, plugin points, "just in case" generics).
- Redundant: repeats what the language, framework, types, or an existing util already provides.
- Defensive against the impossible: null checks on values the types or callers guarantee, fallbacks that never run, catch blocks that swallow errors.
- Indirection without payoff: one-use helpers, pass-through wrappers, classes where a function works, factories that build one thing.
- Noise: commented-out code, narrating comments, unused imports and exports, formatting-only churn.
Keep (or even add) when the piece is:
- Robustness: handles real edge cases (empty input, concurrency, cleanup, cross-platform paths, error propagation with context).
- Universality: solves the general problem instead of special-casing the reported one. If the fix hardcodes a name, path, or value from the bug report, generalize it.
- Right-sized abstraction: the third repetition of something gets extracted; the first and second usually do not. A good abstraction removes more code than it adds.
If an abstraction is too small, merge; if a function does several unrelated things, split. The target is neither fewest lines nor most layers, it is the fewest concepts a reader must hold.
Smells to Look For
- A fix that patches the symptom at the call site instead of the cause.
- Special cases (
if (name === 'foo')) where a general rule would cover them. - Two code paths that do the same thing with small differences; unify them.
- State, flags, or caches that can be derived from existing data.
- Long parameter lists or option bags where most values are never varied.
- Types duplicated by hand when they can be derived (
typeof,ReturnType,Parameters, utility types). - Hand-rolled utilities that the repo, runtime, or an existing dependency already has.
- Tests that assert implementation details or mirror the code line by line.
Report Format
| # | Piece | Action | Why |
|---|-------|--------|-----|
| 1 | `parseOptions()` in src/cli.ts | inlined | one caller, 3 lines |
| 2 | `retry` option | removed | no caller passes it; default is enough |
| 3 | `try/catch` in fetchData | kept | network errors reach users; test covers it |
Diff: +142 -8 -> +61 -8. Tests, typecheck, lint pass.
List anything noticed but out of scope (unrelated bugs, wider refactors) separately, and leave it alone.
Related Skills
taste-skill
108.6kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
ai-job-search
69.0kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
claude-howto
46.4kA visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
