api-design
Skill11 starsChanged 9 days agoMITView on GitHub
API design and contract guidance. Use when defining, changing, reviewing, or testing service or public interface contracts: HTTP/REST resources, RPC/GraphQL operations, webhooks, event/message schemas, request/response/error envelopes, pagination/filtering/sorting, idempotency, versioning/deprecation/backward compatibility, OpenAPI/AsyncAPI/JSON Schema/protobuf artifacts, SDK or CLI public surfaces, or consumer/provider compatibility. Do not use for ordinary language/framework implementation, Rust handler mechanics, SQL schema/query design, architecture boundary selection, security controls, BDD/TDD mechanics, observability instrumentation, or documentation-only API references after the contract is set; load those existing skills instead or alongside it when their trigger is primary. Use semantic-versioning when the primary question is choosing or applying a patch, minor, or major release bump after contract impact is understood.
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 repository70 other files it gives its agents.
- AGENTS.mdAGENTS.md
- adversarial-reviewSkill
- architecture-reviewSkill
- behavior-driven-developmentSkill
- brainstormingSkill
- ci-release-engineeringSkill
- clean-architectureSkill
- code-reviewSkill
- container-engineeringSkill
- create-agent-skillSkill
- csharp-dotnet-engineeringSkill
- css-scss-stylingSkill
- data-platform-engineeringSkill
- dependency-supply-chain-reviewSkill
- digital-asset-managementSkill
- documentation-engineeringSkill
- domain-driven-designSkill
- domain-modelingSkill
- donsetch-web-researchSkill
- gherkinSkill
- git-commitSkill
- git-workflowsSkill
- hexagonal-architectureSkill
- impeccableSkill
- internationalization-localizationSkill
- javascript-typescript-engineeringSkill
- justfilesSkill
- mcp-server-engineeringSkill
- mysql-mariadb-sql-engineeringSkill
- observability-engineeringSkill
- onion-architectureSkill
- parallelism-engineeringSkill
- performance-reviewSkill
- playwright-e2eSkill
- postgresql-sql-engineeringSkill
- prompt-engineering-reviewSkill
- python-antipatternsSkill
- python-design-patternsSkill
- python-engineeringSkill
- random-data-identifiersSkill
- release-readinessSkill
- review-verification-protocolSkill
- root-cause-analysisSkill
- ruby-engineeringSkill
- rust-antipatternsSkill
- rust-async-webSkill
- rust-code-reviewSkill
- rust-design-patternsSkill
- rust-desktop-guiSkill
- rust-engineeringSkill
- rust-persistence-sqlSkill
- rust-testing-qualitySkill
- script-engineeringSkill
- security-review-evidenceSkill
- security-reviewSkill
- semantic-versioningSkill
- sql-engineeringSkill
- sqlite-sql-engineeringSkill
- suggest-lucide-iconsSkill
- svelte-sveltekit-engineeringSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. 0 are common, 11 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 165 edited versions we read keep these.
11
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
Use this skill to shape externally visible API contracts before implementation details take over.
- Distinctive: line 45
Do not use this skill as the primary workflow for framework routing mechanics, language type modeling, database schema/query design, …
- Very specific: line 57
Use semantic-versioning to aggregate compatibility impacts across a release and recommend or apply its patch, minor, major, or prerelease …
- Distinctive: line 66
Keep this skill focused on the public contract shape.
- Distinctive: line 70
Keep this skill involved when a telemetry field or event is itself part of the published API, SDK, CLI, webhook, or message contract.
- Very specific: line 78
Use language engineering skills for implementation mechanics, package/tool workflow, generated code, serializers, type modeling, and …
- Distinctive: line 82
Use SQL skills for database schemas, migrations, constraints, indexes, transactions, privileges, RLS, and query plans.
- Distinctive: line 85
Use architecture and DDD skills when dependency direction, ports/adapters, application boundaries, aggregates, or ubiquitous language are …
- Distinctive: line 109
Use protocol conventions where they help clients, but do not force every API into REST nouns, RPC verbs, or GraphQL shapes when another …
- Distinctive: line 120
Model resources and actions: Prefer stable domain nouns for resources and explicit command/action names for operations that do not fit CRUD.
- Distinctive: line 132
Specify error contracts: Use a consistent machine-readable error shape with stable codes, safe messages, invalid-field details, …
- Very specific: line 148
Write contract artifacts and examples: Update OpenAPI/AsyncAPI/JSON Schema/protobuf/GraphQL schema, request/response examples, SDK/CLI …
- Distinctive: line 151
Verify contract expectations: Run or add the narrowest practical checks: schema validation, contract tests, golden examples, …
- Distinctive: line 212
When uncertain, treat the change as client-observable and require migration or compatibility evidence.
“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
Use this skill to shape externally visible API contracts before implementation details take over. Keep decisions protocol-aware but framework-agnostic: the same review questions should work for REST resources, RPC methods, GraphQL fields and mutations, webhooks, event/message schemas, SDKs, and CLI public surfaces.
Use When
- Designing or changing resources, operations, action names, routes, methods, GraphQL fields, RPC calls, commands, webhook topics, or event names.
- Defining request inputs, response payloads, error envelopes, outcome/status codes, headers/metadata, schema artifacts, or generated client contracts.
- Choosing validation boundaries, required/optional fields, defaults, unknown field behavior, nullability, enum evolution, and data representation rules.
- Specifying pagination, filtering, sorting, search parameters, field selection, expansion/includes, cursor shape, or result ordering guarantees.
- Designing idempotency, retry behavior, conditional updates, optimistic concurrency, duplicate webhook delivery handling, or long-running operation contracts.
- Planning versioning, deprecation, backward compatibility, client migration, consumer/provider compatibility, or changelog expectations.
- Reviewing API examples, contract tests, SDK/CLI surface compatibility, or machine-readable specifications for contract correctness.
Do not use this skill as the primary workflow for framework routing mechanics, language type modeling, database schema/query design, architecture layering, security-control review, test methodology, or docs-only polishing after the contract is already settled.
For photo/video catalog contracts, compose with
digital-asset-management to define
asset, rendition, metadata, edit, collection, and smart-query semantics before
applying this skill's API contract rules.
Routing and Handoffs
- Use
semantic-versioningto aggregate compatibility impacts across a release and recommend or apply its patch, minor, major, or prerelease version. Keep API contract design and consumer compatibility analysis in this skill. - Load
security-reviewwhen API work touches authentication, authorization, object permissions, tenant isolation, scopes, sessions/cookies, CORS/CSRF/CSP, redirects/callbacks, webhook signatures, sensitive data exposure, input validation at a trust boundary, rate limits, quotas, abuse controls, auditability, or other security-sensitive behavior. Keep this skill focused on the public contract shape; let security-review judge the security property and evidence. - Load
observability-engineeringfor telemetry semantics, correlation, audit events, SLOs, dashboards, and alerts. Keep this skill involved when a telemetry field or event is itself part of the published API, SDK, CLI, webhook, or message contract. - Consult current official upstream documentation when the contract depends on current behavior of a third-party provider, API gateway, framework, SDK, schema tool, OpenAPI/AsyncAPI/GraphQL/protobuf library, cloud service, webhook provider, auth provider, rate-limit product, or CLI. Inspect local versions and repository conventions first, then query current docs for the exact provider or framework feature needed.
- Use language engineering skills for implementation mechanics, package/tool
workflow, generated code, serializers, type modeling, and language-specific
tests. For Rust web runtime and handler mechanics, use
rust-async-web. - Use SQL skills for database schemas, migrations, constraints, indexes, transactions, privileges, RLS, and query plans. A database schema is API design only when that schema is directly published as the external contract.
- Use architecture and DDD skills when dependency direction, ports/adapters, application boundaries, aggregates, or ubiquitous language are the main design question. Add this skill only for the exposed interface contract.
- Use
behavior-driven-developmentortest-driven-developmentwhen scenarios, executable specs, regression tests, or test-level selection drive the work. This skill owns what the contract must say; testing skills own how to prove it. - Use
documentation-engineeringfor reference docs, examples, migration guides, changelogs, and API prose once the contract decisions are made.
Protocol-Neutral Vocabulary
Map the local protocol to these neutral terms before designing:
| Contract question | REST/HTTP example | RPC example | GraphQL example |
| Addressable thing | resource route | service method | query/mutation field |
| Input | path/query/header/body | params/request message | arguments/input object |
| Output | representation | result message | field payload/type |
| Outcome | status code + body | result/error code | data/errors + extensions |
| Side effect | unsafe method/action | command method | mutation/subscription event |
Use protocol conventions where they help clients, but do not force every API into REST nouns, RPC verbs, or GraphQL shapes when another style is clearer.
Workflow
- Identify consumers and compatibility stakes. Name internal and external clients, generated SDKs, CLIs, webhooks, integrations, support windows, version commitments, and whether existing clients must keep working.
- Define the job and boundary. State the user-visible capability, actor, resource or operation, side effects, consistency expectations, and what the API deliberately does not expose.
- Model resources and actions. Prefer stable domain nouns for resources and explicit command/action names for operations that do not fit CRUD. Avoid leaking persistence tables, UI state, framework classes, or internal workflow steps as public contract concepts.
- Specify request contracts. Define required fields, optional fields, defaults, allowed values, nullability, units, time zones, encodings, size limits, unknown field behavior, validation timing, and idempotency keys or preconditions where relevant.
- Specify response contracts. Define success payload shape, envelope use, metadata, links, pagination cursors, representation expansion, ordering, partial success semantics, cache/ETag behavior, and fields clients can rely on versus fields that are informational.
- Specify error contracts. Use a consistent machine-readable error shape with stable codes, safe messages, invalid-field details, correlation/request identifiers when available, retryability, and protocol-appropriate outcome codes. Separate client-actionable errors from internal diagnostics.
- Define collection behavior. Make pagination, filtering, sorting, search, projection, and includes deterministic. State maximum page sizes, default ordering, cursor opacity, filter operators, unsupported combinations, and whether total counts are exact, approximate, or omitted.
- Define mutation and retry behavior. State idempotency, duplicate request handling, optimistic concurrency, conditional writes, long-running operation polling/cancellation, asynchronous completion, webhook retry semantics, and event ordering or deduplication guarantees.
- Plan evolution. Classify changes as backward compatible, additive, behavior-changing, or breaking. Define version fields/paths/headers/schema revisions, deprecation notices, sunset windows, migration paths, and client fallback behavior.
- Write contract artifacts and examples. Update OpenAPI/AsyncAPI/JSON Schema/protobuf/GraphQL schema, request/response examples, SDK/CLI examples, and migration notes at the same level of authority as the implementation.
- Verify contract expectations. Run or add the narrowest practical checks: schema validation, contract tests, golden examples, backward-compatibility tests, generated-client smoke tests, negative validation cases, and migration checks for changed clients.
- Complete the handoff. Name changed contract artifacts, checks run and their results, failed or skipped checks, and unresolved consumer, migration, or compatibility risk.
Contract Checklist
- Names and shape: names match the domain, are stable across clients, and do not expose framework, database, or UI internals as public concepts.
- Resource/action fit: CRUD-like operations use predictable resource semantics; non-CRUD commands are explicit about side effects and outcomes.
- Requests: required fields, optional fields, defaults, unknown fields, nulls, enums, formats, units, limits, and validation errors are specified.
- Responses: payloads are minimal but sufficient; metadata is separated from data; clients know which fields are stable, nullable, deprecated, or computed.
- Errors/outcomes: outcome codes and error codes are stable, safe to expose, actionable by clients, and consistent across related operations.
- Collections: pagination, filtering, sorting, search, projection, includes, counts, and ordering guarantees behave predictably under data changes.
- Idempotency and concurrency: retries, duplicate requests, conditional writes, update conflicts, async operations, webhook redelivery, and event deduplication have explicit contracts.
- Compatibility: additive changes are safe for old clients; breaking changes have a versioning and migration plan; deprecated fields and operations have clear replacement paths.
- Security-sensitive surfaces: auth, permissions, scopes, validation limits,
sensitive fields, rate limits, and abuse controls route through
security-reviewbefore the contract is treated as complete. - Provider/framework dependence: current external provider or framework behavior is checked against official upstream documentation when local code and docs are not enough.
- Docs and examples: examples are realistic, deterministic, sanitized, and cover success, validation failure, authorization/security-sensitive failures when appropriate, pagination, and migration-relevant changes.
- Tests: contract artifacts, examples, generated clients, compatibility guarantees, and error cases are covered by repository-appropriate tests.
Compatibility Rules of Thumb
Usually backward compatible:
- Adding optional request fields with safe defaults.
- Adding response fields when clients are expected to ignore unknown fields.
- Adding enum values only when clients are documented and tested to tolerate unknown values.
- Adding new operations, filters, sort keys, or webhook event types without changing existing behavior.
Usually breaking or behavior-changing:
- Renaming, removing, retyping, or changing meaning of existing fields.
- Making optional input required, narrowing accepted values, or changing validation timing in a way existing clients can observe.
- Changing default sorting, pagination cursor semantics, ID format stability, error codes, status/outcome codes, retryability, or idempotency behavior.
- Returning less data, different units, different time zones, different null behavior, or different authorization visibility for existing operations.
When uncertain, treat the change as client-observable and require migration or compatibility evidence.
Anti-Patterns
- Designing from handler names, database tables, ORM models, UI components, or a single current client instead of the durable external contract.
- Mixing unrelated actions into one catch-all endpoint, method, mutation, event, or command because it is easier to implement.
- Returning free-form strings as the only error contract or exposing stack traces, internal identifiers, raw provider messages, or policy details in client errors.
- Treating pagination cursors as client-editable filters, relying on unstable default ordering, or promising exact counts that the system cannot maintain.
- Adding version numbers without a compatibility policy, deprecation path, or migration test.
- Copying provider or framework documentation into the contract instead of checking current docs and recording the project-specific decision.
Zod Implementation Routing
Zod is an implementation validator, not the public-contract authority. Keep published schemas, compatibility/versioning decisions, and stable error envelopes here; route selected request/query/event parsing patterns and generated-schema parity tests to zod-engineering.
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.

