tRPC - Build type-safe APIs with tRPC and TypeScript
Provides guidance for tRPC routers, procedures, middleware, context, clients, validation, and Next.js integration.
Tags
Updated: 2026-10-04Capabilities
Typical Inputs
Typical Outputs
What this skill does
- Set up tRPC routers
- Define typed procedures
- Validate inputs with Zod
- Configure request contexts
- Create authentication middleware
- Configure tRPC clients
- Integrate with Next.js
- Define queries and mutations
- Define real-time subscriptions
Inputs
- Router definitions
- Procedure inputs
- Context data
- Session information
- Database access
- Client endpoint configuration
Outputs
- tRPC router code
- Typed procedure code
- Validation schemas
- Middleware code
- Context definitions
- Client configuration
- Next.js route handlers
Requirements
- TypeScript project
- tRPC packages
- Zod package
- React Query for React integration
- Next.js for Next.js integration
