api-design

api-design is a skill for Claude Code, Codex from svngoku/coding-agents-skills. It costs 144 tokens per session (4,767 once invoked), scanned A, original, MIT.

A guide for designing and reviewing HTTP APIs, the interfaces through which software exchanges requests and responses over the web.

In plain words
What is it for?
It is for creating or reviewing REST APIs, writing OpenAPI 3.x definitions, choosing HTTP methods and status codes, handling errors and retries, and planning authentication and compatibility.
Why use it?
It helps make an API predictable for the programs that use it by clarifying URLs, operations, responses, errors, pagination, and version changes.

Skill for Claude CodeCodex

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/svngoku/coding-agents-skills/api-design
Any agent
npx skills add svngoku/coding-agents-skills --skill api-design
Clone the repo
git clone --depth 1 https://github.com/svngoku/coding-agents-skills

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/svngoku/coding-agents-skills/api-design.svg)](https://agentmods.dev/skills/svngoku/coding-agents-skills/api-design)
Your own site
<a href="https://agentmods.dev/skills/svngoku/coding-agents-skills/api-design"><img src="https://agentmods.dev/badge/skills/svngoku/coding-agents-skills/api-design.svg" alt="Measured on agentmods" height="20"></a>
Per session 144 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,767 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.00144 $0.04767
Opus 5 $0.00072 $0.02384
Sonnet 5 $0.00029 $0.00953
Haiku 4.5 $0.00014 $0.00477

Measured 4d ago against content hash 59290f522958, 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 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.

The scan reads SKILL.md. This mod also ships 1 executable file (graders/check.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/SKILL.md · 301 lines

How it starts

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

API Design

HTTP APIs are the contract between your service and every client that consumes it. A well-designed API is consistent and predictable: the URL says which resource you are touching, the HTTP method says what happens to it, and the status code plus body say whether it worked and why not. This skill covers designing and reviewing such APIs — resource modeling, HTTP semantics, status codes, error envelopes, pagination, versioning, spec-first OpenAPI 3.x, and authentication basics — REST first, with GraphQL and gRPC covered in passing.

Quick Reference

Task Reference
Error envelopes, RFC 7807, idempotency keys, retry policy error-handling.md
Cursor vs offset pagination, filtering, sorting, field selection pagination-filtering.md
Versioning strategies, backward compatibility, deprecation versioning-evolution.md

Core Workflow

Design an endpoint set in five steps:

  1. Model resources and map HTTP semantics — identify the nouns (users, orders, products) and their relationships; name them as plural collections; one method per operation: read → GET, create → POST, full replace → PUT, partial update → PATCH, delete → DELETE, domain action → POST to an action sub-resource.
  2. Design the responses — success shapes, the error envelope (problem+json), and the exact status code per failure mode.
  3. Paginate and filter collections — choose cursor or offset, set defaults, define filter/sort/field-selection syntax.
  4. Write the OpenAPI spec first — the spec is the contract; generate docs and clients from it.
  5. Lock down auth and limits — authentication scheme, least-privilege scopes, rate limits with standard headers.

Resource Modeling

Nouns, not verbs

Resources are nouns; HTTP methods are the verbs. URLs must never contain verbs.

Anti-pattern Good
GET /getUser?id=1 GET /users/{id}
POST /createOrder POST /orders
POST /deleteOrder?id=1 DELETE /orders/{id}

Read the full file on GitHub · 301 lines

Files

What ships with it

8 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 · 301 lines · 144 tokens per session scan A 59290f522958

Subscribe to this mod's changes

api-design is a skill published in the GitHub repository svngoku/coding-agents-skills (9 stars, last pushed 22d ago), licensed MIT. It adds 144 tokens to every session and 4,767 once invoked, about $0.0007 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-31.