api-patterns

Recommends optimal API style by analyzing user-defined requirements and trade-offs.

8|Updated Feb 4, 2026
One-click install
npx skills add https://github.com/MisonL/Ling --skill api-patterns-misonl
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-patterns
Source: https://github.com/MisonL/Ling/tree/main/.agents/skills/api-patterns
Command: npx skills add https://github.com/MisonL/Ling --skill api-patterns-misonl

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Selecting the right API style (REST, GraphQL, or tRPC) for a project to balance simplicity, flexibility, and type-safety.

Core Features & Use Cases

  • Decision framework for choosing REST, GraphQL, or tRPC based on data needs, client diversity, and maintenance constraints.
  • Guidance on response formats, versioning strategies, and pagination approaches.
  • Use Case: Public APIs require broad compatibility (REST/OpenAPI); internal TS monorepos benefit from tRPC with end-to-end types; GraphQL excels for complex front-ends with evolving queries.

Quick Start

Ask me to recommend an API style for a new project based on its requirements.

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 project?

REST suits public-facing APIs needing broad compatibility with OpenAPI. GraphQL excels for complex front-ends with evolving queries, while tRPC delivers end-to-end types for internal TypeScript monorepos. Your API style choice depends on data needs and client diversity.

When should I use GraphQL over REST for API design?

Use GraphQL over REST for API design when your front-ends require complex, evolving queries and flexible data fetching. REST remains preferable for public-facing APIs requiring broad compatibility, standardized response formats, and straightforward versioning strategies.

Does tRPC work well for public-facing API design?

tRPC works best for internal TypeScript monorepos where end-to-end type safety is prioritized over broad client compatibility. For public-facing API design, REST with OpenAPI is recommended to ensure diverse clients can easily consume your endpoints.

What is the best way to version a REST API?

The best way to version a REST API involves aligning the strategy with your maintenance goals and existing tech stack. Effective API design specifies contexts for versioning, response formats, and pagination to ensure backward compatibility and smooth evolution.

What are common pitfalls when implementing API pagination?

Common pitfalls when implementing API pagination include ignoring client capabilities and misaligning with your chosen API style. Proper API design delivers implementation-ready guidance, validating pagination approaches against potential edge cases and maintenance constraints.