What problem does it solve? Building APIs in TypeScript full-stack apps often means duplicating type definitions between server and client, writing REST boilerplate, or maintaining GraphQL schemas. This Skill guides you through creating tRPC APIs where TypeScript types flow automatically from server router to client, giving you autocomplete, compile-time validation, and refactoring safety without code generation. ## Core Features & Use Cases - Router and Procedure Design: Create queries, mutations, and subscriptions with Zod-validated inputs, organized into domain routers merged into a root AppRouter. - Auth Middleware and Context: Build protected procedures with middleware that enforces authentication and narrows session types, using separate context factories for App Router handlers and Server Components. - React Query Client Integration: Set up the tRPC React client with httpBatchLink, cache invalidation after mutations, and WebSocket subscriptions for real-time features. - Use Case: You are building a Next.js app and need a posts API. Use this Skill to scaffold the server router with cursor pagination, protect mutations behind auth middleware, and consume everything from React components with fully typed useQuery and useMutation hooks. ## Quick Start Set up a tRPC API in my Next.js app with a protected posts router, Zod input validation, and a React Query client provider.