awesome-api-design

awesome-api-design is a skill for Claude Code from khasky/awesome-agent-skills. It costs 40 tokens per session (1,845 once invoked), scanned A, original, MIT.

A guide for designing an HTTP API, the agreed way that software systems exchange requests and responses. It covers resources, URLs, versioning, pagination, retries, and errors before implementation.

In plain words
What is it for?
Use it to plan or review an API, choose how it should handle versions, pages, retries, and errors, or add an endpoint that follows an existing API’s conventions.
Why use it?
It helps prevent accidental API rules that later clients depend on and makes breaking changes less likely.

Skill for Claude Code

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

Part of the awesome-agent-skills plugin — 49 skills shipped together

Good fit Use it to plan or review an API, choose how it should handle versions, pages, retries, and errors, or add an endpoint that follows an existing API’s conventions.

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

Made for: Claude Code.

Or install awesome-agent-skills, the plugin that ships this one along with the rest of its 49 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 awesome-api-design

README.md
[![agentmods](https://agentmods.dev/badge/skills/khasky/awesome-agent-skills/awesome-api-design/github.svg)](https://agentmods.dev/skills/khasky/awesome-agent-skills/awesome-api-design)
Your own site
<a href="https://agentmods.dev/skills/khasky/awesome-agent-skills/awesome-api-design"><img src="https://agentmods.dev/badge/skills/khasky/awesome-agent-skills/awesome-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 awesome-api-design

Your own site · 80×15
<a href="https://agentmods.dev/skills/khasky/awesome-agent-skills/awesome-api-design"><img src="https://agentmods.dev/badge/skills/khasky/awesome-agent-skills/awesome-api-design.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,845 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00040 $0.01845
Opus 5.5 $0.00016 $0.00738
Sonnet 5.5 $0.00008 $0.00369
Haiku 4.5 $0.00004 $0.00185

Measured 6d ago against content hash 9452d325af6e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

awesome-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/awesome-api-design/SKILL.md · 99 lines

How it starts

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

API Design

Shape an HTTP API so its consumers can build against it for years without a breaking surprise. The contract is the product: URLs, methods, payloads, errors, and evolution rules are decided here, deliberately — everything left implicit becomes an accidental contract the first client depends on.

When to Activate

  • "Design the API for X", "review this API design / OpenAPI spec", "how should we version / paginate / handle retries".
  • A design doc needs its API section made concrete (awesome-design-doc hands off here).
  • A new endpoint is being added to an existing API and must match its conventions.

Do not activate to define the error envelope's fields or retry classification (awesome-error-standards owns that contract) or to audit implemented handlers for vulnerabilities (awesome-security-audit).

Work Process

  1. Inventory the incumbent conventions and the project's own words — an existing API's casing, id format, pagination style, and envelope win over any guideline here: consistency within one API beats global best practice. Only a new API starts from the defaults below. Read the recorded decisions (existing ADRs) and the project's glossary (CONTEXT.md, a domain doc, or the terms its code and tests already use) before naming a single resource: a path is a public, long-lived name, and one that renames a concept the codebase already has costs every reader a translation.
  2. Model resources, not procedures — nouns with identity and lifecycle (/orders/{id}), actions as state transitions on them (POST /orders/{id}/cancel when a pure verb is unavoidable — never /doCancelOrder). Nest at most one level deep; deeper hierarchies become query filters (/comments?post_id=…), because every nesting level hardcodes an ownership assumption into every client URL.
  3. Decide the evolution rules before v1 ships — additive changes (new optional field, new endpoint) go in place; anything breaking (remove/rename/retype a field, tighten validation) only ever creates a new version. Publish that taxonomy with the API so consumers know what is safe to ignore. Evolve by layering — a redesigned abstraction ships beside the old one and existing integrations keep working until their owners move; deprecation is announced with a sunset window, never enforced by an in-place change.
  4. Design list endpoints for growth — opaque cursor pagination (encode the (sort_key, id) position, return has_more + next_cursor in a list envelope) over offset, which skips and duplicates rows under concurrent writes and dies on deep pages. Filtering and sorting are an allowlist of named parameters over indexed fields, never a pass-through to the query layer.
  5. Make unsafe methods retry-safe — mutations accept an Idempotency-Key; same key + same body replays the stored response, same key + different body is 409. Without it, every client retry is a potential duplicate side effect. (Retry classification and the envelope format: awesome-error-standards.)
  6. Specify concurrency and partial updates — updates that can conflict get optimistic concurrency (ETag + If-Match, 409 with the current version on mismatch); PATCH semantics are declared (merge-patch vs replace), and an empty PATCH is rejected, not silently a no-op.
  7. Write the contract down as the source of truth — an OpenAPI/schema document that generates or validates the implementation, not prose that drifts from it. Ids are opaque and prefixed (ord_…), timestamps ISO 8601 UTC, money integer minor units with currency, enums closed with a documented default for unknown values on the consumer side.

Read the full file on GitHub · 99 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. 6d ago Changed 9452d325af6e
  2. 14d ago Changed · +20 lines 79c6221fb03a
  3. 29d ago Changed · -77 tokens per session ddebe0a32318
  4. 1mo ago Changed 5562e88f0553
  5. 1mo ago Changed · -21 tokens per session 888828227130
  6. 1mo ago First seen · 79 lines · 138 tokens per session scan A 744093721174

Subscribe to this mod's changes

awesome-api-design is a skill published in the GitHub repository khasky/awesome-agent-skills (16 stars, last pushed 5d ago), licensed MIT. It adds 40 tokens to every session and 1,845 once invoked, about $0.0002 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-31.

Related

Other skills, from other repositories

actix

Expert Actix Web assistance covering async actors, routing, extractors, middleware, and high-performance Rust web services. Use when building blazing fast REST APIs or microservices in Rust.

G1Joshi/Agent-Skills · 39 tokens

api-gateway

Expert API Gateway architecture assistance covering reverse proxies, request routing, rate limiting, authentication offloading, and SSL termination. Use when designing API gateways, configuring Kong/Envoy/Traefik, securing microservice entrypoints, or managing edge routing.

G1Joshi/Agent-Skills · 54 tokens

cqrs

Expert CQRS (Command Query Responsibility Segregation) assistance covering command handlers, read projections, event denormalization, and asymmetric scaling. Use when separating read and write models, optimizing read performance, or pairing with Event Sourcing.

G1Joshi/Agent-Skills · 50 tokens

domain-driven-design

Expert Domain-Driven Design (DDD) assistance covering strategic bounded contexts, ubiquitous language, aggregates, value objects, domain events, and repository patterns. Use when modeling complex business domains, decomposing monoliths into microservices, or implementing rich domain models.

G1Joshi/Agent-Skills · 55 tokens

event-driven

Expert Event-Driven Architecture assistance covering message brokers, pub/sub topologies, event stream processing, asynchronous workflows, and eventual consistency. Use when designing decoupled microservices, integrating Apache Kafka or RabbitMQ, or managing outbox patterns.

G1Joshi/Agent-Skills · 51 tokens

grpc

Expert gRPC assistance covering Protocol Buffers (proto3), unary and streaming RPCs, HTTP/2 multiplexing, interceptors, and client generation. Use when designing low-latency inter-service communication, polyglot microservice RPCs, or real-time bi-directional streaming.

G1Joshi/Agent-Skills · 60 tokens