api-design
Skill17 starsChanged 55 days agoMITView on GitHub
Designs and reviews production APIs across REST/HTTP, OpenAPI, GraphQL, gRPC, webhooks, asynchronous operations, batch endpoints, SSE, and WebSockets. Use when defining resources, routes, methods, status codes, problem details, pagination, idempotency, conditional writes, API schemas, compatibility, deprecation, authentication, authorization, rate limits, or protocol contracts.
191 other projects use a version of this.
Adopted by
Most recently taken up by
- RostislavDugin/postgresustheir own version, first seen Nov 8, 2026
- Markssuave/Markssuave-Agent-skillstheir own version, first seen Nov 8, 2026
- Rojios/everything-claude-codetheir own version, first seen Nov 8, 2026
- ishandutta2007/Awesome-Claude-Skillstheir own version, first seen Nov 8, 2026
- databasus/databasustheir own version, first seen Nov 8, 2026
- lhbsaa/apex-unifiedtheir own version, first seen Nov 8, 2026
Used with
Projects with it also use db-design, everything-claude-code and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
yuexueyuSkilldb-design
数据库工程师技能 - Schema设计、索引优化、并发安全、数据库审计。当你涉及数据库表/字段/索引/SQL/迁移/MCP数据库操作、建表改表、写查询时必须使用此技能。即使用户只是说"加个字段"或"查下数据",也应触发。
Also in 4 projects that use this
InfopibeSkilleverything-claude-code
Also in 9 projects that use this
mryeastcodeSkilleverything-claude-code-conventions
Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.
Also in 8 projects that use this
tpavanipradeepSkillnextjs-turbopack
Next.js 16+ and Turbopack — incremental bundling, FS caching, dev speed, and when to use Turbopack vs webpack.
Also in 15 projects that use this
Indium-AI-LabsSkilldata-pipeline-design
Design batch or incremental ETL and ELT pipelines and warehouse models: grain, partitioning, idempotent loads, late-arriving data, data quality tests, PII controls, and cost monitoring, before building them. Use when adding or changing a dbt model, warehouse table, scheduled transformation, or ingestion job. Not for transactional schema design (use the database-design skill) or event-sourced stores (use the event-sourcing-architecture skill).
Also in 3 projects that use this
thejordanleopoldSkillthird-party-integration
Use when integrating with external APIs, payment processors (Stripe), webhooks, or third-party services. Use when implementing API clients with authentication and rate limiting, handling webhooks with signature verification and idempotency, writing contract tests for external services, or isolating third-party dependencies behind adapters. Triggers: \"Stripe\", \"payment integration\", \"webhook\", \"third-party API\", \"external service\", \"API client\", \"integrate with\", \"signature verification\", \"idempotency key\".
Also in 3 projects that use this
Other versions191 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 191
- affaan-m/ECC★ 246ksame name
- databasus/databasus★ 9.3ksame name
- RostislavDugin/postgresus★ 9.3ksame name
- authgear/authgear-server★ 2.1ksame name
- xu-xiang/everything-claude-code-zh★ 1.9ksame name
- Aaronontheweb/dotnet-skills★ 1.2ksame name
- epam/ai-dial-chat★ 501same name
- loulanyue/awesome-claude-notes★ 272same name
- KbWen/agentic-os★ 229same name
- DevelopersGlobal/ai-agent-skills★ 216same name
181 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository53 other files it gives its agents.
- agents-sdkSkill
- agent-workflowSkill
- aws-iamSkill
- bash-shell-scriptingSkill
- cicd-github-actionsSkill
- cloudflare-email-serviceSkill
- cloudflareSkill
- cloudflare-waf-authorSkill
- cloudflare-workers-authorSkill
- cloud-platformsSkill
- codebase-security-auditSkill
- containers-orchestrationSkill
- core-engineeringSkill
- database-postgresqlSkill
- databricksSkill
- data-engineeringSkill
- distributed-transactionsSkill
- documentation-standardsSkill
- domain-driven-designSkill
- durable-objectsSkill
- frontend-engineeringSkill
- git-workflowSkill
- go-rust-systemsSkill
- iam-security-advisorSkill
- independent-verificationSkill
- infrastructure-iacSkill
- kubernetes-containersSkill
- kubernetes-operator-developmentSkill
- mcp-developmentSkill
- memory-architectureSkill
- multi-perspective-reviewSkill
- networking-transportSkill
- observabilitySkill
- oktaSkill
- pdf-exportSkill
- python-developmentSkill
- reactflow-architecture-diagramsSkill
- sandbox-sdkSkill
- scripting-automationSkill
- security-testingSkill
- service-resilienceSkill
- single-file-dashboardSkill
- skills-compositionSkill
- skills-continuous-improvementSkill
- snowflakeSkill
- system-designSkill
- typescript-javascriptSkill
- web-perfSkill
- web-research-kb-refreshSkill
- workers-best-practicesSkill
- workload-identitySkill
- wranglerSkill
- zero-trustSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. 0 are common, 9 are distinctive, and 6 are very specific to this project.
0
Common
Most of the 165 edited versions we read keep these.
9
Distinctive
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
Follow HTTP safety, idempotency, cache, conditional-request, and status-code semantics.
- Distinctive: line 26
Use RFC 9457 Problem Details for new public HTTP error contracts unless an existing compatibility commitment requires another documented …
- Distinctive: line 32
Treat the API description as a versioned contract.
- Distinctive: line 36
Keep secrets, credentials, raw payloads, and unnecessary personal data out of errors and telemetry.
- Distinctive: line 53
Do not start by listing endpoints.
- Very specific: line 71
Use the networking transport skill (${HANDBOOK_ROOT}/skills/networking-transport/SKILL.md) for transport and wire format selection.
- Distinctive: line 79
use stable, lowercase collection nouns and one multiword convention.
- Distinctive: line 80
use opaque identifiers and avoid exposing storage topology.
- Distinctive: line 82
use query parameters for filtering, sorting, pagination, field selection, and other optional refinement.
- Very specific: line 84
never place state-changing behavior behind GET, HEAD, or a query action such as ?action=delete.
- Distinctive: line 86
use an explicit command endpoint only when no honest resource lifecycle fits, then document its authorization, idempotency, result, and …
- Very specific: line 109
Use the REST and HTTP contracts reference (${HANDBOOK_ROOT}/skills/api-design/references/rest-http-contracts.md).
- Very specific: line 130
Use the security and resilience reference (${HANDBOOK_ROOT}/skills/api-design/references/security-resilience.md), the service resilience …
- Very specific: line 147
Use the evolution and OpenAPI reference (${HANDBOOK_ROOT}/skills/api-design/references/evolution-openapi.md).
- Very specific: line 157
Use the GraphQL, gRPC, and streaming reference (${HANDBOOK_ROOT}/skills/api-design/references/graphql-grpc-streaming.md).
“Common” is measured: kept by at least 6 in 10 of the 165 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
API Design
Mandatory API gates are owned by the API rule
(${HANDBOOK_ROOT}/rules/320-api-design.mdc). This skill owns design workflow,
trade-offs, examples, and protocol-specific guidance.
Non-Negotiables
- Design from consumers, business invariants, trust boundaries, and failure behavior before choosing endpoint shapes.
- Let resource identifiers name nouns and protocol operations express behavior. Model a business action as a subordinate resource when that produces a clear lifecycle.
- Follow HTTP safety, idempotency, cache, conditional-request, and status-code semantics. Idempotence means the intended server effect is stable, not that every response is byte-identical.
- Authenticate the principal and authorize every protected object, tenant, relationship, field, and action on the server.
- Validate and bound every path, query, header, cookie, message, and body input. Serialize responses from allowlisted schemas rather than persistence objects.
- Use RFC 9457 Problem Details for new public HTTP error contracts unless an existing compatibility commitment requires another documented shape.
- Make retryable mutations safe with a stable operation identity, atomic state, and reconciliation. Never imply that transport delivery proves exactly-once business processing.
- Protect mutable resources from lost updates when concurrency matters.
- Treat the API description as a versioned contract. Detect breaking changes, provide migration evidence, and deprecate deliberately.
- Bound payloads, pagination, batches, queries, streams, execution time, concurrency, retries, queues, and per-principal cost.
- Keep secrets, credentials, raw payloads, and unnecessary personal data out of errors and telemetry.
Design Workflow
1. Define Consumers and Guarantees
Document:
- consumers, trust levels, environments, and ownership;
- critical operations and business invariants;
- latency, availability, durability, freshness, and consistency needs;
- authentication mechanism and authorization policy inputs;
- expected load, object size, request size, page size, concurrency, and growth;
- retry, duplicate, ordering, and partial-failure behavior;
- compatibility window, support policy, and deprecation owner.
Do not start by listing endpoints.
2. Select the Interface Style
Choose the smallest interface that fits:
- REST/HTTP for resource-oriented public or broadly interoperable APIs;
- GraphQL for consumer-selected graphs when demand control and field authorization are enforceable;
- gRPC for typed service-to-service contracts, streaming, and generated clients where HTTP/2 and Protobuf are operationally supported;
- webhook delivery for provider-initiated notifications;
- SSE for server-to-client event streams over HTTP;
- WebSockets for bounded bidirectional sessions;
- asynchronous operation resources for long-running work;
- batch endpoints only when network savings justify their authorization, isolation, and partial-result complexity.
Use the networking transport skill
(${HANDBOOK_ROOT}/skills/networking-transport/SKILL.md) for transport and wire
format selection.
3. Model Resources and Operations
For REST/HTTP:
- use stable, lowercase collection nouns and one multiword convention;
- use opaque identifiers and avoid exposing storage topology;
- nest only for true containment or scope;
- use query parameters for filtering, sorting, pagination, field selection, and other optional refinement;
- never place state-changing behavior behind GET, HEAD, or a query action such
as
?action=delete; - use an explicit command endpoint only when no honest resource lifecycle fits, then document its authorization, idempotency, result, and failure semantics.
Examples of resource-modeled actions include an order cancellation resource, an export job, or a password-reset request.
4. Define the Contract
Specify:
- method or operation semantics;
- request media type, schema, requiredness, defaults, unknown-field policy, and size limit;
- success status, headers, body schema, and empty-body behavior;
- RFC 9457 problem types, safe details, field pointers, and retryability;
- JSON naming, timestamp, identifier, decimal, money, unit, enum, null, and absent-value conventions;
- filtering operators, sort grammar, deterministic tie-break order, duplicate parameter behavior, and maximum page size;
- cache scope, validators, conditional reads, and conditional writes;
- asynchronous status, polling, cancellation, result, failure, expiry, and retention behavior.
Use the REST and HTTP contracts reference
(${HANDBOOK_ROOT}/skills/api-design/references/rest-http-contracts.md).
5. Design Security and Failure Behavior
Define authentication separately from authorization. Apply bounded schemas before policy or business logic, and apply output filtering after authorization.
For mutations and remote dependencies, define:
- idempotency key ownership, request fingerprint, atomic persistence, replayed response, conflict behavior, and retention;
- optimistic concurrency and stale-write response;
- one end-to-end deadline, attempt timeouts, retry owner, transient failure classes, backoff, jitter, and retry budget;
- rate-limit principal, quota unit, window, response headers, and overload behavior;
- outbound destination and redirect policy;
- webhook signature, timestamp, replay, durable handoff, and redelivery policy;
- redacted audit, logs, metrics, and traces.
Use the security and resilience reference
(${HANDBOOK_ROOT}/skills/api-design/references/security-resilience.md), the
service resilience skill
(${HANDBOOK_ROOT}/skills/service-resilience/SKILL.md), and the distributed
transactions skill
(${HANDBOOK_ROOT}/skills/distributed-transactions/SKILL.md).
6. Define Evolution
Choose the newest OpenAPI version supported by the repository's validated toolchain. Do not copy a version number from a handbook example without checking generator, validator, gateway, and documentation compatibility.
Classify changes across request schemas, response schemas, requiredness, defaults, enums, error types, status codes, ordering, pagination, authorization, and observable behavior. Additive syntax can still be behaviorally breaking.
Use the evolution and OpenAPI reference
(${HANDBOOK_ROOT}/skills/api-design/references/evolution-openapi.md).
7. Apply Protocol-Specific Controls
GraphQL, gRPC, webhooks, SSE, WebSockets, and batch APIs retain the same identity, authorization, validation, resource, compatibility, and observability requirements. Add protocol-specific demand, flow-control, deadline, schema, and connection-lifecycle controls.
Use the GraphQL, gRPC, and streaming reference
(${HANDBOOK_ROOT}/skills/api-design/references/graphql-grpc-streaming.md).
8. Verify the Contract
Run applicable:
- schema lint and validation;
- request and response conformance tests;
- authorization tests for object, tenant, relationship, action, and field boundaries;
- negative tests for unknown, malformed, oversized, duplicate, stale, replayed, and out-of-order inputs;
- OpenAPI or Protobuf breaking-change checks;
- consumer contract and generated-client tests;
- retry, timeout, idempotency, concurrency, and partial-failure tests;
- load, abuse, rate-limit, streaming, and backpressure tests;
- documentation examples against the production contract.
Review Output
For a design or review, report:
- consumers, invariants, and trust boundaries;
- interface style and resource or operation model;
- request, response, error, pagination, and async contracts;
- authentication, authorization, validation, and abuse controls;
- idempotency, concurrency, retry, and partial-failure behavior;
- compatibility, versioning, and deprecation plan;
- verification, observability, and unresolved risks.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

