Skip to content

// Next.js + tRPC + Prisma + NextAuth + Tailwind — end-to-end type safety from DB to UI.

T3 Stack Builder

skill --stat
  • last update

    May 23, 2026

  • license

    MITv1.0.0

  • format

    SKILL.md

quickstart.sh
3 steps
  1. Install

    // Downloads SKILL.md into ~/.claude/skills/t3-stack-builder/

    $ curl -fsSL --create-dirs -o ~/.claude/skills/t3-stack-builder/SKILL.md https://claudeskil.com/skills/t3-stack-builder/SKILL.md
  2. Invoke

    // Inside Claude Code, type the skill name as a slash command

    > /t3-stack-builder scaffold a typed REST endpoint
  3. Or just ask

    // Claude loads the skill by itself when a request matches its description

    > scaffold a typed REST endpoint
t3-stack-builder/
references
SKILL.md
readonly
name:
T3 Stack Builder
slug:
t3-stack-builder
version:
v1.0.0
license:
MIT
author:
@chiragthummar16
categories:
tags:
#t3#nextjs#trpc#prisma#nextauth
description:

Next.js + tRPC + Prisma + NextAuth + Tailwind — end-to-end type safety from DB to UI.

features.md
5 capabilities

// What you can do with it

  • Runs create-t3-app style scaffolding with sensible defaults: App Router or Pages Router, @trpc/server/@trpc/react-query, Prisma client singleton, and Tailwind preflight.
  • Generates tRPC routers using createTRPCRouter, publicProcedure, and protectedProcedure, with Zod input validation on each procedure.
  • Writes Prisma models into schema.prisma and reminds you to run prisma migrate dev / prisma generate.
  • Configures NextAuth providers and the Prisma adapter in src/server/auth.ts, including session callbacks that attach user.id.
  • Keeps the RouterInputs / RouterOutputs inference helpers intact so the frontend stays fully typed.

README.md

t3-stack-builder/README.md
7 sections

T3 Stack Builder

T3 Stack Builder scaffolds and extends apps built on the T3 stack — Next.js, tRPC, Prisma, NextAuth.js, and Tailwind CSS — wiring them together so types flow unbroken from your database schema to your React components. It's for developers who like create-t3-app's opinions but don't want to hand-write every new router, model, and auth provider afterward. You describe the feature; it generates the Prisma model, the tRPC procedures, and the typed client hooks that consume them.

When to use it

  • Starting a new T3 project and you want App Router, a configured prisma/schema.prisma, and a working NextAuth setup on day one.
  • Adding a new resource (say, Post or Organization) and you'd otherwise repeat the model → router → api.x.useQuery() ceremony by hand.
  • Bolting a new OAuth provider (GitHub, Google, Discord) onto an existing authOptions.
  • Splitting a growing appRouter into feature routers without breaking the inferred AppRouter type.

What it does

  • Runs create-t3-app style scaffolding with sensible defaults: App Router or Pages Router, @trpc/server/@trpc/react-query, Prisma client singleton, and Tailwind preflight.
  • Generates tRPC routers using createTRPCRouter, publicProcedure, and protectedProcedure, with Zod input validation on each procedure.
  • Writes Prisma models into schema.prisma and reminds you to run prisma migrate dev / prisma generate.
  • Configures NextAuth providers and the Prisma adapter in src/server/auth.ts, including session callbacks that attach user.id.
  • Keeps the RouterInputs / RouterOutputs inference helpers intact so the frontend stays fully typed.

Usage example

bash
curl -fsSL --create-dirs -o ~/.claude/skills/t3-stack-builder/SKILL.md https://claudeskil.com/skills/t3-stack-builder/SKILL.md

# then, in a chat:
"Scaffold a new T3 app called taskly with the GitHub provider and a Task model
(title, done boolean, owner relation to User). Add a task router with list,
create, and toggle procedures behind protectedProcedure."

Generated procedure shape:

ts
toggle: protectedProcedure
  .input(z.object({ id: z.string() }))
  .mutation(({ ctx, input }) =>
    ctx.db.task.update({ where: { id: input.id }, data: { done: { /* flip */ } } })),

Tips & gotchas

  • Generated procedures reference ctx.db and ctx.session; the skill assumes the standard createTRPCContext. If you renamed prisma to db (or vice versa), tell it.
  • It edits schema.prisma but does not run migrations — review the diff, then run npx prisma migrate dev yourself.
  • protectedProcedure relies on the session callback exposing session.user.id. If auth was scaffolded elsewhere, verify that callback exists.
  • Adding a provider needs the matching AUTH_* env vars; the skill updates .env.example, not your real .env.

FAQ

Does it support the App Router? Yes — it targets the current create-t3-app layout with src/app and Server Components, and also handles legacy Pages Router projects.

Can I use it on an existing repo? Yes. Point it at a repo that already follows the T3 conventions; it appends routers and models rather than overwriting.

Postgres, MySQL, or SQLite? Whatever your datasource db provider is set to — it writes provider-agnostic Prisma models and leaves the connection to your config.

$ cat reviews/

Reviews

// No reviews yet. Be the first.
Loading review form…

$ ls related/

explore all →