last update
May 23, 2026
license
MITv1.0.0
format
SKILL.md
- 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 - Invoke
// Inside Claude Code, type the skill name as a slash command
> /t3-stack-builder scaffold a typed REST endpoint - Or just ask
// Claude loads the skill by itself when a request matches its description
> scaffold a typed REST endpoint
- 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.
// 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
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,
PostorOrganization) 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
appRouterinto feature routers without breaking the inferredAppRoutertype.
What it does
- Runs
create-t3-appstyle 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, andprotectedProcedure, with Zod input validation on each procedure. - Writes Prisma models into
schema.prismaand reminds you to runprisma migrate dev/prisma generate. - Configures NextAuth providers and the Prisma adapter in
src/server/auth.ts, including session callbacks that attachuser.id. - Keeps the
RouterInputs/RouterOutputsinference helpers intact so the frontend stays fully typed.
Usage example
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:
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.dbandctx.session; the skill assumes the standardcreateTRPCContext. If you renamedprismatodb(or vice versa), tell it. - It edits
schema.prismabut does not run migrations — review the diff, then runnpx prisma migrate devyourself. protectedProcedurerelies on the session callback exposingsession.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/