trpc-docs

Query a local tRPC documentation mirror for implementation guidance and code samples.

Updated Oct 22, 2025
One-click install
npx skills add https://github.com/Girolino/rs-news --skill trpc-docs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: trpc-docs
Source: https://github.com/Girolino/rs-news/tree/main/.claude/skills/trpc-docs
Command: npx skills add https://github.com/Girolino/rs-news --skill trpc-docs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill simplifies typesafe API development by providing instant access to tRPC documentation. It accelerates the creation of routers, procedures, and client integrations for Next.js and React, eliminating manual documentation searches and ensuring consistent, type-safe API interactions.

Core Features & Use Cases

  • Typesafe API Guidance: Quickly find patterns for defining tRPC routers, queries, mutations, and subscriptions with full type inference.
  • Next.js & React Integration: Get code examples for integrating tRPC with React Query and the Next.js App Router, streamlining frontend-backend communication.
  • Use Case: When setting up a new API endpoint, ask "How do I create a tRPC mutation with Zod input validation?" to receive a complete, typesafe example, allowing you to build robust APIs faster.

Quick Start

Show me how to create a tRPC mutation.

Frequently Asked Questions about trpc-docs

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

FAQPage Schema
How do I create a typesafe API with tRPC?

tRPC enables typesafe APIs by inferring types across your router and client automatically. Define routers with procedures (queries, mutations, subscriptions), then use the same TypeScript types on the frontend without manual schema duplication, eliminating runtime type mismatches.

How do I set up tRPC with Next.js App Router?

tRPC integrates with Next.js App Router by creating API routes that handle RPC calls, then initializing a typed client in your components. This enables full end-to-end type safety between your Next.js server and React frontend with minimal boilerplate.

Can I use tRPC with React Query?

Yes, tRPC includes built-in React Query integration through its client hooks. This combines tRPC's type safety with React Query's data-fetching, caching, and synchronization capabilities for seamless frontend state management.

How do I validate tRPC procedure inputs with Zod?

tRPC procedures accept Zod schemas as input validators. Define your schema, attach it to your procedure's input, and tRPC automatically validates incoming data and surfaces type errors on both server and client.

What's the best way to structure tRPC routers?

Organize routers by domain—group related queries and mutations into logical routers, then merge them into a root router. This keeps your API modular, maintainable, and typed end-to-end with clear separation of concerns.