api-design-principles

Apply schema-first GraphQL and resource-oriented REST design patterns.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

API design often suffers from inconsistent naming, unclear resource boundaries, and difficult integration for developers. This guide helps teams align on best practices for REST and GraphQL APIs to deliver predictable, scalable, and developer-friendly interfaces.

Core Features & Use Cases

  • REST design principles for resources, verbs, and versioning.
  • GraphQL schema-first design, with queries, mutations, and subscriptions.
  • Patterns for versioning, pagination, errors, and data loading to prevent N+1.
  • Use cases: designing a new API, updating an existing API, reviewing specs, and establishing team standards.

Quick Start

Define the core resources and endpoints, model the GraphQL schema, and review against the REST and GraphQL best-practice checklist.

Frequently Asked Questions about api-design-principles

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

FAQPage Schema
What are the best practices for REST API design and resource modeling?

REST API design benefits from resource-oriented patterns, clear verbs, and consistent versioning. Apply these principles to define predictable resource boundaries and improve interface maintainability across development teams and products.

How do I prevent N+1 queries in GraphQL APIs?

Prevent N+1 queries in GraphQL APIs by implementing DataLoader usage within your resolvers. This batching pattern ensures scalable data fetching and avoids redundant database calls during complex nested query execution.

How do I design a GraphQL schema using a schema-first approach?

Design a GraphQL schema using a schema-first approach by defining queries, mutations, and subscriptions before writing resolver logic. This method enforces consistency, clarifies data contracts, and improves overall API usability.

What is the best way to handle pagination and error handling across REST and GraphQL APIs?

Handle pagination and error handling across REST and GraphQL APIs by enforcing standardized patterns for cursor-based pagination and consistent error payloads. This ensures predictable integration and a developer-friendly interface.

Can I use these API design principles to establish team standards for reviewing existing API specs?

Yes, you can use these API design principles to establish team standards for reviewing existing API specs. Evaluate your current REST and GraphQL interfaces against the checklist to identify inconsistencies and enforce best practices.