api-patterns

Guide API style selection between REST, GraphQL, and tRPC with decision checklists.

Updated Jan 3, 2026
One-click install
npx skills add https://github.com/thgterto/Gerenciador-de-estoque --skill api-patterns-thgterto
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-patterns
Source: https://github.com/thgterto/Gerenciador-de-estoque/tree/main/.agent/skills/api-patterns
Command: npx skills add https://github.com/thgterto/Gerenciador-de-estoque --skill api-patterns-thgterto

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill provides a principled framework to guide teams in selecting API styles (REST, GraphQL, and tRPC) and related standards to ensure consistent, scalable interfaces.

Core Features & Use Cases

  • Decision tree for choosing API styles based on project context, team structure, and deployment needs.
  • Guidance on versioning, response formats, error handling, and pagination to standardize integrations.
  • Use Case: A multi-team product with microservices evaluating REST vs GraphQL for lightweight vs complex data queries.

Quick Start

Review the API patterns directory and select a design approach (REST, GraphQL, or tRPC) based on your project's needs.

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 project context, team structure, and deployment needs. A decision tree evaluates these factors to recommend the most suitable API style for your specific architecture.

What is the best way to standardize API versioning and pagination across microservices?

Standardizing API versioning and pagination requires applying consistent design patterns across services. This framework provides guidance on response formats, error handling, and pagination to standardize integrations throughout your microservices architecture.

When should I use GraphQL instead of REST for complex data queries?

GraphQL is preferred over REST for complex data queries when your multi-team product needs lightweight versus robust data fetching capabilities. The decision checklist evaluates query complexity and team structure to recommend the appropriate style.

Does this API patterns framework provide anti-pattern guidance for public APIs?

Yes, the API patterns framework includes anti-pattern guidance and a validator script to enforce cohesive design. It ensures consistent standards are applied when evaluating API styles for public APIs, microservices, and monorepos.

How do I enforce consistent API design standards in a monorepo?

Enforcing consistent API design in a monorepo involves applying a decision checklist and validator script. This ensures cohesive API design across REST, GraphQL, and tRPC implementations by standardizing versioning and response formats.

Can I use tRPC for public APIs or is it only for internal monorepos?

tRPC can be evaluated for public APIs using the provided decision tree. The framework assesses project context and deployment needs to determine if tRPC is appropriate compared to REST or GraphQL for your public API requirements.