api-design-patterns

Design RESTful APIs with HTTP methods, status codes, pagination, filtering, error handling, and OpenAPI documentation.

10|5|Updated Dec 12, 2025
One-click install
npx skills add https://github.com/ils15/mythic-agents --skill api-design-patterns-ils15
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-design-patterns
Source: https://github.com/ils15/mythic-agents/tree/main/skills/api-design-patterns
Command: npx skills add https://github.com/ils15/mythic-agents --skill api-design-patterns-ils15

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Design RESTful APIs with best practices for HTTP methods, status codes, pagination, filtering, error handling, and OpenAPI documentation.

Core Features & Use Cases

  • Provide consistent API design guidelines for resource-based endpoints
  • Enforce pagination, filtering, error responses, and OpenAPI generation
  • Use Case: Review endpoints in a FastAPI project to ensure consistency with these patterns.

Quick Start

Use the api-design-patterns skill to review and standardize the API surface of a FastAPI project.

Frequently Asked Questions about api-design-patterns

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

FAQPage Schema
What are the best practices for REST API design regarding HTTP methods and status codes?

REST API design best practices require using standard HTTP methods like GET, POST, PUT, and DELETE for resource manipulation, paired with correct HTTP status codes to indicate response outcomes. Applying these patterns ensures consistent, predictable resource-based endpoints across your API surface.

How do I implement pagination and filtering in a FastAPI project?

To implement pagination and filtering in a FastAPI project, apply standardized API design patterns that enforce consistent query parameters for limiting results and sorting resources. This standardization ensures your endpoints handle large datasets predictably and maintain a uniform response schema.

How should I structure error handling and responses in a RESTful API?

Error handling in a RESTful API should utilize standardized error response schemas that provide consistent context for failures. Enforcing consistent error response patterns allows clients to reliably parse issues, leveraging appropriate HTTP status codes to signal the exact nature of the problem.

Does this API design approach work with OpenAPI documentation and Pydantic schemas?

Yes, this API design approach integrates directly with OpenAPI documentation and Pydantic schemas. It enforces patterns for request and response schemas that automatically generate accurate OpenAPI documentation, making it ideal for standardizing the API surface of FastAPI projects.

What is the best way to review and standardize an existing FastAPI project's endpoints?

The best way to review and standardize FastAPI endpoints is to evaluate them against established resource-based API design guidelines. Checking endpoints for consistent pagination, filtering, error responses, and OpenAPI integration ensures your entire API surface adheres to robust design patterns.

When do I need to enforce specific API patterns for request and response schemas?

You need to enforce specific API patterns for request and response schemas when designing RESTful APIs that require consistent validation and OpenAPI integration. Enforcing these patterns during API design reviews prevents endpoint inconsistencies and ensures reliable data exchange across your project.