Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/emretheus/prespec/prespecnpx skills add emretheus/prespec --skill prespecgit clone --depth 1 https://github.com/emretheus/prespecWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/emretheus/prespec/prespec)<a href="https://agentmods.dev/skills/emretheus/prespec/prespec"><img src="https://agentmods.dev/badge/skills/emretheus/prespec/prespec.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00091 | $0.01164 |
| Opus 5 | $0.00046 | $0.00582 |
| Sonnet 5 | $0.00018 | $0.00233 |
| Haiku 4.5 | $0.00009 | $0.00116 |
Grade A, and why
prespec scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 141 lines — stays where its author put it; the contents beside it link to each section on GitHub.
prespec
Writing the test cases first is writing the specification first. A test case is the only spec format that is unambiguous and checkable, which is why the spec is expressed as cases rather than prose.
This is not an edge-case checklist. A feature's spec has five parts, and edge cases are one of them:
| Section | Answers |
|---|---|
| What it must do | The feature working, on ordinary input |
| Contract it must honour | Response shape, status, ordering, scope |
| Boundaries it must hold at | Empty, one, enormous, past-the-end |
| Conditions it must survive | Races, partial failure, concurrent writes |
| Guarantees it must not break | Security, and what the user is left believing |
An agent that skips straight to section three has written a warning list, not a spec.
The order
1. Do not write implementation code yet.
Not a scaffold, not a "rough version". Changing your mind is free right now and expensive in twenty minutes.
2. Call define_behavior.
feature_description: what is being built, in the user's own words
side: backend | frontend | both
depth: quick (~5) | standard (~12) | deep (~25)
Use deep when the feature handles money, credentials, permissions, or
anything irreversible. Happy-path and contract cases come back in full at every
depth — depth only controls how far into the failure modes you go.
Read gaps in the response. If it says the domain has no defining behaviour,
the bank only knows how this breaks, not what it should do — write that part
yourself and say you did.
If matched_domains is empty the bank does not cover this. Say so in one line,
proceed on your own judgement, and do not imply the bank backed you.
3. Ask 2–4 questions. Not more.
open_questions is raw material, not a script. Ask only where a different
answer produces genuinely different code. Where one answer is obviously right,
decide it yourself and put it in step 4.
Ask in the user's vocabulary:
When a user changes their password, should their other devices be logged out?
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 141 lines · 91 tokens per session scan A 6e9c6787f6bc
prespec is a skill published in the GitHub repository emretheus/prespec (0 stars, last pushed 1mo ago), licensed MIT. It adds 91 tokens to every session and 1,164 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
absolute-work
End-to-end, phase-gated SDLC for AI coding agents: relentless design interview → reviewed spec → dependency-graphed task board → safe-wave TDD execution → verification → converge. Handles features, bugs, refactors, greenfield projects, planning breakdowns, and migrations. Triggers on "absolute work", "build this…
implement
Implement a specification using a TDD-oriented workflow. Extracts requirements, generates tests first, then implements to pass the tests. Includes spiral detection and acceptance gates.
dev-pipeline
Issue → Explore → Plan → TDD (Red→Green→Refactor) → Benchmark → PR → Review.
test-driven-fix
Test-first debugging loop that reproduces bugs with failing tests, then iterates until tests pass. Activates for "write a test first", "test-driven fix", "TDD fix", "reproduce with test", "make it pass", or when fixing bugs that have an existing test suite.
Test Driven Development
Strict Red-Green-Refactor implementation methodology for high quality, regression-free software.
test-first-contract
Turns requirements and invariants into executable tests before or alongside implementation.