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/chadixearth/graphyloop/api-contract-designnpx skills add chadixearth/graphyloop --skill api-contract-designgit clone --depth 1 https://github.com/chadixearth/graphyloopWrote 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/chadixearth/graphyloop/api-contract-design)<a href="https://agentmods.dev/skills/chadixearth/graphyloop/api-contract-design"><img src="https://agentmods.dev/badge/skills/chadixearth/graphyloop/api-contract-design.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.00079 | $0.01487 |
| Opus 5 | $0.00039 | $0.00744 |
| Sonnet 5 | $0.00016 | $0.00297 |
| Haiku 4.5 | $0.00008 | $0.00149 |
Grade A, and why
api-contract-design scanned grade A with 1 finding 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
- `curl` the real endpoint and diff the body against the contract for the fields How it starts
The opening of the file, as written. The whole thing — 128 lines — stays where its author put it; the contents beside it link to each section on GitHub.
API contract design
Parallel lanes fail at the seam: the backend returns {data: {...}}, the frontend
was written against {...}, and the tests mock a third shape. Freezing the contract
first is what makes wave-style parallel work safe (see graphyloop-waves) — this
skill is what "frozen" means in practice.
When to activate
- Wave 0 / contract stage of any feature with a backend and a client.
- Adding an endpoint, or changing one that already has callers.
- A field rename, a nullable-to-required change, an error-shape change.
- "The frontend is broken but the API works" — usually a contract drift.
The contract artifact
A contract is a file in the repo, not a paragraph in chat. One of:
- OpenAPI/JSON Schema (
openapi.yaml) — best when clients are generated from it. - A shared schema module (zod/valibot/pydantic) imported by both handler and client — the type checker becomes the enforcer.
- A typed client + a fixtures file consumed by the tests.
Whichever you pick, it must state per endpoint: method + path · auth + required role/scope · path/query params with types and defaults · request body schema · success status + response schema · every error status with its code · idempotency and rate-limit behavior. Anything not written down is not part of the contract and will be implemented differently by each lane.
Shapes and naming
- One envelope for the whole API, chosen once: either bare resources
(
{"id": ...}) or wrapped ({"data": ..., "meta": ...}). Mixing them per endpoint is the single most common drift. - Consistent casing (
snake_caseorcamelCase) across every payload — including nested objects and error fields. Pick one; a mapper at the boundary if the database disagrees. - Timestamps: ISO 8601 UTC strings (
2026-08-16T14:03:00Z). Money: integer minor units or a decimal string plus acurrency— never a float. Ids: string in JSON even when numeric in the database. - Nullable vs absent is a decision, not an accident: prefer explicit
nullfor "known empty", omit only for "not requested" (sparse fieldsets). - Collections always return an object, never a bare top-level array — you will need
to add
metalater, and an array cannot grow. - Enums are closed and documented; clients must tolerate an unknown value without crashing (render a fallback).
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 · 128 lines · 79 tokens per session scan A b3b2d7a6e663
api-contract-design is a skill published in the GitHub repository chadixearth/graphyloop (2 stars, last pushed 17d ago), licensed MIT. It adds 79 tokens to every session and 1,487 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
agent-code-analyzer
Agent skill for code-analyzer - invoke with $agent-code-analyzer.
agui-dotnet-streaming-chat
Get started with the AG-UI .NET SDK: bootstrap and run your first streaming-chat app (client + server) with the AG-UI .NET NuGet packages (AGUI.Client, AGUI.Server, AGUI.Formatting, AGUI.Abstractions). USE FOR: which packages to install and how to wire them; constructing an AGUIChatClient against an endpoint and…
agui-dotnet-sample-step
Add a GettingStarted sample Step (a Server/Client pair) to the AG-UI .NET SDK that demonstrates one protocol feature the way we want users to write it. USE FOR: adding a new samples/GettingStarted/StepNN Server+Client pair, wiring it into AGUI.slnx and the integration-test project, giving it a deterministic…
agui-dotnet-protobuf
Use the protobuf wire transport (instead of the default Server-Sent Events) for an AG-UI connection with the AG-UI .NET SDK — a compact binary event stream negotiated via the Accept header. USE FOR: making an AGUIChatClient prefer protobuf by wiring an AGUIEventStreamHandler with ProtobufEventStreamFormatter (then…
revdiff-plan
Review the last Codex assistant message (plan, analysis, or proposal) with inline annotations in a TUI overlay. Extracts the most recent response from Codex rollout files and opens it in revdiff for review and annotation. Activates on "revdiff-plan", "review plan with revdiff", "annotate plan", "review last response"…
flow-next-tracker-sync
Project a flow-next spec to a tracker issue (Linear, GitHub, GitLab, Jira) and reconcile two-way. Use when asked to sync to a tracker. NOT plan-sync.