api-patterns

Generate standardized API patterns for REST, GraphQL, tRPC, and WebSocket backends.

3|1|Updated Oct 23, 2025
One-click install
npx skills add https://github.com/vanman2024/dev-lifecycle-marketplace --skill api-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-patterns
Source: https://github.com/vanman2024/dev-lifecycle-marketplace/tree/main/.archive/old-numbered-plugins/02-develop/skills/api-patterns
Command: npx skills add https://github.com/vanman2024/dev-lifecycle-marketplace --skill api-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Designing and implementing backend APIs with proper validation, error handling, and documentation can be complex and inconsistent across different frameworks. This skill provides a library of proven API patterns to ensure consistency and quality.

Core Features & Use Cases

  • Multi-Protocol Support: Offers patterns for REST, GraphQL, and tRPC APIs, catering to diverse architectural needs and allowing flexibility in design.
  • Framework-Specific Guidance: Adapts patterns to popular backend frameworks like Node.js (Express, FastAPI), Python (Django, Flask), Go (Gin), and Rust (Actix), ensuring relevance and ease of integration.
  • Integrated Best Practices: Includes guidance on input sanitization, rate limiting, CORS, API versioning, and OpenAPI/Swagger documentation, promoting secure and well-documented APIs.
  • Standardized Error Handling: Provides patterns for consistent error responses and appropriate HTTP status codes, improving API usability and debugging.
  • Use Case: A backend team is developing a new microservice and needs to ensure its API adheres to best practices for security, validation, and error handling. This skill provides templates and guidance to quickly implement CRUD operations for a REST API, including request validation with Pydantic (for Python) and standardized error responses.

Quick Start

Generate a new REST API endpoint for user creation using the Python FastAPI framework, including Pydantic models for request validation and standardized error handling.

Frequently Asked Questions about api-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design a REST API with proper validation and error handling?

REST API design requires standardized patterns for request validation, error responses, and HTTP status codes. This skill provides templates for validation schemas, consistent error formatting, and security best practices across Node.js, Python, Go, and Rust frameworks to ensure APIs are robust and maintainable.

What's the best way to handle authentication and authorization in backend APIs?

Authentication and authorization patterns ensure secure API access. This skill covers proven approaches for token-based auth, permission validation, and security practices applicable to REST, GraphQL, and tRPC protocols, helping you implement secure endpoints across different backend frameworks.

Can I use the same API patterns for REST, GraphQL, and tRPC?

While each protocol has distinct structures, this skill adapts core patterns—validation, error handling, documentation, rate limiting, and CORS—across REST, GraphQL, and tRPC, allowing you to apply consistent security and design principles regardless of your chosen API protocol.

How do I document APIs with OpenAPI and Swagger?

API documentation through OpenAPI/Swagger specifications makes your endpoints discoverable and usable. This skill provides patterns for generating standardized documentation alongside your REST, GraphQL, or tRPC implementation, ensuring clear endpoint definitions and request/response schemas.

What input sanitization and rate limiting patterns should I implement?

Input sanitization prevents injection attacks while rate limiting protects against abuse. This skill includes patterns for validating and sanitizing incoming requests, implementing rate limiting policies, and configuring CORS for secure, production-ready API endpoints across supported frameworks.

Does this cover API versioning and microservice patterns?

API versioning ensures backward compatibility as your service evolves. This skill includes patterns for versioning strategies, standardized error responses, and observability practices essential for microservices, helping teams maintain consistency across distributed backend systems.