api-design

api-design is a skill for Claude Code from proyecto26/system-design-skills. It costs 129 tokens per session (3,227 once invoked), scanned A, original, MIT.

Guidance for defining the contract between an application and a service: what requests look like, what responses contain, and how errors, paging, retries, and versions work.

In plain words
What is it for?
Use it to design endpoints, request and response formats, pagination, idempotency keys, error handling, API versions, and choices such as REST, gRPC, GraphQL, or WebSockets.
Why use it?
It removes ambiguity before clients and servers are built. Clear contracts help prevent duplicate writes, incompatible updates, and guesswork about data shapes.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the system-design-skills plugin — 22 skills, 1 command, 1 agent shipped together

Good fit Use it to design endpoints, request and response formats, pagination, idempotency keys, error handling, API versions, and choices such as REST, gRPC, GraphQL, or WebSockets.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/proyecto26/system-design-skills/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 proyecto26/system-design-skills --skill api-design
Clone the repo
git clone --depth 1 https://github.com/proyecto26/system-design-skills

Made for: Claude Code.

Or install system-design-skills, the plugin that ships this one along with the rest of its 22 skills, 1 command, 1 agent.

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/proyecto26/system-design-skills/api-design/github.svg)](https://agentmods.dev/skills/proyecto26/system-design-skills/api-design)
Your own site
<a href="https://agentmods.dev/skills/proyecto26/system-design-skills/api-design"><img src="https://agentmods.dev/badge/skills/proyecto26/system-design-skills/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/proyecto26/system-design-skills/api-design"><img src="https://agentmods.dev/badge/skills/proyecto26/system-design-skills/api-design.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 129 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,227 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.
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.00129 $0.03227
Opus 5.5 $0.00052 $0.01291
Sonnet 5.5 $0.00026 $0.00645
Haiku 4.5 $0.00013 $0.00323

Measured 1mo ago against content hash e21704b1151d, 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.

skills/api-design/SKILL.md · 217 lines

How it starts

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

API Design

Define the contract between clients and a service: the exact request and response shapes, how callers page through data, how retried writes stay safe, how errors are reported, and how the contract evolves. Get this vague and the rest of the diagram is guesswork (GUIDE #8) — a "NoSQL box" or "user service" solves nothing until you can write the request, the response, and the key it hits.

When to reach for this

The design has named services and a datastore, and you now need the interface: what a client sends, what it gets back, how it fetches the next page, how it retries a payment without double-charging, and how a v1 client survives a v2 deploy. Reach here the moment someone says "fetch the feed" or "store the post" without a shape.

When NOT to

Before requirements and scale are pinned — the protocol choice depends on read/write ratio and latency target, not taste (→ requirements-scoping, back-of-the-envelope). Don't reach for gRPC, GraphQL, or streaming because they sound modern; a plain REST/JSON endpoint is the cheapest contract that meets most constraints, and naming a fancier protocol you don't need is a YAGNI red flag. Internal data-access keys and partition design live in data-storage; this skill designs the external contract that mirrors them.

Clarify first

  • Call shape — request/response (CRUD), bidirectional/real-time, or one request → many results (streaming)? This picks the protocol.
  • Read/write ratio and result-set size — drives pagination and whether reads need their own optimized path (→ back-of-the-envelope).
  • Retry safety — can a write be safely repeated? Which operations are naturally idempotent (PUT/DELETE) vs not (POST that creates/charges)?
  • Client diversity & churn — public third parties (slow to upgrade, need strict versioning) vs your own apps (ship together)?
  • Latency & payload budget — mobile/high-latency links favor compact binary and fewer round trips; browsers favor cacheable HTTP.

Read the full file on GitHub · 217 lines

Files

What ships with it

5 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. 1mo ago First seen · 217 lines · 129 tokens per session scan A e21704b1151d

Subscribe to this mod's changes

api-design is a skill published in the GitHub repository proyecto26/system-design-skills (94 stars, last pushed 4mo ago), licensed MIT. It adds 129 tokens to every session and 3,227 once invoked, about $0.0005 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

Other skills, from other repositories

data-engineering

Builds and operates data pipelines — ingestion, transformation, orchestration, quality testing, and reliability of data delivery. Use this to design or debug a pipeline, decide batch versus streaming, add data quality checks, handle late or duplicate data, or work out why a dashboard's numbers changed without anyone…

cbrock84/headcount · 67 tokens

api-design

Designs interfaces that survive their consumers — resource modeling, errors, versioning, pagination, and compatibility. Use this to design a new API, review one before it ships, decide how to version or deprecate, fix an interface consumers keep misusing, or work out whether a change is breaking.

cbrock84/headcount · 64 tokens

build-falco-web-app

Build or modify a Falco web application in idiomatic F#, using functional routing, request and response helpers, explicit ASP.NET Core integration, security boundaries, and focused tests.

gaelic-ghost/socket · 42 tokens

build-giraffe-web-app

Build or modify a Giraffe web application in idiomatic F#, using composable HttpHandler functions, explicit ASP.NET Core integration, configuration, authentication, and focused endpoint tests.

gaelic-ghost/socket · 43 tokens

build-oxpecker-web-app

Build or modify an Oxpecker web application in idiomatic F#, using endpoint routing, functional EndpointHandler and EndpointMiddleware composition, ASP.NET Core metadata, and focused endpoint tests.

gaelic-ghost/socket · 44 tokens

swift-openapi-client-workflow

Build, integrate, test, and diagnose Swift OpenAPI Generator clients in Apple-platform apps and Swift packages using OpenAPIURLSession, OpenAPIRuntime, URLSessionTransport, SwiftPM plugins, Apple docs, Dash docsets, and clear handoffs to server-side Swift OpenAPI workflows when the API contract or server transport…

gaelic-ghost/socket · 73 tokens