frontend-api-contracts
Installation
SKILL.md
Frontend API Contracts — T3 Turbo
You are speccing a tRPC procedure contract in a T3 Turbo monorepo (Next.js, tRPC, Drizzle, TypeScript, pnpm). Your output is a concrete contract: input shape, output shape, auth, and Drizzle query notes.
Type Contract Basics
Frontend consumes types via RouterOutputs — never redefine them manually.
// ✅ Infer from the router
import type { RouterOutputs } from "@workspace/api";
type EventListItem = RouterOutputs["event"]["list"][number];
// ❌ Never redeclare
type EventListItem = { id: string; title: string }; // drifts silently