Expertise·API Development

tRPC Router

Entry point for all tRPC skills: decision-tree routing by task across initTRPC.create(), t.router(), t.procedure, createTRPCClient…

You say
Buy it · $39 Read it before you buy $39 Written by trpc · unverified publisher
Context cost
1.1k tokensestimated from the bundle, loaded when it triggers
Bundle
1 file · 4.2 kBtext throughout, nothing executable
Licence
MITpaid listing
Last change
no release on file
Servers it uses
Noneruns standalone

What it does

Entry point for all tRPC skills. Decision tree routing by task: initTRPC.create(), t.router(), t.procedure, createTRPCClient, adapters, subscriptions, React Query, Next.js, links, middleware, validators, error handling, caching, FormData.

Installed, it changes the agent in these ways.

What this skill changes about the agent is not written down here yet. The listing was collected from its source, and the description is in its own SKILL.md.

Expertise

Domain judgement the base model does not have.

trpctypescriptrpcapi
Filed under

API Development

The skill itself

This is the whole product. A skill is instructions the model reads, so there is nothing behind the listing you cannot see first — the front matter loads with every session, and the body below it loads when the skill triggers.

SKILL.md4.2 kB · 152 lines
--- name: trpc-router description: > Entry point for all tRPC skills. Decision tree routing by task: initTRPC.create(), t.router(), t.procedure, createTRPCClient, adapters, subscriptions, React Query, Next.js, links, middleware, validators, error handling, caching, FormData. type: core library: trpc library_version: '11.16.0' requires: [] sources: - 'trpc/trpc:www/docs/main/introduction.mdx' - 'trpc/trpc:www/docs/main/quickstart.mdx' ---
16# tRPC -- Skill Router
17
18## Decision Tree
19
20### What are you trying to do?
21
22#### Define a tRPC backend (server)
23
24- **Initialize tRPC, define routers, procedures, context, export AppRouter**
25 -> Load skill: server-setup
26
27- **Add middleware (.use), auth guards, logging, base procedures**
28 -> Load skill: middlewares
29
30- **Add input/output validation with Zod or other libraries**
31 -> Load skill: validators
32
33- **Throw typed errors, format errors for clients, global error handling**
34 -> Load skill: error-handling
35
36- **Call procedures from server code, write integration tests**
37 -> Load skill: server-side-calls
38
39- **Set Cache-Control headers on query responses (CDN, browser caching)**
40 -> Load skill: caching
41
42- **Accept FormData, File, Blob, or binary uploads in mutations**
43 -> Load skill: non-json-content-types
44
45- **Set up real-time subscriptions (SSE or WebSocket)**
46 -> Load skill: subscriptions
47
48#### Host the tRPC API (adapters)
49
50- **Node.js built-in HTTP server (simplest, local dev)**
51 -> Load skill: adapter-standalone
52
53- **Express middleware**
54 -> Load skill: adapter-express
55
56- **Fastify plugin**
57 -> Load skill: adapter-fastify
58
59- **AWS Lambda (API Gateway v1/v2, Function URLs)**
60 -> Load skill: adapter-aws-lambda
61
62- **Fetch API / Edge (Cloudflare Workers, Deno, Vercel Edge, Astro, Remix)**
63 -> Load skill: adapter-fetch
64
65#### Consume the tRPC API (client)
66
67- **Create a vanilla TypeScript client, configure links, headers, types**
68 -> Load skill: client-setup
69
70- **Configure link chain (batching, streaming, splitting, WebSocket, SSE)**
71 -> Load skill: links
72
73- **Use SuperJSON transformer for Date, Map, Set, BigInt**
74 -> Load skill: superjson
75
76#### Use tRPC with a framework
77
78- **React with TanStack Query (useQuery, useMutation, queryOptions)**
79 -> Load skill: react-query-setup
80
81- **Next.js App Router (RSC, server components, HydrateClient)**
82 -> Load skill: nextjs-app-router
83
84- **Next.js Pages Router (withTRPC, SSR, SSG helpers)**
85 -> Load skill: nextjs-pages-router
86
87#### Advanced patterns
88
89- **Generate OpenAPI spec, REST client from tRPC router**
90 -> Load skill: openapi
91
92- **Multi-service gateway, custom routing links, SOA**
93 -> Load skill: service-oriented-architecture
94
95- **Auth middleware + client headers + subscription auth**
96 -> Load skill: auth
97
98## Quick Reference: Minimal Working App
99
100```ts
101// server/trpc.ts
102import { initTRPC } from '@trpc/server';
103
104const t = initTRPC.create();
105
106export const router = t.router;
107export const publicProcedure = t.procedure;
108```
109
110```ts
111// server/appRouter.ts
112import { z } from 'zod';
113import { publicProcedure, router } from './trpc';
114
115export const appRouter = router({
116 hello: publicProcedure
117 .input(z.object({ name: z.string() }))
118 .query(({ input }) => ({ greeting: Hello ${input.name} })),
119});
120
121export type AppRouter = typeof appRouter;
122```
123
124```ts
125// server/index.ts
126import { createHTTPServer } from '@trpc/server/adapters/standalone';
127import { appRouter } from './appRouter';
128
129const server = createHTTPServer({ router: appRouter });
130server.listen(3000);
131```
132
133```ts
134// client/index.ts
135import { createTRPCClient, httpBatchLink } from '@trpc/client';
136import type { AppRouter } from '../server/appRouter';
137
138const trpc = createTRPCClient<AppRouter>({
139 links: [httpBatchLink({ url: 'http://localhost:3000' })],
140});
141
142const result = await trpc.hello.query({ name: 'World' });
143```
144
145## See Also
146
147- server-setup -- full server initialization details
148- client-setup -- full client configuration
149- adapter-standalone -- simplest adapter for getting started
150- react-query-setup -- React integration
151- nextjs-app-router -- Next.js App Router integration
152
In the file
SKILL.md532 words
Files1
LicenceMIT
Why you can read it

Nothing in a skill executes. The client loads the text and the model follows it, so a skill can be audited the way a runbook is — by reading it.

What it costs in context

Skills are not billed by the call. They are paid for in context: every token the instructions occupy is a token your code, your diff and your conversation cannot use. Here is what this one takes and when it takes it.

≈110
always loaded
The name and description, so the model knows the skill exists and when to reach for it.
940
on trigger
The instruction body, read only when the skill fires.
0.53%
of a 200k window
Ten skills this size would take about 5% of the window before you open a file.
050k100k150k200k context window

1.1k tokens, estimated from the bundle at four bytes to the token, held for the rest of the session once it triggers. Small enough to keep loaded permanently without thinking about it.

Servers bill, skills cost

A server charges by the month. A skill charges once per session, in context, and then keeps charging it for as long as the session lives.

Before and after

The same question, put to the same model twice: once as it comes, and once with these instructions loaded.

No worked example has been published for this skill yet.

Adoption
Installsnone yet
Ratingno reviews yet

The procedure it runs

The procedure has not been published here. It is in the skill’s own SKILL.md, which its author has not sent to the marketplace yet.

Prose, not code

These steps are written for a model to follow, not executed by a runtime. It can still be told to skip one, and it will say so when it does.

Servers it uses

None. This skill calls no MCP servers at all.

Everything it needs is in the instructions, so it works in a project with nothing connected — the model reads the file and changes how it works with what it can already reach.

It writes no files and reaches no network. All it changes is how the model reasons and writes.

What it asks for
Writes filesno
Network accessno

Read from the allowed-tools line of this skill’s own SKILL.md. A skill grants no permissions of its own — it can only ask for tools your client already has.

What it will not do

Every skill is narrow, and the useful ones say where they stop. These are the jobs this one is the wrong tool for.

What this skill is not for has not been published here. Nothing is implied by that: it is a section the author has not filled in.

What is in the bundle

1 file, 4.2 kB on disk. A bundle is text throughout: the instructions the model reads, plus the templates it fills in.

  • SKILL.md4.2 kB
What is not in it

No dependencies and nothing executable: a skill is text the agent reads, so the bundle is 1 file you can review in full before installing. The MIT licence covers the templates and examples as well as the instructions.

Install

Installing copies the bundle into your project. Nothing runs at install time — the files sit on disk until the model reads them.

$39 once
tRPC Router · MIT · trpc
one-time
Price$39 once
LicenceMIT — the author’s, unchanged by this purchase
Paid throughStripe, once, on the card you add at the checkout
Keeps workingfor good — the files are yours once they are on disk
Updatesevery update its author ships, delivered through this account

You can read the whole bundle before paying — the SKILL.md above is the product, not a preview of it. What the money buys is the delivery: the folder packaged and handed to your machine by key, every update its author ships, and our support if it does not do what this listing says. The terms of use are MIT, set by the author and unchanged by buying it here.

Payment runs through Stripe, on a page like this one rather than a redirect. Once there is an account it joins the same mcprush invoice as everything else you run, so there is never a second card to enter.

Which clients pick it up on their own

A skill is a folder of text. A client with a skills folder reads it without being told; everywhere else the same text works, it is just handed to the model rather than found.

Claude Code.claude/skills/
Claude Desktop
ChatGPT
Cursor.cursor/skills/
VS Code.github/skills/
Codex CLI.agents/skills/
Gemini CLI.gemini/skills/
Grok.grok/skills/
Zed.agents/skills/
Windsurf.windsurf/skills/
Agent SDK.claude/skills/
HTTP / API
This release
Versionnot versioned
Publishedno release date on file
Price$39
Referencetrpc/trpc-router

Versions

Its author publishes no version number, so there is nothing here to pin to: what you install is the folder as it stands today. Instructions change more often than APIs do — a skill can be rewritten entirely without anything it depends on moving.

v
  • No earlier releases have been published to the marketplace.
Pinning

Nothing to pin to: this skill carries no version number of its own. What you install is what the folder holds on the day you install it.

Reviews

no reviews yet · no installs yet

Nobody has reviewed this skill yet. The rating is the mean of the reviews written here, so there is none until somebody writes the first.

Who can post

Only accounts that have had the skill installed for fourteen days, so a review is written after living with it rather than after reading it. Publishers may reply once.

Publisher
Servers0