- name
SKILL.md
Die Skill-Datei bleibt im Repository des Herausgebers.
Fügen Sie den kopierten Befehl in ein Terminal ein. Er installiert diese SKILL.md in dem jeweiligen Agenten.
npx skills add antfu/skills --skill antfu-simplify -a cursor -yFügen Sie den kopierten Befehl in ein Terminal ein. Er installiert diese SKILL.md in dem jeweiligen Agenten.
npx skills add antfu/skills --skill antfu-simplify -a claude-code -yFügen Sie den kopierten Befehl in ein Terminal ein. Er installiert diese SKILL.md in dem jeweiligen Agenten.
npx skills add antfu/skills --skill antfu-simplify -a codex -yFügen Sie den kopierten Befehl in ein Terminal ein. Er installiert diese SKILL.md in dem jeweiligen Agenten.
npx skills add antfu/skills --skill antfu-simplify -a grok -ySenden Sie die kopierte Nachricht in einem Grok Bot-Chat. Der Bot ruft diese SKILL.md von GitHub ab und fügt sie den Skills hinzu, die alle Ihre Bots gemeinsam nutzen.
Install this skill: https://github.com/antfu/skills/tree/HEAD/skills/antfu-simplifyVom Herausgeber
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).
git merge-base HEAD origin/<default>), else git diff HEAD for 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.git diff --stat). Do not commit unless asked.For every piece in the diff, ask: if I delete this, what concretely breaks?
Cut when the piece is:
Keep (or even add) when the piece is:
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.
if (name === 'foo')) where a general rule would cover them.typeof, ReturnType, Parameters, utility types).| # | 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.
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 cl
---name: antfu-simplifydescription: Simplify the changes of the current PR or working tree with an ablation study - remove each piece of the diff…---# skills/antfu-simplify/SKILL.mdÜbersicht
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.
FAQ
Laden Sie skills/antfu-simplify/SKILL.md vom Herausgeber herunter oder kopieren Sie den Pfad und öffnen Sie das Repository. PlugMCP listet den Skill und hostet die Datei nicht.
Der Herausgeber pflegt es unter https://github.com/antfu/skills.
Claude, Cursor, Codex und Grok Build können eine SKILL.md lesen, die Sie aus dem Repository des Herausgebers hinzufügen. Grok Bot installiert sie, wenn Sie den Link zum GitHub-Ordner des Skills in einem Chat senden.