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 commands/punt-labs/z-spec/contracts-devgit clone --depth 1 https://github.com/punt-labs/z-specWrote 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/commands/punt-labs/z-spec/contracts-dev)<a href="https://agentmods.dev/commands/punt-labs/z-spec/contracts-dev"><img src="https://agentmods.dev/badge/commands/punt-labs/z-spec/contracts-dev.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.00017 | $0.07252 |
| Opus 5 | $0.00009 | $0.03626 |
| Sonnet 5 | $0.00003 | $0.01450 |
| Haiku 4.5 | $0.00002 | $0.00725 |
Grade A, and why
contracts-dev 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 3d 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.
Copies of this mod
1 near-identical copy found in the catalogue:
- contracts — 98% identical, 34 lines differ
How it starts
The opening of the file, as written. The whole thing — 938 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/z-spec-dev:contracts-dev - Generate Runtime Contracts
Generate runtime precondition, postcondition, and invariant assertion
functions in the target language from Z schemas. Unlike /z-spec-dev:model2code-dev
which generates implementation code, this command generates checks --
assertion functions that verify spec conformance at runtime.
Contracts are the executable bridge between specification and implementation. They encode Z predicates as runtime assertions so that violations are caught immediately rather than silently corrupting state.
Input
Arguments: $ARGUMENTS
Parse arguments:
- First positional argument: Z specification file (default: search
docs/*.tex) - Second positional argument or auto-detect: target language (swift, typescript, python, kotlin)
--invariants-only: generate only state invariant checks (no operation contracts)--wrap: also generate wrapper functions with before/after assertion sandwiches--strip: emit no-op stubs (empty function bodies) for production builds
Process
0. Prerequisites
The specification should exist and be type-checked. If the spec
has not been checked, suggest running /z-spec-dev:check-dev first but
do not block -- contracts can still be generated from a
syntactically valid spec.
Verify fuzz is available for type-checking:
which fuzz >/dev/null 2>&1 || echo "FUZZ_NOT_FOUND"
If fuzz is found, run a type-check to confirm the spec is valid:
fuzz -t <spec.tex>
If fuzz reports errors, warn the user but continue. Contract generation does not require a passing type-check, but the generated assertions may reference invalid types.
No other external tools are needed.
1. Locate the Specification
If a file path is provided, use it directly.
If no file specified:
- Look in
docs/for.texfiles containing Z specifications - If multiple found, ask user to specify
Read the specification file.
2. Detect Target Language
If a language is explicitly provided as the second argument, use it.
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.
- 3d ago First seen · 938 lines · 17 tokens per session scan A 54782bf05f05
contracts-dev is a command published in the GitHub repository punt-labs/z-spec (5 stars, last pushed 4d ago), licensed MIT. It adds 17 tokens to every session and 7,252 once invoked, about $0.0001 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 commands, from other repositories
meeting-listen
Play back a completed meeting summary as a voiced debate between personas.
meeting-hive
Run an autonomous PR/FAQ review meeting where four personas debate and reach consensus without user intervention.
vote
Assess whether a PR/FAQ should move forward with a structured go/no-go decision.
feedback
Incorporate feedback into PR/FAQ and redraft affected sections.
feedback-to-us
Tell us how the prfaq plugin is working for you (anonymous 1-5 feedback).
badge
Generate a stage-colored badge and embed it in your README.