api-patterns

Guide API architects in selecting architectures and defining response, versioning, and pagination strategies.

Updated Mar 8, 2026
One-click install
npx skills add https://github.com/darthlinuxer/dialectic-crew-ai --skill api-patterns-darthlinuxer
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: api-patterns
Source: https://github.com/darthlinuxer/dialectic-crew-ai/tree/main/src/mcp/skills/api-patterns
Command: npx skills add https://github.com/darthlinuxer/dialectic-crew-ai --skill api-patterns-darthlinuxer

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Provides a structured, decision-driven approach to choosing API architectures and designing consistent response formats, versioning, pagination, and security practices so teams avoid mismatched choices and fragile interfaces.

Core Features & Use Cases

  • Decision guidance: A decision tree for choosing REST, GraphQL, tRPC, gRPC, or WebSocket approaches based on consumers and constraints.
  • Design standards: Recommendations for resource naming, HTTP methods, status codes, response envelopes, pagination strategies, and versioning choices.
  • Security & testing: Patterns for authentication (JWT, OAuth, Passkeys), rate limiting, OWASP API security checks, and a script to validate OpenAPI specs and common API code issues.
  • Use Case: Selects tRPC for a TypeScript monorepo to achieve end-to-end types, chooses GraphQL for complex multi-client querying, or picks REST + OpenAPI for a public cross-platform API and validates the implementation with the included validator script.

Quick Start

Run the api-patterns validator on the project root to scan for OpenAPI issues, missing responses, validation gaps, and common API anti-patterns.

Frequently Asked Questions about api-patterns

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

FAQPage Schema
How do I choose between REST, GraphQL, and tRPC for my API architecture?▼

Choosing between REST, GraphQL, and tRPC depends on your consumers and constraints: use tRPC for TypeScript monorepo end-to-end types, GraphQL for complex multi-client querying, and REST with OpenAPI for public cross-platform APIs.

What are the best practices for API versioning and pagination?▼

Best practices for API versioning and pagination involve defining consistent response formats and resource strategies, applying standardized resource naming, HTTP methods, and response envelopes to prevent fragile interfaces.

How do I validate an OpenAPI spec and find common API anti-patterns?▼

You validate an OpenAPI spec by running a validator script against your project root, which scans for missing responses, validation gaps, and common API anti-patterns.

What authentication patterns should I use for securing web service APIs?▼

Authentication patterns for securing web service APIs include JWT, OAuth, and Passkeys, supplemented by rate limiting and OWASP API security checks to establish baseline security.

When should I use gRPC or WebSocket real-time patterns over standard REST?▼

You should use gRPC or WebSocket real-time patterns over standard REST when your API architecture demands specific real-time communication capabilities or constraints that request-response models cannot satisfy.