api-design

api-design is a skill for Claude Code, Codex from sawrus/agent-guides. It costs 68 tokens per session (779 once invoked), scanned A, original, MIT.

A guide for designing and building REST APIs, which let programs communicate over HTTP using URLs, standard methods, and response codes. It covers naming, versioning, errors, OpenAPI documentation, pagination, and safe retries.

In plain words
What is it for?
Use it when creating or reviewing endpoints, choosing HTTP methods and status codes, defining error responses, documenting an API, or handling pagination and repeated requests.
Why use it?
It helps keep an API predictable for the people and applications that use it. Consistent rules reduce misunderstandings and make changes safer.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when creating or reviewing endpoints, choosing HTTP methods and status codes, defining error responses, documenting an API, or handling pagination and repeated requests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sawrus/agent-guides/api-design
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.

Any agent
npx skills add sawrus/agent-guides --skill api-design
Clone the repo
git clone --depth 1 https://github.com/sawrus/agent-guides

Made for: Claude Code, Codex.

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-design

README.md
[![agentmods](https://agentmods.dev/badge/skills/sawrus/agent-guides/api-design/github.svg)](https://agentmods.dev/skills/sawrus/agent-guides/api-design)
Your own site
<a href="https://agentmods.dev/skills/sawrus/agent-guides/api-design"><img src="https://agentmods.dev/badge/skills/sawrus/agent-guides/api-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.

agentmods 80×15 button for api-design

Your own site · 80×15
<a href="https://agentmods.dev/skills/sawrus/agent-guides/api-design"><img src="https://agentmods.dev/badge/skills/sawrus/agent-guides/api-design.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 779 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00068 $0.00779
Opus 5.5 $0.00027 $0.00312
Sonnet 5.5 $0.00014 $0.00156
Haiku 4.5 $0.00007 $0.00078

Measured 1mo ago against content hash 2aeab9e23d75, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

api-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 1mo 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.

areas/software/backend/skills/api-design/SKILL.md · 63 lines

How it starts

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

API contract: add or change

1. Find the contract

  1. Look for the spec: openapi.yaml, api/*.yaml, docs/api/, *.proto under proto/ or api/.
  2. If the code generates the spec (FastAPI, springdoc, swaggo), find the command that exports it and use the exported file in step 4.
  3. If no spec exists, write down the current request and response of the endpoint from the code and its tests.
  4. Find the consumers: other services, frontends, published SDKs. Ask the user if they are not known.

2. Edit the contract first

  1. Change the spec before the code. Keep the change to the endpoint or message the task names.
  2. HTTP: one resource per path, plural nouns (/orders/{orderId}), standard methods and status codes, one error schema for all endpoints (for example RFC 9457 application/problem+json).
  3. List endpoints take limit and a cursor (page_token / next_page_token) and return a bounded page.
  4. A create endpoint that clients may retry accepts an Idempotency-Key header.
  5. gRPC: add fields with new field numbers. Never reuse or renumber a field; reserved removed numbers and names.

3. Classify the change

Additive (safe):

  • new endpoint, new optional request field, new response field, new enum value that clients ignore.

Breaking:

  • removed or renamed field or endpoint, new required request field, changed type or format, changed status code, stricter validation, changed field number or name in proto.

4. Check breaking changes with a tool

git show origin/main:openapi.yaml > /tmp/base.yaml
oasdiff breaking /tmp/base.yaml openapi.yaml --fail-on ERR
buf breaking --against '.git#branch=main'

If the tool reports a breaking change, do one of these:

  1. Make it additive: keep the old field, add the new one, and map both in the code.
  2. Add a new version (/v2/... path or a new proto package v2) and keep the old version running.
  3. If the user accepts the break, mark it as breaking in the changelog and the merge request, and name the consumers that must change.

Read the full file on GitHub · 63 lines

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. 1mo ago Changed · -108 lines · +47 tokens per session 2aeab9e23d75
  2. 3mo ago First seen · 171 lines · 21 tokens per session scan A d15e0b9db737

Subscribe to this mod's changes

api-design is a skill published in the GitHub repository sawrus/agent-guides (21 stars, last pushed 2d ago), licensed MIT. It adds 68 tokens to every session and 779 once invoked, about $0.0003 per session on Opus 5.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.

Related

api-design compared with skills from other repositories

api-design next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
api-designsawrus/agent-guidesSkill212d agoMITA68Claude Code, Codex
api-onboardingsickn33/agentic-awesome-skillsSkill51ktodayMITA46Claude Code
apify-generate-output-schemasickn33/agentic-awesome-skillsSkill51ktodayMITA45Claude Code
api-rate-limit-handlersickn33/agentic-awesome-skillsSkill51ktodayMITA32Claude Code
api-security-best-practicessickn33/agentic-awesome-skillsSkill51ktodayMITA29Claude Code
aws-serverless-edasickn33/agentic-awesome-skillsSkill51ktodayMITA42Claude Code
mcp-buildersickn33/agentic-awesome-skillsSkill51ktodayMITA49Claude Code