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

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/proyecto26/system-design-skills/api-design
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.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.svg" alt="Measured on agentmods" 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. 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.1 $0.00129 $0.03227
Opus 5 $0.00064 $0.01614
Sonnet 5 $0.00026 $0.00645
Haiku 4.5 $0.00013 $0.00323

Measured 6d ago against content hash e21704b1151d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 6d 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. 6d 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 (68 stars, last pushed 3mo ago), licensed MIT. It adds 129 tokens to every session and 3,227 once invoked, about $0.0006 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

chief-financial-officer

Owns the financial position: planning, budgeting, forecasting, unit economics, cash, and the numbers the business is run and reported on. Use this to build or challenge a budget, model a decision's financial consequence, assess unit economics or runway, evaluate an investment or spend request, set financial controls…

cbrock84/headcount · 88 tokens

chief-strategy-officer

Owns where the business plays and how it wins over a multi-year horizon — portfolio choices, corporate development, strategic partnerships, and planning under uncertainty. Use this for a decision about which markets or businesses to be in, whether to build, buy, or partner, how to allocate capital across business…

cbrock84/headcount · 93 tokens

seo-strategy

Audits and improves organic search performance — technical health, site architecture, internal linking, structured data, and the content decisions that determine what can rank. Use this to run an SEO audit, diagnose why pages are not ranking or were deindexed, plan a site's URL and navigation structure, add structured…

cbrock84/headcount · 74 tokens

customer-success-management

Runs the ongoing relationship with accounts after the sale — segmenting coverage against account value, building a health score that predicts rather than describes, running reviews customers find worth attending, forecasting renewals honestly, and finding expansion that follows usage instead of quota. Use this to…

cbrock84/headcount · 85 tokens

service-desk

Runs the IT service desk — intake, triage, prioritization, escalation, knowledge, and the metrics that improve service rather than distort it. Use this to set up or fix a service desk, design ticket priority and escalation, reduce repeat contacts, structure a knowledge base, or work out why a desk hitting its targets…

cbrock84/headcount · 73 tokens

telephony-and-conferencing

Runs voice and meeting infrastructure — phone systems and numbers, emergency calling obligations, conference rooms and their AV, call recording and its retention consequences, and the porting that makes provider changes go badly. Use this to replace a phone system, fix rooms nobody can start a meeting in, meet…

cbrock84/headcount · 85 tokens