api-patterns

Identify the optimal API style among REST, GraphQL, and tRPC for a project.

6|Updated Mar 1, 2026
One-click install
npx skills add https://github.com/ChrstprJohn/SamsonDentalCenter --skill api-patterns-chrstprjohn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-patterns
Source: https://github.com/ChrstprJohn/SamsonDentalCenter/tree/main/.agent/skills/Backend/api-patterns
Command: npx skills add https://github.com/ChrstprJohn/SamsonDentalCenter --skill api-patterns-chrstprjohn

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

API design decisions are often ad-hoc and misaligned with stakeholder needs. This Skill provides a principled framework to select the most appropriate API style (REST, GraphQL, or tRPC) based on consumption patterns, data needs, and evolution considerations.

Core Features & Use Cases

  • Decision guidance comparing REST, GraphQL, and tRPC across typical use cases, data requirements, and team capabilities
  • Practical anti-patterns and best-practices to avoid common API design mistakes
  • Real-world scenarios (public APIs, internal microservices, monorepos) with prompts to drive the trade-off analysis

Quick Start

Evaluate your project context and select the best API style (REST, GraphQL, or tRPC) for this 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?

Choosing an API style requires evaluating consumption patterns, data needs, and team capabilities. A structured decision framework compares REST, GraphQL, and tRPC to guide style selection based on these factors.

What is the best way to decide on an API style for internal microservices and monorepos?

The best way to decide on an API style for internal microservices and monorepos is using a decision-tree workflow. It guides trade-off analysis for data needs and consumer contexts specific to your architecture.

When should I use GraphQL instead of REST for my project?

You should use GraphQL instead of REST when your consumption patterns require highly flexible data fetching. The decision framework identifies scenarios where GraphQL mitigates over-fetching better than REST.

What are common API design anti-patterns and how do I avoid them?

Common API design anti-patterns include misaligned data needs and ad-hoc style choices. Applying best-practice scenarios and a principled decision framework helps avoid these frequent API design mistakes.

Can I apply this API decision framework to public services and microservices alike?

Yes, you can apply the API decision framework to public services and microservices. It provides example scenarios and prompts to drive trade-off analysis across varying data needs and consumer contexts.