api-design-guidelines

Designs REST and GraphQL API contracts with RFC 7807 errors and cursor pagination.

1|Updated Jun 29, 2026
One-click install
npx skills add https://github.com/coreyone/software-maestro --skill api-design-guidelines-coreyone
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: api-design-guidelines
Source: https://github.com/coreyone/software-maestro/tree/main/data-and-api/api-design-guidelines
Command: npx skills add https://github.com/coreyone/software-maestro --skill api-design-guidelines-coreyone

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Designing web APIs without clear conventions leads to inconsistent endpoints, breaking changes, and fragile error handling that frustrates API consumers. This Skill provides contract-first design rules for REST and GraphQL APIs so endpoints are predictable, evolvable, and backward compatible. ## Core Features & Use Cases - Contract-First API Design: Draft OpenAPI specifications for REST or schema definitions for GraphQL that match the project's existing framework (FastAPI, Express, Next.js, Django). - Standardized Error Handling: Apply RFC 7807 problem details with stable machine-readable fields instead of ad-hoc error strings. - Scalable Pagination & Filtering: Define cursor-based pagination with explicit filter and sort parameters for high-volume list endpoints. - Use Case: When adding a paginated orders endpoint to an existing FastAPI service, use this Skill to produce the OpenAPI contract, RFC 7807 error envelope, and cursor pagination parameters without changing the stack. ## Quick Start Ask the agent to design a paginated REST endpoint with an OpenAPI contract and standardized RFC 7807 error responses for the current project.

Frequently Asked Questions about api-design-guidelines

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design a paginated REST API endpoint?▼

Use cursor-based pagination with an opaque cursor parameter and a limit for high-frequency or large datasets, and offset-based pagination only for small static collections. Always pair pagination with explicit filter fields and a stable sort order in the contract.

What is RFC 7807 and how do I use it for API errors?▼

RFC 7807 defines a standard problem details format for HTTP API errors with type, title, status, and detail fields. It gives clients stable machine-readable error types instead of free-form message strings, and internal stack traces must never be exposed.

Should I use REST or GraphQL for my API design?▼

REST with OpenAPI suits resource-oriented endpoints following the Richardson Maturity Model, while GraphQL fits clients needing flexible field selection. This Skill supports both and drafts the contract in whichever protocol the project already uses.

Does this work with FastAPI or Express projects?▼

Yes, the Skill detects the existing stack such as FastAPI, Express, Next.js, or Django and produces that framework's native contract artifact. It never forces a migration to a different framework or language.

How do I version an API without breaking existing clients?▼

Use path-based versioning like /api/v1/users for visibility, or header-based content negotiation when URLs must stay resource-pure. Only additive, backward-compatible changes may ship without a version increment, and clients should ignore unknown response fields.

When should I not use API design guidelines?▼

Do not apply these guidelines to frontend state management, local storage layout, or UI styling concerns. Authentication protocol design is delegated to a separate web security skill rather than handled here.