add-trpc-endpoint

Scaffold tRPC API endpoints with Zod validation and router integration.

Updated Dec 5, 2025
One-click install
npx skills add https://github.com/betterbrand/dealflow-network --skill add-trpc-endpoint
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-trpc-endpoint
Source: https://github.com/betterbrand/dealflow-network/tree/main/.claude/skills/add-trpc-endpoint
Command: npx skills add https://github.com/betterbrand/dealflow-network --skill add-trpc-endpoint

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Accelerates the creation of new tRPC endpoints with validated inputs, standardized error handling, and router integration.

Core Features & Use Cases

  • Zod Validation: Input schemas ensure typed, validated inputs.
  • Procedure Scaffolding: Create public/protected/admin endpoints with TRPCError-based errors.
  • Router Integration: Add to appRouter and provide client usage patterns.

Quick Start

Add a new endpoint following the template, update server/routers.ts, and test with client hooks.

Frequently Asked Questions about add-trpc-endpoint

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

FAQPage Schema
How do I scaffold tRPC endpoints with input validation?

Scaffold tRPC endpoints using Zod schemas for input validation, which ensures typed and validated inputs. The Skill automates creation of public, protected, and admin procedures with standardized error handling and router integration for the dealflow-network project.

Can I use tRPC with authentication middleware?

Yes. The Skill scaffolds protected and admin procedures with middleware setup, applying project-defined authorization patterns. It handles both public endpoints and authentication-gated procedures with TRPCError-based error handling.

How do I add new tRPC endpoints to an existing router?

Add a new endpoint following the provided template, update server/routers.ts to integrate it, and use the generated client hooks for testing. The Skill automates wiring to your database functions and includes client usage patterns.

What's included when creating a tRPC CRUD operation?

CRUD scaffolding includes Zod input schemas for validation, procedure setup with authorization rules, database function wiring, error handling patterns, and client hook templates—all aligned to dealflow-network project conventions.

Do I need to write database integration code manually?

No. The Skill automates database function wiring during endpoint scaffolding, connecting your procedures to database operations while maintaining input validation and error handling standards.