api-patterns

Guide API design decisions for REST, GraphQL, or tRPC endpoints.

Updated May 19, 2026
One-click install
npx skills add https://github.com/TimeKast/AgendaInteligente --skill api-patterns-timekast
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: api-patterns
Source: https://github.com/TimeKast/AgendaInteligente/tree/main/.agent/skills/api-patterns
Command: npx skills add https://github.com/TimeKast/AgendaInteligente --skill api-patterns-timekast

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires python, json, re, pathlib, and includes scripts (resource) components.

What problem does it solve?

It helps you design and standardize web APIs so choices like REST vs GraphQL vs tRPC, response envelopes, pagination, versioning, auth, rate limiting, and documentation are made deliberately and stay consistent over time.

Core Features & Use Cases

  • API style selection: Decide between REST, GraphQL, and tRPC based on consumer needs (public vs internal), frontend type safety, and data complexity.
  • REST fundamentals: Use resource-based naming, correct HTTP methods, and appropriate status codes.
  • Response format consistency: Apply an envelope pattern, safe error shapes, and pagination strategies (offset, cursor, keyset).
  • API evolution planning: Choose versioning via URI, headers, query parameters, or intentional no-versioning for controlled contexts.
  • Security and abuse protection: Select authentication patterns and add rate limiting plus an OWASP API-focused testing checklist.
  • Documentation guidance: Ensure OpenAPI/Swagger docs include schemas, auth, errors, examples, and rate-limit details.

Quick Start

Ask the AI to help you design an API for your use case by specifying your consumers, preferred API style, required auth method, desired pagination approach, and the response/error format you want to standardize.

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 design?▼

Choosing between REST, GraphQL, and tRPC depends on your consumer needs, frontend type safety, and data complexity. REST suits public clients, while GraphQL handles complex data queries and tRPC provides internal type safety.

What is the best way to standardize API response formats and error envelopes?▼

Standardizing API response formats involves applying a consistent envelope pattern and safe error shapes. You should define uniform structures for all successful responses and errors to maintain API consistency across endpoints.

How do I implement API security testing aligned with OWASP API Top 10?▼

Implementing API security testing involves applying a decision checklist that covers authentication patterns, rate limiting plans, and alignment with OWASP API Top 10 vulnerabilities. This ensures endpoints are protected against common abuse vectors.

Which pagination strategy should I use for my REST or GraphQL API?▼

Selecting a pagination strategy depends on your dataset size and query patterns. You can choose from offset, cursor, or keyset pagination to control how clients retrieve large lists of resources efficiently.

What should be included in OpenAPI documentation for an API?▼

OpenAPI documentation should include schemas, authentication methods, error responses, examples, and rate-limit details. Ensuring these elements are present makes the API documentation comprehensive for consumers.

Do I need to plan API versioning for internal HTTP service endpoints?▼

Planning API versioning is necessary for controlled evolution of HTTP service endpoints. You can version via URI, headers, query parameters, or choose intentional no-versioning for strictly controlled internal contexts.