trpc-router-generator

Generate tRPC router files with Zod validation and CRUD procedures.

Updated Dec 17, 2025
One-click install
npx skills add https://github.com/ehtbanton/ClaudeSkillsRepo --skill trpc-router-generator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: trpc-router-generator
Source: https://github.com/ehtbanton/ClaudeSkillsRepo/tree/main/trpc-router-generator
Command: npx skills add https://github.com/ehtbanton/ClaudeSkillsRepo --skill trpc-router-generator

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the creation of tRPC router files, including type-safe procedures and input validation, streamlining backend API development.

Core Features & Use Cases

  • tRPC Router Generation: Creates complete tRPC router files (*.router.ts).
  • Procedure Creation: Includes standard CRUD procedures (list, byId, create, update, delete).
  • Input Validation: Integrates Zod for robust input schema validation.
  • Use Case: Quickly scaffold a new tRPC API endpoint for managing user data, complete with all necessary validation and procedures.

Quick Start

Generate a tRPC router for managing products.

Frequently Asked Questions about trpc-router-generator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate a tRPC router with type-safe procedures and Zod validation?

To generate a tRPC router with type-safe procedures, trigger the Skill using commands like "create trpc router". It outputs complete router files with standard CRUD procedures and integrated Zod input validation schemas.

Can I automatically scaffold CRUD procedures for a tRPC API?

Yes, you can automatically scaffold CRUD procedures for a tRPC API. The generator creates standard list, byId, create, update, and delete procedures within the generated router file, streamlining backend API development.

Does the tRPC router generator support tRPC v11 and Zod schemas?

The tRPC router generator supports tRPC v11 and Zod for defining schemas. It integrates Zod to provide robust input validation and type safety directly within your API procedures.

What is the best way to structure a typesafe API using tRPC and TypeScript?

The best way to structure a typesafe API using tRPC and TypeScript is to generate dedicated router files. This Skill creates organized *.router.ts files containing Zod validation and type-safe procedures for managing resources like user data.

How do I add input validation to tRPC procedures using Zod?

You add input validation to tRPC procedures by integrating Zod schemas directly into the generated code. The Skill automates this by defining robust input schemas for each standard CRUD procedure in the router file.

Are there limitations when generating tRPC routers for complex API endpoints?

The generated tRPC routers focus on standard CRUD procedures (list, byId, create, update, delete) and Zod validation. Custom complex business logic or non-standard procedures may require manual implementation after the initial router scaffolding.