josechifflet-trpc
Installation
SKILL.md
tRPC v11 Patterns for Next.js Applications
Purpose
Provide comprehensive tRPC v11 implementation patterns for Next.js 16 applications emphasizing thin routers with command-query separation. Focus on RBAC enforcement, central error mapping, type safety through inference, and proper client/server boundaries.
When To Use This Skill
Router & Procedure Creation:
- Create new tRPC routers for domain entities
- Implement query procedures for data fetching
- Implement mutation procedures for state changes
- Set up public vs protected (RBAC) procedures
Validation & Type Safety:
- Define Zod input schemas with .strict() validation
- Define Zod output schemas for type inference
- Export RouterInputs/RouterOutputs types for UI
- Implement type-safe server callers for RSC