Skip to content
tRPC

Partners

Agent Skills

Set up and use TanStack Intent to provide AI agent skills for tRPC

On this page

tRPC ships TanStack Intent skills to help AI coding agents work with tRPC. When your agent works on a task that matches a skill, it loads the skill's SKILL.md into context.

The skills ship inside @trpc/server, @trpc/client, @trpc/tanstack-react-query, @trpc/next and @trpc/openapi, so they're already in your node_modules.

Setup

1. Run install

The install command adds skill-loading guidance to your agent's config file (AGENTS.md, CLAUDE.md, etc.):

npx @tanstack/intent@latest install

It covers the skills shipped in tRPC and your other installed packages.

2. Use skills in your workflow

When your agent works on a task that matches a skill, it loads the corresponding SKILL.md into context to guide implementation.

To see which skills are available:

npx @tanstack/intent@latest list

To load one yourself, for example the server auth skill:

npx @tanstack/intent@latest load @trpc/server#auth

3. Keep skills up-to-date

Skills version with library releases. When you update tRPC (e.g. npm update @trpc/server), you get the skills that match your installed version.

Skills by task

Each skill is generated from a page of these docs. Load one with npx @tanstack/intent@latest load <skill>, for example npx @tanstack/intent@latest load @trpc/server#server-setup.

Build the API

TaskSkill
Initialize tRPC, define routers, procedures and context, export AppRouter@trpc/server#server-setup
Add middleware and reusable base procedures@trpc/server#middlewares
Validate inputs and outputs with Zod or another library@trpc/server#validators
Throw, format and handle errors@trpc/server#error-handling
Authenticate users and protect procedures@trpc/server#auth
Call procedures from server code or tests@trpc/server#server-side-calls
Set HTTP cache headers on responses@trpc/server#caching
Accept FormData, files and binary inputs@trpc/server#non-json-content-types
Stream real-time updates over SSE or WebSockets@trpc/server#subscriptions
Send Date, Map, Set and other rich types with superjson@trpc/client#superjson
Split the API across several services@trpc/server#service-oriented-architecture

Serve the API

TaskSkill
Node.js HTTP server, the simplest setup@trpc/server#adapter-standalone
Express@trpc/server#adapter-express
Fastify@trpc/server#adapter-fastify
AWS Lambda behind API Gateway or a Function URL@trpc/server#adapter-aws-lambda
Fetch API and edge runtimes: Cloudflare Workers, Deno, Vercel Edge, Astro, Remix@trpc/server#adapter-fetch

Call the API

TaskSkill
Create a TypeScript client, infer types, handle errors@trpc/client#client-setup
Configure links: batching, streaming, splitting, WebSockets, SSE, retries@trpc/client#links
Use tRPC with TanStack React Query@trpc/tanstack-react-query#react-query-setup
Migrate from the classic @trpc/react-query client@trpc/tanstack-react-query#react-query-classic-migration
Next.js App Router, including server components@trpc/next#nextjs-app-router
Next.js Pages Router, SSR and SSG@trpc/next#nextjs-pages-router
Generate an OpenAPI spec and a REST client@trpc/openapi#openapi

Learn more

For full documentation on TanStack Intent, see the Quick Start for Consumers guide.