tRPC skills for agents

tRPC skills

24 skills inside the tRPC packages: server, adapters, client, Next.js, TanStack React Query and OpenAPI load into the agent by task via TanStack Intent

  • 40,742 ★ on the repository
  • Last commit
  • MIT
SkillOfficial

Minimal access

Why this level

  • The skills only describe techniques, but the agent then creates and edits server and client code, including authentication
  • The `npx @tanstack/intent@latest` command downloads and runs a package from npm
All reasons and checks

trpc/trpc

Install

Manual install

npx @tanstack/intent@latest install

The command from the AI Agents section: it prints a prompt the agent follows to configure itself for the tRPC skills and those of other installed packages.

Access and checks

How we review

Minimal accessThe tool runs nothing and makes no network calls.

  • The skills only describe techniques, but the agent then creates and edits server and client code, including authentication
  • The `npx @tanstack/intent@latest` command downloads and runs a package from npm

This is third-party code. Review the repository files before installing.

What it does

The tRPC repository holds 24 SKILL.md files, one per topic, spread across the server, client, next, openapi and tanstack-react-query packages. The skills are not installed with a catalog command of their own but through TanStack Intent: `npx @tanstack/intent@latest install` prints a prompt that the agent follows to configure itself for the tRPC skills and those of other installed packages. When a task matches a skill's topic, its SKILL.md is loaded into context. Most skills cover the server. The server-setup skill shows `initTRPC.create()`, routers, procedures, context, the `AppRouter` type, merging and lazy loading of routers. Separate skills describe `auth`, `middlewares`, `validators`, `caching`, `error-handling`, `subscriptions`, non-standard content types and server-side calls. Five adapter skills cover running it: standalone, Express, Fastify, Fetch and AWS Lambda. On the client side the `client-setup`, `links` and `superjson` skills set up the client, the link chain and serialization, and two Next.js skills are split into App Router and Pages Router. TanStack React Query has `react-query-setup` and the `react-query-classic-migration` skill, which runs `npx @trpc/upgrade` for an automated hook replacement and then has the agent finish the rest by hand, such as the provider and query invalidation. The `openapi` skill belongs to the tRPC package for working with OpenAPI descriptions. The header of each skill states its type (core or lifecycle), the library version 11.16.0, dependencies on other skills and a list of sources in the docs and code.

Who it is for. For TypeScript developers who build APIs on tRPC with Next.js, Express or Fastify and want the agent to write code for the current library version instead of from memory.

Good fit when

  • You need to stand up a tRPC server from scratch: routers, procedures, context and the AppRouter type for the client
  • A project is moving from the classic `@trpc/react-query` hooks to `@trpc/tanstack-react-query` and needs a step-by-step migration after the automated replacement
  • You must connect tRPC to Express, Fastify, AWS Lambda or a Fetch API handler
  • You need subscriptions, permission checks through middleware or caching of procedure responses
  • The agent writes a Next.js client and mixes up App Router and Pages Router

Not a fit when

  • The project has no tRPC: the skills describe only its packages and know nothing about other ways to build an API
  • You want one-command installation into a given agent: with TanStack Intent the agent configures itself from a printed prompt rather than receiving files automatically
  • The task concerns TanStack Query alone, without tRPC: the skills describe it only in pairing with tRPC
  • The tRPC version in the project is old: the skills are written for library 11.16.0

Example request

Set up a tRPC server on Express with Zod input validation and authentication in middleware, and export the AppRouter type for a Next.js client

Limitations

  • The skills ship with the library and update with its versions: after `npm update @trpc/server` new texts arrive. The version they were written for is stated in the headers as 11.16.0.
  • `@tanstack/intent` is required: the `bin/intent.js` file in the packages imports it and reports that the package is missing otherwise. It can also be run through `npx`.
  • The `stale` command checks whether skills point to outdated places in the documentation, and `meta feedback-collection` prints a prompt for reporting problems in a skill. Both steps are optional.
  • The automated hook replacement with `npx @trpc/upgrade` does not cover every case: the migration text calls it a work in progress and asks you to typecheck after running it.
  • MIT license.

How to disable. Remove from the agent's settings the skill connection that TanStack Intent added, and it stops loading them by topic. The SKILL.md files themselves sit inside the tRPC packages in `node_modules` and disappear when the packages are removed.

FAQ

How do I connect the tRPC skills to Claude Code, Cursor or Windsurf?

Run `npx @tanstack/intent@latest install` in the project root. The command prints a prompt and the agent configures access to the tRPC skills and those of other project packages itself. The authors name Claude Code, Cursor and Windsurf, with others implied.

How many skills does tRPC have and on what topics?

There are 24 in all: 16 in the server package (router, setup, five adapters, auth, validators, caching, errors, subscriptions and more), 3 in client, 2 in next, 2 in tanstack-react-query and 1 in openapi.

How do the skills know they are out of date?

They are versioned with the library: updating `@trpc/server` brings a new edition. `npx @tanstack/intent@latest stale` checks whether the skills point to outdated places in the documentation.

How do I move a project from `@trpc/react-query` to the new client?

The `react-query-classic-migration` skill has you run `npx @trpc/upgrade` and choose the hook replacement with `queryOptions` and `mutationOptions` plus the provider move. Then you install `@trpc/tanstack-react-query`, replace `createTRPCReact` with `createTRPCContext` and check the types. Both packages can stay in the project together, so the move goes in parts.

How do I report a problem in a skill?

Run `npx @tanstack/intent@latest meta feedback-collection`. The command prints a prompt for the agent to collect structured feedback on gaps, errors and improvements.

Discussion

No questions or reviews yet.

Skills

Scalar API Reference skill for agents

Scalar API Reference skill

Official

A skill that adds a Scalar reference to an app from its OpenAPI description: integrations, authentication, themes, migration from Swagger UI

SkillMinimal access16.3KRepository stars

The official Payload CMS skill shipped inside the package: collections, fields, hooks, access control, queries and database adapters

SkillMinimal access45.6KRepository stars

The official Prisma 8 skill installed from your project's packages: data contract, migrations, queries and version upgrades

SkillExtended access47.7KRepository stars
Editors’ pick

The official FastAPI skill, bundled with the package, teaching agents to write code for the installed version

SkillMinimal access104.3KRepository stars
Editors’ pick

Supabase's official skills: help an agent work with the database, Auth, Edge Functions and Postgres best practices

SkillMinimal access2.9KRepository stars

README in short

The tRPC description shows end-to-end type safety for TypeScript APIs and starter projects with Next.js and Prisma. The AI Agents section gives the single command for skills, and a separate documentation page on skills covers installation, updating, stale-reference checks and feedback. The packages hold skills folders and bin/intent.js files, and the repository itself carries Cursor rules meant for work on the tRPC code.

README badge

Original SKILL.md

---
name: server-setup
description: >
  Initialize tRPC with initTRPC.create(), define routers with t.router(),
  create procedures with .query()/.mutation()/.subscription(), configure context
  with createContext(), export AppRouter type, merge routers with t.mergeRouters(),
  lazy-load routers with lazy().
type: core
library: trpc
library_version: '11.16.0'
requires: []
---

# tRPC -- Server Setup

## Setup

```ts
// server/trpc.ts
import { initTRPC } from '@trpc/server';

const t = initTRPC.create();

export const router = t.router;
export const publicProcedure = t.procedure;
```

Report a problem

Foxx AItRPC skills for agents
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.