api-design-standards

api-design-standards is a skill for Claude Code, Codex from aethrox/doctrine. It costs 82 tokens per session (1,241 once invoked), scanned A, original, MIT.

A set of rules for designing web APIs, the interfaces that let software systems exchange requests and responses. It covers resource-based URLs, versioning, compatibility, and tests that check whether an API still matches what its users expect.

In plain words
What is it for?
Use it when creating endpoints, changing request or response formats, choosing versioning, or checking compatibility with API consumers.
Why use it?
It helps prevent accidental breaking changes that cause existing API consumers to fail.

Skill for Claude CodeCodex

Part of the doctrine plugin — 33 skills 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/aethrox/doctrine/api-design-standards
Any agent
npx skills add aethrox/doctrine --skill api-design-standards
Clone the repo
git clone --depth 1 https://github.com/aethrox/doctrine

Made for: Claude Code, Codex.

Or install doctrine, the plugin that ships this one along with the rest of its 33 skills.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/aethrox/doctrine/api-design-standards.svg)](https://agentmods.dev/skills/aethrox/doctrine/api-design-standards)
Your own site
<a href="https://agentmods.dev/skills/aethrox/doctrine/api-design-standards"><img src="https://agentmods.dev/badge/skills/aethrox/doctrine/api-design-standards.svg" alt="Measured on agentmods" height="20"></a>
Per session 82 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,241 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.00082 $0.01241
Opus 5 $0.00041 $0.00620
Sonnet 5 $0.00016 $0.00248
Haiku 4.5 $0.00008 $0.00124

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

Security

Grade A, and why

api-design-standards 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 5d 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.

skills/api-design-standards/SKILL.md · 58 lines

How it starts

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

API Design Standards

An API is a promise to callers you don't control and usually can't see. Adding to that promise is free; changing or removing part of it breaks someone who already depended on it. Every API change is classified against that promise (additive or breaking) before it ships, not discovered after a caller files a bug.

Phase 1: Resource and URL conventions

  • URLs name resources (nouns), never actions (verbs): POST /orders, not POST /createOrder. The HTTP method carries the verb.
  • Collections are plural (/orders), a specific member is the collection plus an identifier (/orders/{id}), and nesting reflects real ownership (/orders/{id}/items), not an arbitrary path someone found convenient.
  • HTTP methods map to a fixed meaning, and only that meaning: GET (read, no side effects, safe to retry and cache), POST (create, or a non-idempotent action), PUT (full replace, idempotent, calling it twice with the same body leaves the same state), PATCH (partial update), DELETE (remove, idempotent).
  • Status codes communicate outcome precisely: 2xx success (201 for created with a Location header, 204 for success with no body), 4xx the caller's fault (400 malformed request, 401 unauthenticated, 403 authenticated but not authorized, 404 not found, 409 conflict, 422 semantically invalid), 5xx the server's fault. Returning 200 with an error payload embedded in the body hides the failure from every generic HTTP-aware tool (retries, caches, monitoring).

Phase 2: Versioning strategy

Pick one signal and use it consistently across the whole API; mixing strategies forces every client to handle more than one:

Strategy How Tradeoff
URI path (/v2/orders) version segment in the path most discoverable and cacheable, but encourages whole-API version bumps for a change that only touched one resource
Header / content negotiation (Accept: application/vnd.api+json;version=2) version encoded in a request header most correct REST semantics (a version is a different representation of the same resource, not a different resource) but far less discoverable: undebuggable by just reading a URL
Query parameter (?version=2) version as a query param simplest to add after the fact, easiest to accidentally omit and silently get a default

Read the full file on GitHub · 58 lines

Files

What ships with it

1 file 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. 5d ago First seen · 58 lines · 82 tokens per session scan A 72c568360354

Subscribe to this mod's changes

api-design-standards is a skill published in the GitHub repository aethrox/doctrine (18 stars, last pushed 24d ago), licensed MIT. It adds 82 tokens to every session and 1,241 once invoked, about $0.0004 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.

Related

Other skills, from other repositories

openspec-verify-change

Verify implementation matches change artifacts. Use when the user wants to validate that implementation is complete, correct, and coherent before archiving.

Fission-AI/OpenSpec · 32 tokens

debug-optimize-lcp

Guides debugging and optimizing Largest Contentful Paint (LCP) using Chrome DevTools MCP tools. Use this skill whenever the user asks about LCP performance, slow page loads, Core Web Vitals optimization, or wants to understand why their page's main content takes too long to appear. Also use when the user mentions…

ChromeDevTools/chrome-devtools-mcp · 99 tokens

unity-version-split

Split a C# file into Unity 6.5+ and pre-Unity 6.5 variants. Use when a file needs different implementations for different Unity versions due to API changes (e.g., EntityId vs int, GetEntityId vs GetInstanceID).

IvanMurzak/Unity-MCP · 59 tokens

opik-diagnose

Surface the Opik traces worth a developer's attention, ranked by signal — errors, failed tool calls, latency, regressions, and low online-eval scores — plus Diagnostics issues. Reads live/production traces via the SDK (searchtraces and agentinsights) and works with no MCP; uses the MCP issue entity when connected.…

comet-ml/opik-mcp · 147 tokens

planning-and-task-breakdown

Breaks work into ordered tasks. Use when you have a spec or clear requirements and need to break work into implementable tasks. Use when a task feels too large to start, when you need to estimate scope, or when parallel work is possible.

shashankswe2020-ux/whoop-mcp · 56 tokens

qa-knowledge

To run QA engineering — requirements/gap analysis, scenario & spec design, test implementation, failure triage — over the QA knowledge base.

griddynamics/rosetta · 32 tokens