home / skills / ehtbanton / claudeskillsrepo / trpc-router-generator
This skill generates complete trpc router files with type-safe procedures and Zod validation for rapid, reliable API development.
npx playbooks add skill ehtbanton/claudeskillsrepo --skill trpc-router-generatorReview the files below or copy the command above to add this skill to your agents.
---
name: trpc-router-generator
description: Generate tRPC router files with procedures and validation. Triggers on "create trpc router", "generate trpc procedure", "trpc api", "typesafe api".
---
# tRPC Router Generator
Generate tRPC routers with type-safe procedures and Zod validation.
## Output Requirements
**File Output:** `*.router.ts` tRPC router files
**Format:** Valid tRPC v11
**Standards:** tRPC 11.x, Zod
## When Invoked
Immediately generate a complete tRPC router.
## Example Invocations
**Prompt:** "Create tRPC router for users"
**Output:** Complete `users.router.ts` with CRUD procedures.
This skill generates complete tRPC v11 router files with type-safe procedures and Zod validation. It produces ready-to-save *.router.ts files following tRPC 11.x patterns and idiomatic TypeScript. The goal is to speed up API scaffolding with correct types, input validation, and common CRUD patterns.
On trigger phrases like "create trpc router" or "trpc api", the skill emits a fully-formed router file that exports a tRPC router and its procedures. Each procedure includes Zod schemas for inputs and outputs, example contexts, and typed resolver stubs. The output adheres to tRPC v11 and Zod conventions so it can be dropped into a TypeScript project immediately.
Which tRPC and validation versions does this target?
It targets tRPC v11 and uses Zod for runtime validation and type inference.
Does the generator write files to disk?
It outputs the complete file contents for a *.router.ts file; integrate with your tooling to write to disk as needed.