api-contract-design

api-contract-design is a skill for Claude Code, Codex from rsmdt/the-startup. It costs 44 tokens per session (902 once invoked), scanned A, original, MIT.

A guide for designing REST or GraphQL APIs, which are agreed ways for software systems to exchange data. It covers the contract, naming, errors, authentication, versioning, pagination, and other consumer-facing decisions.

In plain words
What is it for?
Use it to choose an API style, write OpenAPI or Swagger specifications, define authentication and error responses, plan version changes, and design endpoints for web, mobile, or service consumers.
Why use it?
It makes the API predictable for its users and lets teams agree on how endpoints behave before writing the implementation.

Skill for Claude CodeCodex

Part of the team plugin — 16 skills, 2 agents shipped together

Install

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.

agentmods
npx agentmods add skills/rsmdt/the-startup/api-contract-design
Any agent
npx skills add rsmdt/the-startup --skill api-contract-design
Clone the repo
git clone --depth 1 https://github.com/rsmdt/the-startup

Made for: Claude Code, Codex.

Or install team, the plugin that ships this one along with the rest of its 16 skills, 2 agents.

Wrote 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.

agentmods badge for api-contract-design

README.md
[![agentmods](https://agentmods.dev/badge/skills/rsmdt/the-startup/api-contract-design.svg)](https://agentmods.dev/skills/rsmdt/the-startup/api-contract-design)
Your own site
<a href="https://agentmods.dev/skills/rsmdt/the-startup/api-contract-design"><img src="https://agentmods.dev/badge/skills/rsmdt/the-startup/api-contract-design.svg" alt="Measured on agentmods" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 902 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00044 $0.00902
Opus 5 $0.00022 $0.00451
Sonnet 5 $0.00009 $0.00180
Haiku 4.5 $0.00004 $0.00090

Measured 4d ago against content hash 2f8533ee9ca6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

api-contract-design 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.

plugins/team/skills/development/api-contract-design/SKILL.md · 119 lines

How it starts

The opening of the file, as written. The whole thing — 119 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Persona

Act as an API design specialist who creates developer-friendly, consistent, and evolvable API contracts. You apply contract-first design principles, ensuring APIs are defined before implementation to enable parallel development and clear communication.

Design Target: $ARGUMENTS

Interface

ApiStyle { type: REST | GRAPHQL | HYBRID versioning: URL_PATH | HEADER | QUERY_PARAM | DUAL auth: API_KEY | OAUTH2 | JWT | NONE }

DesignDecision { area: string // e.g., pagination, error format, naming choice: string // selected approach rationale: string // why this choice fits }

State { target = $ARGUMENTS apiStyle: ApiStyle decisions: DesignDecision[] contract: string }

Constraints

Always:

  • Define the API contract before any implementation begins.
  • Apply consistent naming conventions across all endpoints (plural nouns, kebab-case).
  • Standardize error response format across all endpoints.
  • Include rate limit headers and idempotency keys for non-idempotent operations.
  • Use HTTPS exclusively.
  • Version the API from day one.
  • Document all error codes with resolution steps.
  • Identify at least the primary consumer (web, mobile, server, third-party).
  • Map each use case to specific resource operations.

Never:

  • Expose internal implementation details (database IDs, stack traces) in responses.
  • Use GET for operations with side effects.
  • Mix REST and RPC styles in the same API.
  • Break existing consumers without versioning.
  • Authenticate via query parameters (except OAuth callbacks).
  • Create deeply nested URLs (more than 2 levels).
  • Return different structures for success vs error responses.

Reference Materials

Read the full file on GitHub · 119 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

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.

  1. 4d ago First seen · 119 lines · 44 tokens per session scan A 2f8533ee9ca6

Subscribe to this mod's changes

api-contract-design is a skill published in the GitHub repository rsmdt/the-startup (510 stars, last pushed 1mo ago), licensed MIT. It adds 44 tokens to every session and 902 once invoked, about $0.0002 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-30.