api-design

Design HTTP APIs with thin handlers, Zod validation, and ORPC server framework.

3|1|Updated Jan 4, 2026
One-click install
npx skills add https://github.com/jagreehal/jagreehal-claude-skills --skill api-design-jagreehal
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-design
Source: https://github.com/jagreehal/jagreehal-claude-skills/tree/main/skills/api-design
Command: npx skills add https://github.com/jagreehal/jagreehal-claude-skills --skill api-design-jagreehal

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill enables teams to build production-grade HTTP APIs by ensuring handlers stay thin and focused on translating HTTP to domain logic, while providing a consistent error envelope and operational patterns.

Core Features & Use Cases

  • Thin HTTP handlers that translate between HTTP and domain logic.
  • Consistent error envelopes, health/readiness endpoints, and standard middleware patterns (CORS, rate limiting, and idempotency).
  • Use cases include designing modular route factories with dependency injection and scalable API routers.

Quick Start

Install the api-design skill and create a simple route with a factory using DI, then add health and readiness endpoints to your API.

Frequently Asked Questions about api-design

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

FAQPage Schema
How do I design production-grade HTTP APIs with thin handlers?

Design production-grade HTTP APIs by composing thin handlers that map HTTP requests directly to domain logic. This approach enforces ORPC server framework usage, Zod input validation, and deterministic routing to keep boundaries clean.

What is the best way to handle error mapping in HTTP APIs?

Handle error mapping in HTTP APIs by implementing a standardized error envelope. This ensures consistent error responses across typical service boundaries while keeping your HTTP handlers focused on domain logic translation.

How do I set up routing with dependency injection for scalable API routers?

Set up routing with dependency injection by creating modular route factories. This pattern allows you to build scalable API routers where handlers receive their dependencies injected rather than instantiating them directly.

Can I use Zod for input validation in my HTTP API design?

Yes, you can use Zod for input validation in HTTP API design. The skill enforces Zod-based input validation to ensure deterministic routing and reliable mapping of HTTP requests to your underlying domain logic.

How do I add health and readiness endpoints to my API?

Add health and readiness endpoints to your API as part of standard operational patterns. These endpoints work alongside consistent error envelopes, CORS, and idempotency middleware to ensure service reliability.

Does this API design approach work with ORPC server framework?

Yes, this API design approach works with and enforces the ORPC server framework. It leverages ORPC for deterministic routing, Zod-based input validation, and consistent error mapping across typical service boundaries.