api-patterns

Identify REST, GraphQL, or tRPC for projects based on API requirements.

Updated Jan 24, 2026
One-click install
npx skills add https://github.com/lehoangphuc747/anki-lms-demo --skill api-patterns-lehoangphuc747
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-patterns
Source: https://github.com/lehoangphuc747/anki-lms-demo/tree/main/.agent/skills/api-patterns
Command: npx skills add https://github.com/lehoangphuc747/anki-lms-demo --skill api-patterns-lehoangphuc747

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

API design decisions are often inconsistent and costly, leading to brittle interfaces and wasted engineering time.

Core Features & Use Cases

  • Decision tree guidance: when to choose REST, GraphQL, or tRPC based on project needs.
  • Content map: references to core topics like api-style.md, auth.md, versioning.md, and pagination.
  • Best-practice patterns: recommended documentation approaches, error formats, and versioning strategies.

Quick Start

Analyze your API requirements and rely on the API Pattern Decision Tree to choose between REST, GraphQL, or tRPC for your project.

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 an API design style involves evaluating REST, GraphQL, or tRPC based on project needs like public exposure, data complexity, and internal services. A decision tree captures these criteria to recommend the most suitable pattern.

What are the best practices for API versioning and documentation?

API versioning and documentation best practices involve applying consistent error formats, versioning strategies, and structured documentation approaches. These patterns ensure interface stability and clear communication across development teams.

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

GraphQL suits complex data requirements better than REST when clients need flexible querying and aggregated responses. The decision tree evaluates data complexity and documentation needs to determine if GraphQL is the appropriate choice over REST.

Does tRPC work well for internal services compared to public APIs?

tRPC works well for internal services where end-to-end type safety is prioritized over public exposure. The API pattern decision criteria assesses whether a project involves internal services or public APIs to recommend tRPC accordingly.

How do I implement consistent API design patterns across multiple teams?

Implementing consistent API design patterns across teams requires documented best practices for error formats, pagination, and versioning. Applying these shared decision criteria ensures uniform interfaces and reduces engineering inconsistencies.