designing-resilient-apis

Guide REST, tRPC, and GraphQL API development with versioning, idempotency, RFC 7807 errors, and Zod validation.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/alexejluft/brudi --skill designing-resilient-apis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: designing-resilient-apis
Source: https://github.com/alexejluft/brudi/tree/main/skills/designing-resilient-apis
Command: npx skills add https://github.com/alexejluft/brudi --skill designing-resilient-apis

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents common API pitfalls like inconsistent errors, lack of idempotency, broken pagination, and unversioned contracts, ensuring your APIs are stable and predictable.

Core Features & Use Cases

  • API Versioning: Enforces clear versioning strategies (URL or header).
  • Idempotency: Ensures mutations can be retried safely without side effects.
  • Standardized Errors: Implements RFC 7807 for consistent error reporting.
  • Pagination: Guides implementation of cursor-based pagination for large datasets.
  • Input Validation: Promotes using tools like Zod at the API boundary.
  • Use Case: Reviewing a new /api/users endpoint to ensure it supports idempotency keys for POST requests and uses cursor-based pagination for the GET all users endpoint.

Quick Start

Ensure the API endpoint for creating a new user includes an idempotency key header and returns RFC 7807 compliant errors.

Frequently Asked Questions about designing-resilient-apis

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

FAQPage Schema
How do I implement idempotency keys for API mutations to prevent duplicate operations?

Idempotency keys ensure API mutations can be safely retried without causing duplicate side effects. This Skill guides you through enforcing idempotency key headers for POST requests and other mutations to maintain reliable state across network retries.

What is RFC 7807 error handling and how does it standardize API error responses?

RFC 7807 provides a standardized format for API error reporting, ensuring consistent error responses across your services. This Skill helps you implement RFC 7807 compliant errors to replace inconsistent error formats with predictable, machine-readable problem details.

How do I set up cursor-based pagination for large datasets in REST and GraphQL APIs?

Cursor-based pagination handles large datasets by using a data pointer rather than offsets. This Skill guides implementing cursor-based pagination for REST, tRPC, and GraphQL endpoints, ensuring stable data retrieval even when underlying records change.

Does this Skill support input validation with Zod at the API boundary?

Yes, API boundary validation is supported by promoting tools like Zod. This Skill ensures input validation is enforced at the API boundary, preventing malformed or invalid data from entering your internal service logic across REST, tRPC, and GraphQL.

What is the best way to version API contracts to avoid breaking existing clients?

API versioning prevents broken contracts by enforcing clear versioning strategies. This Skill guides you through implementing URL or header-based versioning for your endpoints, ensuring your APIs remain stable and predictable for existing clients.

When do I need to use idempotency keys for my API endpoints?

You need idempotency keys when handling API mutations that might be retried due to network failures. This Skill helps identify which endpoints require idempotency keys and guides their implementation to prevent duplicate side effects during retry scenarios.