技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
adversarial-tanstack【数据与研究】Use this skill to gate TanStack Start plus TypeScript web-app changes with a pass/fail adversarial review — a single blind reviewer subagent judges a diff or file set against 22 decidable rules covering client/server boundary leaks, server-function and server-route usage, auth and security, SSR data loading, boundary type safety, and compiler config.…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
A merge gate for TanStack Start + TypeScript web-app changes — a pass/fail gate: a single blind reviewer subagent judges the work against this gate's rules with an adversarial mandate, and the work passes only when every rule is PASS or N/A. This skill renders verdicts; it never fixes the work.
Rules are pinned to @tanstack/react-start 1.168+ (v1 RC, July 2026) and TypeScript 5.8–6.x semantics.
.inputValidator(), removed createServerFileRoute).Do not apply to non-Start React apps (most serverfn/boundary/ssr rules will return N/A and the gate degenerates to a TypeScript check) or when the user wants explanations and refactors rather than a verdict.
Follow these steps exactly — the gate's value is that every review runs the same way.
tsconfig.json, src/router.tsx, and src/start.ts (if present) in the target paths — several rules are decided by those files even when the diff does not touch them.references/ (all boundary-*.md, serverfn-*.md, sec-*.md, ssr-*.md, types-*.md, tscfg-*.md files).If the same rule flips verdicts across re-reviews of an unchanged target, or a human reads the evidence and overrides the verdict, that is a decidability bug in the rule — record it in gotchas.md and sharpen the rule; do not override the gate.
The reviewer returns, per rule: PASS | FAIL | N/A, evidence (file:line or a quote — required for PASS as well as FAIL), and for every FAIL, the fix that flips the rule to PASS once applied — the named change plus its location, never a restatement of the violation. The final report follows assets/templates/verdict.md.
| # | Category | Prefix | Covers |
|---|---|---|---|
| 1 | Client/Server Boundary | boundary- | Env vars in server contexts only, loader isomorphism, public-prefix discipline |
| 2 | Server Functions & Routes | serverfn- | Input validators, POST for mutations, current v1 RC APIs, static imports |
| 3 | Auth & Security | sec- | Auth at the handler, CSRF with custom start config, cache privacy, cookie flags, enumeration |
| 4 | SSR & Data Loading | ssr- | Per-request router/QueryClient, useSuspenseQuery for loader data, deterministic render |
| 5 | Type Safety at Boundaries | types- | Schema-parse external data, exhaustive switches, escape-hatch audit, non-null assertions |
| 6 | Compiler Configuration | tscfg- | strict + noUncheckedIndexedAccess, erasableSyntaxOnly, verbatimModuleSyntax off (Start-specific) |
| File | Description |
|---|---|
| references/reviewer-prompt.md | Self-contained prompt template for the blind reviewer |
| assets/templates/verdict.md | Verdict report template |
| references/_sections.md | Category definitions and ordering |
| metadata.json | Version and source references |