api-design-patterns

Provide REST API design best practices for resource naming, pagination, versioning, and OpenAPI spec generation.

100|18|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/Mybono/ai-orchestrator --skill api-design-patterns-mybono
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-design-patterns
Source: https://github.com/Mybono/ai-orchestrator/tree/main/skills/api-design-patterns
Command: npx skills add https://github.com/Mybono/ai-orchestrator --skill api-design-patterns-mybono

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill addresses the complexities of designing RESTful APIs by providing guidelines on resource naming, pagination, versioning, and OpenAPI specification generation, simplifying the API development process.

Core Features & Use Cases

  • Resource Naming: Offers best practices for naming resources to ensure clarity and consistency.
  • Pagination: Guidelines for implementing cursor-based and offset-based pagination.
  • Versioning: Recommendations for versioning APIs to maintain backward compatibility.
  • OpenAPI Spec Generation: Guidance on creating OpenAPI specifications for API documentation and client SDK generation.
  • Use Case: A developer aiming to design a new REST API for a web service can use this Skill to ensure the API adheres to best practices and is well-documented.

Quick Start

Generate an OpenAPI spec for your API using the 'api-design-patterns' skill and the provided 'api-definition.yaml' file.

Frequently Asked Questions about api-design-patterns

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

FAQPage Schema
What is the best way to design a REST API with consistent resource naming and pagination?

REST API versioning maintains backward compatibility by allowing clients to target specific API versions while new features are deployed. This approach prevents breaking existing integrations when you update endpoints or modify resource structures.

How do I generate an OpenAPI specification from an API definition file?

You can generate an OpenAPI specification by processing your API definition file using the provided scripts. This creates standardized documentation and enables automated client SDK generation for your REST API endpoints.

When do I need to use cursor-based pagination instead of offset-based pagination in a REST API?

Cursor-based pagination is needed in REST APIs when handling large, dynamic datasets where offset-based pagination becomes inefficient. This approach uses a pointer to the last retrieved item, preventing performance degradation on deep database queries.

Can I use this API design guidance for an existing web service, or is it only for new REST APIs?

You can use this API design guidance for both new and existing web services. It provides best practices for resource naming, versioning, and OpenAPI spec generation to help refactor and document current APIs for better maintainability.