api-design

Solid

Design a REST or GraphQL API contract before any code is written. Use when the user wants to define resources, endpoints, request/response schemas, auth, pagination, errors, idempotency, rate limits, versioning, or emit an OpenAPI/GraphQL SDL artifact. Triggers: "design an API for X", "draft an OpenAPI spec for Y", "define the resource model and endpoints", "spec the REST contract for Z", "model the API surface for W", "write the GraphQL schema".

API & Backend 0 stars 0 forks Updated today MIT

Install

View on GitHub

Quality Score: 78/100

Stars 20%
0
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# API Design (API 契约设计) Design — do not implement — an API contract from a business requirement. Stop at the contract boundary; framework code (routes, handlers, ORM) belongs to `generate-api`. ## When to Use - User asks for an API contract, OpenAPI document, or GraphQL schema - User wants resource modeling, endpoint surface, or request/response shapes pinned down - User wants explicit auth/authz, pagination, errors, idempotency, rate-limit, or versioning policy - A team needs a shared contract before frontend, backend, or integration work splits Do NOT use when the user asks for runnable framework code (route handlers, controllers, ORM mappings) — route to `generate-api` instead. ## Procedure 1. Extract actors, resources, and operations from the requirement; classify each action as read, write, or admin. 2. Model resources: noun, identifier strategy (UUID vs. autoincrement), fields with types, required/optional flags, relationships. 3. Choose style — REST + OpenAPI 3.1, GraphQL SDL, or hybrid — and record the rationale in the output. 4. Define endpoints: method + path + auth scope; plural nouns for REST, domain-grouped types/queries for GraphQL. 5. Specify request schema (body, query, path, headers) and response schema (success + error envelope) with field-level constraints and examples. 6. Define auth/authz: scheme (Bearer/JWT/API key/OAuth2), scopes/roles per endpoint, ownership rules, multi-tenant boundaries. 7. Specify cross-cutting behavior: pagination (cursor or ...

Details

Author
AVA-2568
Repository
AVA-2568/MY_SKILL
Created
2 days ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

API & Backend Solid

api-design

Generates RESTful and GraphQL API designs with OpenAPI specs, proper resource naming, HTTP method usage, status codes, pagination, filtering, error responses, versioning strategies, and GraphQL schema patterns. Triggers on: "design API", "create API spec", "OpenAPI", "REST endpoint design", "GraphQL schema".

7 Updated today
timwukp
API & Backend Solid

design-api

Design RESTful and GraphQL APIs following current best practices for naming, versioning, error shapes, and auth patterns. Use when the user says "design an API", "create endpoints", "structure my API responses", "plan API architecture", "REST vs GraphQL", or "API contract". Covers OpenAPI spec, pagination, rate limiting, and backwards-compatible evolution. Pairs with backend-patterns, audit-security.

6 Updated 3 days ago
kensaurus
API & Backend Listed

api-contract-designer

Use when designing an API, writing a contract, choosing REST vs GraphQL vs gRPC, authoring OpenAPI / swagger / GraphQL SDL / proto, defining endpoints, request and response shapes, error codes, idempotency keys, pagination, webhooks, SDK surface, or stating a versioning policy. Triggers on API, contract, endpoint, REST, GraphQL, gRPC, OpenAPI, swagger, proto, schema first, idempotent, cursor pagination, breaking change, error code, webhook, SDK. Produces the contract artifact (OpenAPI spec, GraphQL schema, or proto), an error code table, a versioning policy, and a breaking change checklist before any code is written. Do not invoke for pure implementation work (route the request to senior-backend-engineer) or for system level protocol selection across services (route to staff-software-architect).

0 Updated 1 weeks ago
iamdemetris