api-patterns

Design and analyze REST, GraphQL, and tRPC APIs for modern web applications.

Updated Aug 5, 2025
One-click install
npx skills add https://github.com/lehuuhau1231/TechJobs --skill api-patterns-lehuuhau1231
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-patterns
Source: https://github.com/lehuuhau1231/TechJobs/tree/main/tech-job-client/.agent/skills/api-patterns
Command: npx skills add https://github.com/lehuuhau1231/TechJobs --skill api-patterns-lehuuhau1231

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides expertise in designing APIs with a focus on REST, GraphQL, and tRPC, addressing the challenges of modern systems with scalable, efficient, and secure APIs.

Core Features & Use Cases

  • API Design Principles: Learn and apply fundamental API design principles.
  • Decision-Making: Guidance on selecting the right API style for different scenarios.
  • Use Cases: Covers REST vs GraphQL vs tRPC selection, response formats, versioning, pagination, and more.
  • Use Case: Design an API for a real-time application that requires low latency and high scalability.

Quick Start

Learn the best practices for API design by reviewing the 'api-style.md' document.

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 for API design depends on your system requirements, such as whether you need stateless scalability, flexible querying, or TypeScript monorepo efficiency. The Skill provides decision-making guidance to select the right API style for different scenarios.

What are the best practices for API versioning and pagination in modern web applications?

Best practices for API versioning and pagination in modern web applications involve standardizing response formats and controlling data payload sizes. This Skill covers these implementation details to ensure your API remains scalable and efficient as your application grows.

How do I design an API for a real-time application that requires low latency and high scalability?

To design an API for a real-time application requiring low latency and high scalability, you must apply targeted API design principles and style selection. This Skill analyzes REST, GraphQL, and tRPC to determine the best approach for modern web applications.

Can I use tRPC for API development outside of a TypeScript monorepo?

tRPC for API development is specifically designed for TypeScript monorepos to provide end-to-end type safety. Using it outside of a TypeScript environment is not its intended use case, and the Skill focuses on its application within that specific architectural context.

When should I not use GraphQL over REST for API development?

You should not use GraphQL over REST for API development when your system requires simple resource-based interactions without complex querying needs, as REST principles offer a more straightforward implementation. The Skill provides comparative analysis to help identify these constraints.