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 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/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<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="Reviewed on agentmods" width="80" 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.1 | $0.00079 | $0.01487 |
| Opus 5.5 | $0.00032 | $0.00595 |
| Sonnet 5.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 2mo 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.
- 2mo 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 (3 stars, last pushed yesterday), licensed MIT. It adds 79 tokens to every session and 1,487 once invoked, about $0.0003 per session on Opus 5.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
event-store-design
Design and implement event stores for event-sourced systems. Use when building event sourcing infrastructure, choosing event store technologies, or implementing event persistence patterns.
cqrs-implementation
Implement Command Query Responsibility Segregation for scalable architectures. Use when separating read and write models, optimizing query performance, or building event-sourced systems.
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-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…
workflow-orchestration-patterns
Design durable workflows with Temporal for distributed systems. Covers workflow vs activity separation, saga patterns, state management, and determinism constraints. Use when building long-running processes, distributed transactions, or microservice orchestration.
microservices-patterns
Design microservices architectures with service boundaries, event-driven communication, and resilience patterns. Use when building distributed systems, decomposing monoliths, or implementing microservices.