CatalystCatalystLogin
agentic next.js boilerplate

Code review for
your AI agent.

Catalyst is a Next.js boilerplate that runs seven checks after every Claude Code, Cursor, Codex, or OpenCode turn. Broken lint, types, dead code, duplication, and architecture get caught and fixed before the diff ever reaches you.

Next.jsBunTypeScripttRPCPrismaPostgreSQLBetter AuthStripeTailwindshadcn/ui
agent session · stop hook

~/app on ⎇ main

$ claude "add a pricing card"

● edited src/components/pricing-card.tsx

● edited src/lib/stripe/prices.ts

running stop hook · 7 checks

✓ check biome 42ms

✓ type-check tsc 1.2s

✓ knip unused-exports 380ms

✓ jscpd duplication 118ms

✓ klint architecture 90ms

✓ madge cycles 204ms

✓ lf line-endings 12ms

✓ 7/7 passed · 0 issues · ready to review

how it works

A review loop that runs itself.

  1. 01

    Your agent finishes a turn

    Claude Code, Cursor, Codex, or OpenCode edits your files and hands control back.

  2. 02

    The stop hook fires

    One runner kicks off all seven checks automatically. No prompt, no waiting on CI.

  3. 03

    The diff gets gated

    Pass, and it reaches your review clean. Fail, and the agent reads the error and fixes it, then runs again.

// the loop repeats until every check is green. you review working code, not typos.

the stop hook

Seven checks between your agent and your review queue.

Every one runs on every turn. Miss none, skip none, and the agent can't raise a threshold to make a failure disappear.

checkbiome

Lint and format, so style nits never land in your diff.

type-checktsc

A full tsc --noEmit pass. A red squiggle never ships.

knipknip

Flags unused exports, files, and dependencies the agent left behind.

jscpdjscpd

Catches copy-paste. Fail it, and the agent must refactor, not raise the threshold.

klintklint

Enforces this repo's own layer rules, not just generic lint.

madgemadge

Blocks circular imports before they turn into build-time mysteries.

lfgit

Normalizes line endings, so diffs stay clean across machines.

+ your own

Drop a script in .agents/hooks and add one line to the Stop array.

One runner. Four coding agents.Claude CodeCursorCodexOpenCode

No magic. It's in the repo.

The whole pipeline is a handful of lines in a config file you own, mirrored for Cursor, Codex, and OpenCode. Read it, edit it, delete a check you don't want.

// .claude/settings.json
{
  "hooks": {
    "Stop": [
      { "hooks": [
        { "command": "bun .agents/hooks/check.ts" },
        { "command": "bun .agents/hooks/type-check.ts" },
        { "command": "bun .agents/hooks/knip.ts" },
        { "command": "bun .agents/hooks/jscpd.ts" },
        { "command": "bun .agents/hooks/klint.ts" },
        { "command": "bun .agents/hooks/madge.ts" },
        { "command": "bun .agents/hooks/lf.ts" }
      ] }
    ]
  }
}

.agents/skills

Playbooks your agent already knows.

The safety net stops bad edits. Skills push good ones, encoding the moves you reach for on every project.

frontend-design
auto

Pulls in a high-quality UI design skill so generated interfaces don't default to purple-gradient AI slop.

lint
manual

Runs check-write, type-check, test, and build in order, auto-fixing what it safely can.

optimize
manual

Scans for complexity, dead code, and performance issues, and proposes fixes one at a time, never a silent mass rewrite.

remember
manual

Reflects on what just went wrong and proposes a new rule for AGENTS.md, so the same mistake doesn't happen twice.

klint-rules
manual

Teaches the agent to add or edit klint's own architecture rules, so the linter grows with your codebase.

your own
byo

Skills are plain markdown in .agents/skills, shared across Claude Code, Cursor, and the rest. Write your own playbook.

stock

Everything else is already wired.

The verification layer is the new part. The rest is the boring, essential plumbing you'd otherwise spend a week assembling.

Better Auth

Email and OAuth sessions, login, register, and password reset already built.

Prisma + PostgreSQL

A typed data layer with migrations and a clean DAO pattern.

tRPC + React Query

End-to-end typed API calls with a cache persisted to IndexedDB.

Stripe

Webhook handling wired in, ready for when you add checkout.

React Email + SES

Transactional emails authored in JSX and sent through Amazon SES.

Winston logging

Structured logs with levels, ready to point at a drain.

Biome + Husky

Formatting, linting, and pre-commit hooks configured from line one.

Docker + devcontainer

Postgres, Redis, and the app in one command, plus an agent container.

Stop reviewing the small stuff.

Clone it, run bun dev, and let the hooks catch what you used to catch by hand.

git clone https://github.com/kovrichard/catalyst.git