web-data-fetching-trpc

web-data-fetching-trpc is a skill for Claude Code, Codex from agents-inc/skills. It costs 34 tokens per session (2,652 once invoked), scanned A, original, MIT.

A guide to tRPC, a system for calling server procedures from a client while sharing TypeScript types between them. It also covers Zod, a library for validating input data, and authentication middleware.

In plain words
What is it for?
Use it to set up typed routers and clients, validate procedure inputs, handle errors, add authentication middleware, and connect React applications.
Why use it?
It reduces mismatches between client and server data shapes and sets rules for validating input and reporting API errors.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to set up typed routers and clients, validate procedure inputs, handle errors, add authentication middleware, and connect React applications.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/agents-inc/skills/web-data-fetching-trpc
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add agents-inc/skills --skill web-data-fetching-trpc
Clone the repo
git clone --depth 1 https://github.com/agents-inc/skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for web-data-fetching-trpc

README.md
[![agentmods](https://agentmods.dev/badge/skills/agents-inc/skills/web-data-fetching-trpc.svg)](https://agentmods.dev/skills/agents-inc/skills/web-data-fetching-trpc)
Your own site
<a href="https://agentmods.dev/skills/agents-inc/skills/web-data-fetching-trpc"><img src="https://agentmods.dev/badge/skills/agents-inc/skills/web-data-fetching-trpc.svg" alt="Measured on agentmods" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,652 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 51
    Skill allows unbounded resource consumption (API calls, storage, compute). Without rate limits or quotas, a compromised or misbehaving agent can cause denial-of-service or cost overruns.
    Fix: Set explicit rate limits, timeouts, and resource quotas for API calls, file operations, and compute. Implement circuit breakers for runaway loops.
  • medium Rogue Agent · line 334
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00034 $0.02652
Opus 5 $0.00017 $0.01326
Sonnet 5 $0.00007 $0.00530
Haiku 4.5 $0.00003 $0.00265

Measured today against content hash 41ccf890f965, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

web-data-fetching-trpc scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

src/skills/web-data-fetching-trpc/SKILL.md · 308 lines

How it starts

The opening of the file, as written. The whole thing — 308 lines — stays where its author put it; the contents beside it link to each section on GitHub.

tRPC Patterns

Quick Guide: tRPC carries types from server to client through one exported type rather than through a generated schema, so export type AppRouter = typeof appRouter is the whole bridge and everything downstream fails without it. Procedures take a validated input and return a value; TRPCError codes are what become HTTP statuses; middleware narrows the context type so an authenticated procedure's ctx.user is non-nullable. In v11 the transformer moved inside the link, subscriptions are async generators, and @trpc/tanstack-react-query is the current React integration.

Detailed Resources:


Which path applies

  • @trpc/tanstack-react-query — the current integration. createTRPCContext yields a useTRPC hook, and each procedure exposes queryOptions(), mutationOptions(), infiniteQueryOptions() and queryKey() that go straight into the standard query hooks. Pattern 5.
  • @trpc/react-query — the classic integration, still supported in v11. Procedures carry their own trpc.x.useQuery() hooks instead, and a cache key comes from getQueryKey(trpc.x) rather than from a queryKey() on the procedure. Migrate when convenient; the two can coexist.

<critical_requirements>

Read the full file on GitHub · 308 lines

Files

What ships with it

8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today Changed · -59 lines · +13 tokens per session 41ccf890f965
  2. 2d ago First seen · 367 lines · 21 tokens per session scan A 969319ae7adc

Subscribe to this mod's changes

web-data-fetching-trpc is a skill published in the GitHub repository agents-inc/skills (24 stars, last pushed today), licensed MIT. It adds 34 tokens to every session and 2,652 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.

Related

Other skills, from other repositories

node-modern

Use this skill when writing, reviewing, or refactoring Node.js >= 22 TypeScript code in WrongStack. Triggers: ESM imports, fetch usage, AbortSignal, node: protocol, Web Streams, or any async patterns.

WrongStack/WrongStack · 52 tokens

pinme-email

Use this skill when a PinMe project (Worker TypeScript) needs to integrate email sending (sendemail). Guides AI to generate correct Worker TS code.

glitternetwork/pinme · 35 tokens

typescript-strict

Use this skill when writing or reviewing TypeScript code with strict mode in WrongStack. Triggers: user mentions "TypeScript", "strict", "type error", "type safety", "narrowing", "branded type", "discriminated union", "noUncheckedIndexedAccess".

WrongStack/WrongStack · 63 tokens

nestjs

Use when building or structuring a NestJS backend — feature modules, providers and DI wiring, provider scopes and request-lifecycle order, where to bind guards/pipes/interceptors/filters, and testing with Test.createTestingModule. NOT a bare Express/Fastify service with no DI (that is nodejs), NOT framework-agnostic…

ericrisco/rsc-harness · 81 tokens

nodejs-backend

Node.js backend patterns: layered architecture, TypeScript, validation, error handling, security, observability, logging, metrics, deployment. Use when building REST APIs, REST endpoints, middleware, Express/Fastify/Hono/NestJS/Koa servers, tRPC procedures, Bun servers, or server-side TypeScript.

iliaal/ai-skills · 69 tokens

bun-knowledge-patch

Use this skill when working on Bun applications, packages, builds, tests, servers, or Node.js compatibility. Check the relevant reference before relying on older Bun behavior or translating Node-oriented code.

Nevaberry/nevaberry-plugins · 8 tokens