pproenca/dot-skills

trpc

Corrects the wrong defaults a model has for tRPC v11 (verified against 11.18.0).

ソースを見る

使い方

  1. インストールコマンドをコピーし、自分の環境へ導入する前にソースを確認します。
  2. 必要なツール、認証情報、対応環境を原文で確認します。
  3. 入力と成果物を指定し、出力を資料と照合します。
npx skills add https://github.com/pproenca/dot-skills --skill trpc

開始前の確認

  • 導入にはモデル契約、API枠、ファイルへのアクセス許可は含まれません。
  • スター数や導入数は活動の指標であり、独立した品質・安全性試験ではありません。
リポジトリの原文

見出し、例、コード、表、リンク、参照画像を含む原文を表示しています。

tRPC v11

The decisions tRPC forces and how to settle them, written so an agent applies them while writing or reviewing code. Every rule names the wrong default it corrects; there is no rule for what the model already gets right.

Pinned to tRPC v11, verified against `11.18.0` (2026-06-17). There is no v12 — but several APIs here carry @deprecated … will be removed in v12 and still ship today. Peers: typescript >=5.7.2, @tanstack/react-query ^5.80.3, react >=18.2.0.

When to Apply

Use this skill when:

  • Code imports initTRPC, createTRPCContext, createTRPCOptionsProxy, createTRPCReact, createTRPCClient, httpBatchLink, httpSubscriptionLink, splitLink, fetchRequestHandler, createCallerFactory, or TRPCError — or defines procedures with .input() / .output() / .use() / .query() / .mutation() / .subscription()
  • The user says "everything types as any", "invalidation isn't working", "contextMap[utilName] is not a function", "the transformer property moved", "414 / 413 on the dashboard", "subscriptions won't connect", "the prefetch isn't hydrating", or "it 404s every procedure"
  • Migrating a codebase from tRPC v10, or reviewing tRPC code written against v10-era examples — the highest-yield moment, because the recommended React client changed and stale code often still compiles
  • Adding the first subscription, the first file upload, or the first RSC prefetch to an existing router — each crosses into a surface where v11 replaced the v10 approach outright
  • Reviewing a batched client as the app grows, where the uncapped defaults turn into intermittent production failures

This skill is NOT for:

  • General TanStack Query semantics — cache lifetimes, retry, useMutation ergonomics (→ tanstack-query)
  • Authoring or migrating the Zod schemas used as validators (→ zod)
  • Next.js App Router routing, streaming, or caching beyond the tRPC handler (→ nextjs)
  • General TypeScript narrowing and generics (→ typescript)

Rule Categories

#CategoryPrefixCovers
1React Client Surfaceclient-Which integration, options factories, query keys, invalidation, subscribing
2v10 → v11 Driftmig-Renamed, removed, and lazily-materialized APIs; peer-version floors
3Router & Procedure Constructionproc-Instance identity, builder order, context narrowing, input merging
4Error & Validation Semanticserr-What surfaces, what leaks, which error class
5Links, Transport & Serializationlink-Link chain, batching limits, transformers, adapters, caching
6SSR, RSC & Server-Side Callsrsc-Prefetch and hydration, QueryClient lifetime, caller misuse
7Subscriptions & Streamingsub-Async generators over SSE, auth, keepalive, backlog races

Quick Reference

1. React Client Surface

2. v10 → v11 Drift

3. Router & Procedure Construction

4. Error & Validation Semantics

5. Links, Transport & Serialization

6. SSR, RSC & Server-Side Calls

7. Subscriptions & Streaming

How to Use

Read a reference file when its decision comes up. Each rule names the wrong default it corrects, then shows the canonical way — with an incorrect/correct contrast only where the wrong way is a real trap.

Two shortcuts worth taking first:

  • Reviewing or migrating existing tRPC code? Start with client- and mig-. Stale code frequently still compiles, so nothing points you at these; they are what everything else inherits.
  • Hardening something already working? The security-shaped rules are link-gate-cache-headers, rsc-query-client-per-request, err-set-isdev-explicitly, proc-input-before-use, and sub-keep-credentials-out-of-urls.

Related Skills

  • `tanstack-query` — The query layer tRPC's React client now delegates to; owns cache semantics this skill assumes
  • `zod` — Validator authoring and Zod 4 drift, including the .flatten() → z.treeifyError() change this skill only points at
  • `typescript` — General type-level work beyond tRPC's inference surface

タスクに関連する項目

同じリポジトリから

関連する Skills

すべての Skills
pproenca
コミュニティ

audio-voice-recovery

Audio forensics and voice recovery guidelines for CSI-level audio analysis. This skill should be used when recovering voice from low-quality or low-volume audio, enhancing degraded recordings, performing forensic audio analysis, or transcribing difficult audio. Triggers on tasks involving audio enhancement, noise reduction, voice isolation, forensic authentication, or audio transcription.

導入数
1
GitHub Stars
218
更新日
8月15日
pproenca
コミュニティ

msw

MSW (Mock Service Worker) best practices for API mocking in tests (formerly test-msw). This skill should be used when setting up MSW, writing request handlers, or mocking HTTP APIs. This skill does NOT cover general testing patterns (use test-vitest or test-tdd skills) or test methodology.

導入数
1
GitHub Stars
218
更新日
8月15日
pproenca
コミュニティ

zod

Zod schema validation best practices for type safety, parsing, and error handling. This skill should be used when defining z.object schemas, using z.string validations, safeParse, or z.infer. This skill does NOT cover React Hook Form integration patterns (use react-hook-form skill) or OpenAPI client generation (use orval skill).

導入数
2
GitHub Stars
218
更新日
8月15日
pproenca
コミュニティ

react-hook-form

React Hook Form performance optimization for client-side form validation using useForm, useWatch, useController, useFieldArray, the subscribe() API, and the Watch / FormStateSubscribe / FieldArray render-prop components. Covers RHF 7.82 additions including resetDefaultValues() and the disabled field-array option. This skill should be used when building client-side controlled forms with React Hook Form library. This skill does NOT cover React 19 Server Actions, useActionState, or server-side form

導入数
15
GitHub Stars
217
更新日
8月15日