api-patterns

Guide API design decisions between REST, GraphQL, and tRPC.

Updated Jan 16, 2026
One-click install
npx skills add https://github.com/namninhnd/PrelimStruct --skill api-patterns-namninhnd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-patterns
Source: https://github.com/namninhnd/PrelimStruct/tree/main/.claude/skills/api-patterns
Command: npx skills add https://github.com/namninhnd/PrelimStruct --skill api-patterns-namninhnd

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill helps developers make informed decisions about API design, ensuring they choose the right architecture and patterns for their specific needs, avoiding common pitfalls.

Core Features & Use Cases

  • Architectural Choice: Guides selection between REST, GraphQL, and tRPC based on project requirements.
  • Pattern Implementation: Provides best practices for naming, HTTP methods, status codes, response formats, versioning, authentication, and rate limiting.
  • Use Case: A team is starting a new project with a TypeScript frontend and backend. This Skill helps them decide if tRPC is the best fit and guides them on implementing type-safe API calls.

Quick Start

Use the api-patterns skill to help choose between REST and GraphQL for a new public-facing API.

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 a new API?

Choosing between REST, GraphQL, and tRPC depends on your project requirements and client needs. This API design guidance helps you evaluate architectural patterns, compare trade-offs, and select the right structure for scalable, maintainable APIs.

What are the best practices for REST API resource naming, HTTP methods, and status codes?

Best practices for REST API design include using clear resource naming, appropriate HTTP methods, and correct status codes. This guide provides principles for structuring response formats and implementing patterns to ensure your API is robust and maintainable.

How do I implement API versioning, authentication, and rate limiting?

Implementing API versioning, authentication, and rate limiting requires applying established architectural patterns and decision-making principles. This guide covers best practices for securing endpoints, managing request traffic, and maintaining robust API security.

Is tRPC a good fit for a TypeScript frontend and backend project?

tRPC is a strong fit for TypeScript frontend and backend projects because it enables end-to-end type-safe API calls without manual schema management. Use this API design guidance to evaluate if tRPC meets your architectural needs and implement it effectively.

When should I use GraphQL instead of REST for a public-facing API?

You should use GraphQL instead of REST for a public-facing API when clients need flexible data querying and efficient aggregation. Use this API design guidance to compare architectural patterns and select the right approach for your specific use case.