api-design-principles

Define REST and GraphQL API contracts with schema-first design guidance.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/okatech-org/gabon-diplomatie --skill api-design-principles-okatech-org
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-design-principles
Source: https://github.com/okatech-org/gabon-diplomatie/tree/main/.agent/skills/api-design-principles
Command: npx skills add https://github.com/okatech-org/gabon-diplomatie --skill api-design-principles-okatech-org

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes assets (resource) and references (resource) components.

What problem does it solve?

Designing REST and GraphQL APIs can be inconsistent, error-prone, and hard to scale; this guide provides a pragmatic framework to standardize API contracts and design decisions for durable interfaces.

Core Features & Use Cases

  • Define consumers, use cases, and constraints.
  • Choose API styles (REST/GraphQL) and model resources, types, and endpoints.
  • Specify errors, versioning, pagination, and auth strategy.
  • Use Case: Draft API specs for a new service, migrate from REST to GraphQL, and review API designs for consistency.

Quick Start

Draft your API goals and constraints, then outline a REST or GraphQL schema and a matching playbook to begin implementing the design.

Frequently Asked Questions about api-design-principles

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

FAQPage Schema
What is a schema-first approach for REST and GraphQL API design?

A schema-first approach for REST and GraphQL API design defines API contracts and types before implementation, ensuring consistent interfaces, enforceable validation, and maintainable developer documentation.

How do I choose between REST and GraphQL for my new service?

To choose between REST and GraphQL for a new service, evaluate your consumers, use cases, and constraints. REST models resources and endpoints, while GraphQL offers flexible querying and type systems.

How do I standardize error handling, pagination, and versioning in API design?

Standardize API design by defining consistent strategies for error handling, versioning, and pagination across your REST or GraphQL endpoints, using structured guidance and templates to enforce API contracts.

Can I use these API design principles to migrate from REST to GraphQL?

Yes, you can use these API design principles to migrate from REST to GraphQL. The framework supports API migrations by modeling resources, redefining types, and standardizing the new GraphQL schema.

Does this API design framework work for reviewing existing API consistency?

Yes, this API design framework works for reviewing existing API consistency. It provides structured guidance and validation templates to review API designs, enforce standard contracts, and identify inconsistencies.

When should I use GraphQL instead of REST for API pagination?

Use GraphQL instead of REST for API pagination when clients need flexible, nested data retrieval with cursor-based connections, whereas REST is often sufficient for simpler, resource-oriented paginated endpoints.