api-patterns

Evaluate use-case requirements to choose between REST, GraphQL, and tRPC.

1|Updated Dec 19, 2025
One-click install
npx skills add https://github.com/fnsalinas/fnsalinas.github.io --skill api-patterns-fnsalinas
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-patterns
Source: https://github.com/fnsalinas/fnsalinas.github.io/tree/main/.agent/skills/api-patterns
Command: npx skills add https://github.com/fnsalinas/fnsalinas.github.io --skill api-patterns-fnsalinas

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

API pattern guidance helps product and engineering teams choose the most appropriate API style (REST, GraphQL, or tRPC) and align decisions with versioning, pagination, and response formats, reducing guesswork and rework.

Core Features & Use Cases

  • Framework for selecting API styles based on consumer needs, data complexity, and platform constraints.
  • Guidelines covering resource naming, status codes, error handling, and open documentation standards.
  • Practical use cases contrasting REST, GraphQL, and tRPC for public vs internal APIs, with rationale examples.

Quick Start

Ask the AI to evaluate your API requirements and select the best pattern (REST, GraphQL, or tRPC) for your context.

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?

API design pattern selection requires evaluating consumer needs, data complexity, caching, and security constraints. This framework contrasts REST, GraphQL, and tRPC to align your decision with specific public or internal API use cases.

What is the best way to version an API and handle pagination?

The best way to version an API and handle pagination involves applying proven design patterns that align with your chosen architectural style. Structured guidelines cover resource naming, status codes, error handling, and response formats to reduce guesswork and rework.

Does this API pattern framework work with existing OpenAPI documents?

Yes, this API pattern framework integrates with existing design docs and OpenAPI documents. It evaluates your current API requirements against established criteria like consumer needs and data complexity to validate or refine your architectural choices.

When should I not use GraphQL for my public API?

You should avoid GraphQL for public APIs when simple caching, strict security constraints, or low data complexity are primary concerns. In these cases, REST may provide a more suitable and easily constrained pattern for external consumers.

How do I evaluate API requirements to select the right architecture?

To evaluate API requirements, you assess use-case constraints including consumer needs, data complexity, caching, and security. This process identifies the optimal API design choice among REST, GraphQL, and tRPC for your specific platform context.