api-design-expert

api-design-expert is a skill for Claude Code from Miaoge-Ge/coding-agent-skills. It costs 88 tokens per session (1,070 once invoked), scanned A, original, MIT.

A guide to designing REST and GraphQL APIs—the interfaces that let applications exchange data. It covers resource names, response codes, versioning, pagination, errors, and API contracts such as OpenAPI schemas.

In plain words
What is it for?
Use it to plan or review endpoints, data resources, error responses, pagination, rate limits, version changes, and API documentation.
Why use it?
It helps make an API predictable for its users and easier to change without breaking existing clients.

Skill for Claude Code

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

Part of the api-design-expert plugin — 1 skill shipped together

Good fit Use it to plan or review endpoints, data resources, error responses, pagination, rate limits, version changes, and API documentation.

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

Made for: Claude Code.

Or install api-design-expert, the plugin that ships this one along with the rest of its 1 skill.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/miaoge-ge/coding-agent-skills/api-design-expert.svg)](https://agentmods.dev/skills/miaoge-ge/coding-agent-skills/api-design-expert)
Your own site
<a href="https://agentmods.dev/skills/miaoge-ge/coding-agent-skills/api-design-expert"><img src="https://agentmods.dev/badge/skills/miaoge-ge/coding-agent-skills/api-design-expert.svg" alt="Measured on agentmods" height="20"></a>
Per session 88 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,070 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.00088 $0.01070
Opus 5 $0.00044 $0.00535
Sonnet 5 $0.00018 $0.00214
Haiku 4.5 $0.00009 $0.00107

Measured 8d ago against content hash d00ffd05508e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

api-design-expert 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 8d 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.

plugins/api-design-expert/skills/api-design-expert/SKILL.md · 77 lines

How it starts

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

API Design Expert

Design for the consumer and for change. Consistency beats cleverness: predictable naming, one error shape, accurate status codes, additive evolution. The contract is the product.

When to Use

  • Designing or reviewing a REST/GraphQL API.
  • Resource modeling, naming, versioning, pagination, filtering.
  • Error formats, status codes, idempotency, rate limiting.
  • Writing an OpenAPI/GraphQL SDL contract.

When NOT to Use

  • Implementing the server framework → nodejs-backend-expert / language skill.
  • DB schema/query design → sql-expert.
  • Overall system topology/scaling → software-architect.

Core Principles

1. Resource modeling (REST)

  • Nouns, plural collections, hierarchy for relationships: GET /orders/{id}/items. No verbs in paths (/getOrder ❌).
  • Methods carry semantics: GET safe & cacheable, POST create/non-idempotent, PUT full idempotent replace, PATCH partial, DELETE idempotent.
  • Accurate status codes: 200/201/204; 400 (malformed) vs 422 (valid syntax, semantic error) vs 409 (conflict); 401 (unauthenticated) vs 403 (unauthorized); 404; 429 (rate limit). Never 200 with an error body.

2. One consistent contract

  • Single error envelope everywhere: { "error": { "code", "message", "details" } } with a stable machine-readable code.
  • Consistent field naming/casing across all endpoints. Use ISO-8601 UTC timestamps, explicit currency/units, and string IDs. Document everything in OpenAPI/SDL — contract first.

3. Evolve without breaking

  • Version at the edge (/v1, or media-type/header). Change additively; never repurpose, retype, or silently drop a field. Deprecate with headers + sunset dates.
  • Make writes idempotent: support an Idempotency-Key for POST so retries don't double-charge. Document side effects.

4. Collections & resilience

  • Paginate large collections — prefer cursor/keyset over offset for large or changing data. Provide filtering/sorting/field-selection explicitly and consistently.
  • Publish rate limits (headers), auth scheme, and idempotency semantics. Validate every input; return precise field-level errors.

Read the full file on GitHub · 77 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. 8d ago First seen · 77 lines · 88 tokens per session scan A d00ffd05508e

Subscribe to this mod's changes

api-design-expert is a skill published in the GitHub repository Miaoge-Ge/coding-agent-skills (5 stars, last pushed 3mo ago), licensed MIT. It adds 88 tokens to every session and 1,070 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-31.