Skip to main content

api-service-layer

Stars0
Forks0
UpdatedJune 21, 2026 at 05:04

Use when designing or implementing the API layer of a fullstack TypeScript application. Covers the thin-transport pattern (tRPC or ORPC as HTTP transport only), request-scoped context injection, service classes as the business logic layer, and the provider/adapter pattern for external integrations. Applies regardless of whether the HTTP transport is tRPC, ORPC, Express, Fastify, or Hono — the service layer and provider pattern are transport-agnostic. Trigger when the user asks about where to put business logic, how to structure API routes, how to inject context (auth session, db, services), or how to abstract external dependencies.

Installation

Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.

File Explorer
6 files
SKILL.md
readonly