yagni-slice
Skill0 starsChanged 2 months agoMITView on GitHub
Use when implementing a feature or change request. Deliver the smallest slice that satisfies the ask; refuse speculative abstractions, unused extension points, and "while we're here" work.
In this repository9 other files it gives its agents.
- adversarial-reviewSkill
- api-compatSkill
- flaky-test-triageSkill
- incident-hotfixSkill
- perf-measure-firstSkill
- repro-firstSkill
- secrets-hygieneSkill
- skill-authorSkill
- test-plan-firstSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
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
- could be automatic: a setting could enforce it
- Distinctive: line 27
Do not delete large modules, force-push, or rewrite public APIs without explicit confirmation.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
YAGNI Slice
When to use
- Building a new feature, endpoint, CLI flag, or UI flow from a concrete ask.
- A change request is vague enough that over-building is a risk.
- Reviewing your own plan and noticing frameworks, plugins, or generics "for later".
When not to use
- The user explicitly requested a reusable library, public API, or multi-tenant design.
- Migrating an established pattern already used elsewhere in the codebase.
- Hardening for a documented compliance or security requirement.
Assumptions
- Access to the repo, issue/PR text, and ability to run existing tests.
- Product intent is the written ask (issue, message, acceptance criteria) — not inferred future needs.
- Do not delete large modules, force-push, or rewrite public APIs without explicit confirmation.
Workflow
- Quote the acceptance criteria in one short list (what "done" means).
- Draft the thinnest implementation path that hits every criterion.
- Cut anything not required for those criteria (extra configs, indirection, unused types).
- Implement the slice; stop when criteria are met and tests prove it.
- List deferred ideas in the PR/notes — do not code them.
Steps
- Ask → checklist — Convert the request into 3–7 testable bullets. If a bullet is "support every X", challenge it down to the needed X.
- Reuse first — Search the repo for an existing helper before inventing a new layer.
- One path — Prefer a straight-line implementation over strategy/plugin/factory patterns unless two real call sites already exist.
- No speculative files — Do not add empty
utils/,types/future.ts, or feature flags "just in case". - Diff budget — If the diff grows beyond the ask, split or delete the extras before merging.
- Name deferrals — In the PR body, note follow-ups explicitly so they are not smuggled into this change.
Success criteria
- Every acceptance bullet is met by the change.
- No unused abstractions, dead config keys, or unreachable code paths were introduced for hypothetical needs.
- Diff is explainable as one concern in a short summary.
- Deferred work is written down, not partially implemented.
- Destructive or breaking cleanup was confirmed or avoided.
Out of scope
- Large-scale architecture redesigns requested as the primary goal.
- Dependency policy (use a dedicated no-new-deps style skill).
- Incident response where speed overrides elegance (use incident-hotfix).
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.

