Build your repo
Your stack
4- Clerk came with Dodo Payments. Dodo Payments needs sign in.
- Neon came with Dodo Payments. Dodo Payments needs a database.
- Drizzle ORM came with Neon. Neon needs an ORM.
Database
ORM
- Dodo Payments works best with an email sender.
Vercel AI SDK with a streaming chat route, structured output and tool calling.
4 rules · 2 skills · 6 docs
Users, bans, impersonation and an audit log at /admin. Needs sign in.
2 rules · 2 skills · 8 docs
Analytics
Error tracking
Support chat
Mode
The plan loop without the gate. Best when you work alone.
Agent tools
Next.js 16 on Vercel. The only stack for now.
my-app/, 351 files, Next.js 16 on Vercel
What your agent gets
94 items. 44 written for your 4 batteries.
Guard hooks7
- block-destructiveBefore BashBase
Blocks irreversible shell commands: recursive force deletes, DROP and TRUNCATE sent to a database, force pushes, git reset --hard, git clean, dd, and truncating redirects onto tracked files.
- enforce-typecheckBefore BashBase
Rewrites a bare tsc, however it is launched, into the project's typecheck script before it runs.
- env-leak-detectorBefore Bash, Read, GrepBase
Blocks tool calls that would print, transmit or commit a secret: literal credential shapes, reads of local .env files by any command or by the Read and Grep tools, echo of secret variables, environment dumps, and live values from your .env files.
- guard-neon-sqlBefore BashNeon
Blocks raw DDL through psql, migrations that would really run through the Neon pooler, and schema pushes that skip migration files. The repo's own db:migrate scripts pass.
- auto-lintAfter Edit, Write, MultiEditBase
Runs Biome on the file that was just edited, applies safe fixes, and reports anything it could not fix.
2 more hooks run in team mode.
Rules19
- Authorise from the session, never from the client user objectClerk
When editing
src/app/**+2 more - Clerk's components wear the design's tokens and only render inside the providerClerk
When editing
src/components/auth/**+3 more - The Clerk webhook verifies its signature before anything elseClerk
When editing
src/app/api/webhooks/clerk/**+3 more - One connection surface, and the right driver for the jobNeon
When editing
src/db/**+1 more - Schema changes go through ORM migration files on the direct URLNeon
When editing
src/db/**
Skills18
- /add-clerk-roleClerk
Add a role to the Clerk-backed role vocabulary, wire it into the session claim, gate a route with it, and assign it safely.
- /sync-clerk-userClerk
Extend, backfill or re-verify the Clerk user mirror: the users table and ClerkSyncStore that this battery already ships.
- /db-branchNeon
Create, use, reset and delete Neon database branches, for a feature branch, a preview deploy, a migration rehearsal or a point-in-time investigation.
- /migrate-on-neonNeon
Run a schema migration against Neon safely, on the direct URL, rehearsed on a branch first, with a recovery path when it fails halfway.
- /add-tableDrizzle ORM
Add a table to the Drizzle schema, generate and apply its migration, and wire the typed queries for it.
Subagents6
- db-inspectorNeon
Read-only Neon Postgres inspector. Explains schema, data shape and query plans. Runs SELECT and EXPLAIN only, and refuses every statement that writes or changes schema.
- designerDefault design
Owns the Default design system and its shadcn bridge. The only agent allowed to introduce a new visual pattern or a new token. Refuses to ship a raw colour or a single-mode change.
- documentarianBase
Keeps README, CLAUDE.md, DESIGN.md, docs/onboard.md and docs/solutions/ true to the code. Writes solution docs from work that just landed.
- pr-reviewerBase
Reviews a diff against this repo's rules before it becomes a PR. Convention-aware, blocking on correctness and security, advisory on taste.
- security-auditorBase
Audits the repo or a diff for leaked secrets, broken auth boundaries, injection, unsafe dependencies and unsafe deploy configuration.
Solution docs43
- Clerk impersonation, the act claim, and what to lock while it is onClerk
- Protecting route handlers is not the same as protecting pagesClerk
- Clerk roles: publicMetadata or your own table?Clerk
- Make Clerk's sign-in look native, in light and dark, with CSS variablesClerk
- Testing a Clerk webhook locally without a tunnel round tripClerk
MCP servers1
- neon
- settings.json
- onboard.md
- proxy.ts
- .env.example
- .gitignore
- .mcp.json
- CLAUDE.md
- DESIGN.md
- README.md
- agentic.config.json
- biome.jsonc
- components.json
- drizzle.config.ts
- next.config.ts
- package.json
- playwright.config.ts
- postcss.config.mjs
- tsconfig.json
- vitest.config.ts
CLAUDE.md
Structure preview. Repo-wide rule bodies are written into the real file in full.
# my-app Generated by [Agentic Boilerplate](https://github.com/agentic-studio/agentic-boilerplate) from [Agentic Studio](https://theagentic.studio). Same `agentic.config.json`, same repo: regenerate and diff any time. - **Stack:** Next.js on Vercel (`nextjs-vercel`)- **Batteries:** Drizzle ORM (`drizzle`), Neon (`neon`), Clerk (`clerk`), Dodo Payments (`dodo`)- **Design:** Default (`default`). See [DESIGN.md](DESIGN.md).- **Package manager:** bun- **Mode:** solo- **Agent targets:** claude ## Read this first On a fresh clone, read [docs/onboard.md](docs/onboard.md) before running orediting anything. It lists every environment variable, where to get it, andthe order to set the services up. ```shbun installcp .env.example .env.localbun run verifybun run dev``` ## How this repo is set up for agents - `.claude/rules/`: 19 rules. 3 load every session, 16 load when you read a file they cover.- `.claude/agents/`: 6 subagents, listed below.- `.claude/skills/`: 18 skills, listed below.- `.claude/hooks/`: 7 guard hooks, wired in `.claude/settings.json` for Claude Code.- `.mcp.json`: 1 MCP server (`neon`). Setup is in [docs/onboard.md](docs/onboard.md).- `docs/solutions/`: 43 solved problems. Read the relevant one before re-solving anything.- `docs/plans/`: one plan per unit of work. Run `bun run verify:hooks` to prove the guards still block what they claim to block.Do not edit `.claude/settings.json` by hand: the `system-manager` agent owns it. ## Workflow The Compound Engineering plugin adds the loop: `/ce-brainstorm`, `/ce-plan`, `/ce-work`, `/ce-code-review`, `/ce-compound`.`.claude/settings.json` enables it once you trust this folder. If the commands are missing, run `/plugin install compound-engineering@compound-engineering-plugin`. ## Rules Loaded every session: - [Code style and file conventions](.claude/rules/code-style.md)- [Git and change hygiene](.claude/rules/git.md)- [Security rules](.claude/rules/security.md) Loaded when you read a file they cover: | Rule | Applies to ||---|---|| [Pages in the signed-in app](.claude/rules/app-shell.md) | `src/app/(app)/**`, `src/components/app/**`, `src/components/ui/sidebar.tsx`, `src/lib/app-shell.ts`, `src/lib/nav.ts` || [Authorise from the session, never from the client user object](.claude/rules/authorise-on-the-server.md) | `src/app/**`, `src/components/**`, `src/lib/auth/**` || [Billing is one shared layer with one provider adapter](.claude/rules/billing-core.md) | `src/lib/pricing.ts`, `src/lib/billing/**`, `src/app/pricing/**`, `src/app/(app)/billing/**`, `src/components/billing/**` || [Clerk's components wear the design's tokens and only render inside the provider](.claude/rules/clerk-ui-follows-the-design.md) | `src/components/auth/**`, `src/lib/auth/appearance.ts`, `src/app/(auth)/**`, `src/components/site/header.tsx` || [Deployment rules](.claude/rules/deployment.md) | `next.config.ts`, `vercel.json`, `package.json`, `src/proxy.ts`, `src/app/**/route.ts`, `.env.example` || [Dodo translates, the shared billing core writes, and nothing leaves the server](.claude/rules/dodo-billing-discipline.md) | `src/lib/pricing.ts`, `src/lib/billing/**`, `scripts/billing/**`, `src/app/api/webhooks/dodo/**` || [Verify every Dodo webhook, keep every handler idempotent](.claude/rules/dodo-webhook-integrity.md) | `src/app/api/webhooks/dodo/**`, `src/lib/billing/provider.ts`, `src/lib/billing/dodo-events.ts`, `src/lib/billing/dodo-objects.ts`, `src/lib/billing/webhook.ts` || [Every schema change ships with its generated migration](.claude/rules/drizzle-migrations.md) | `src/db/**`, `drizzle/**`, `drizzle.config.ts` || [Schema and query conventions for Drizzle](.claude/rules/drizzle-schema.md) | `src/db/**` || [Landing page, legal pages and llms.txt](.claude/rules/landing-and-legal.md) | `src/lib/site.ts`, `src/lib/llms.ts`, `src/app/page.tsx`, `src/app/(legal)/**`, `src/app/llms.txt/**`, `src/components/marketing/**`, `src/components/site/**` || [One connection surface, and the right driver for the job](.claude/rules/neon-connections.md) | `src/db/**`, `src/app/api/**` || [Schema changes go through ORM migration files on the direct URL](.claude/rules/neon-migrations.md) | `src/db/**` || [Testing rules](.claude/rules/testing.md) | `tests/**`, `src/**/*.test.ts`, `src/**/*.test.tsx` || [Default: tokens only, and both modes every time](.claude/rules/tokens-only.md) | `src/components/**`, `src/app/**` || [Build UI from the component kit](.claude/rules/ui-kit.md) | `src/components/**`, `src/app/**` || [The Clerk webhook verifies its signature before anything else](.claude/rules/verify-the-webhook-first.md) | `src/app/api/webhooks/clerk/**`, `src/lib/auth/user-sync.ts`, `src/lib/auth/user-store.ts`, `src/lib/auth/webhook-idempotency.ts` | ## Skills | Skill | Use it for ||---|---|| `/add-app-page` | Add a page to the signed-in app (sidebar entry, session check, loading state), or a new tab under /settings. || `/add-clerk-role` | Add a role to the Clerk-backed role vocabulary, wire it into the session claim, gate a route with it, and assign it safely. || `/add-product` | Add or change a plan or price on Dodo Payments (monthly, yearly or one-time lifetime). Edit src/lib/pricing.ts, create the Dodo product, wire its env var, and prove checkout and the webhook end to end. || `/add-table` | Add a table to the Drizzle schema, generate and apply its migration, and wire the typed queries for it. || `/db-branch` | Create, use, reset and delete Neon database branches, for a feature branch, a preview deploy, a migration rehearsal or a point-in-time investigation. || `/deploy-to-vercel` | Ship my-app to Vercel: local gates, environment variables per scope, preview verification, promotion and rollback. || `/edit-pricing` | Add, change or remove a plan or a price (monthly, yearly or one-time lifetime) and wire it to the payment provider. || `/help` | Explain the agentic system in this repo (rules, skills, agents, hooks, solution docs and the CE loop) and where to go for help beyond it. || `/landing-copy` | Rewrite the landing page, the metadata and the legal details for the real product from a short brief, by editing src/lib/site.ts only. || `/migrate` | Generate, review and apply Drizzle migrations safely, including backfills, destructive changes and the deploy step. || `/migrate-on-neon` | Run a schema migration against Neon safely, on the direct URL, rehearsed on a branch first, with a recovery path when it fails halfway. || `/new-component` | Add a component to the Default kit: prefer pasting from shadcn/ui, fix the two bridge classes, keep it token-only and verify it in both light and dark. || `/qa-feature` | Exercise a feature end to end (happy path, unhappy paths, auth boundaries, refresh and mobile) before anyone calls it done. || `/security-audit` | Run the standing security pass through the security-auditor agent (secrets, auth boundaries, injection, dependencies and deploy config) and turn findings into fixes. || `/sync-clerk-user` | Extend, backfill or re-verify the Clerk user mirror: the users table and ClerkSyncStore that this battery already ships. || `/test-webhook` | Exercise the Dodo webhook endpoint. Send a signed fixture offline, forward real test-mode events with the Dodo CLI, buy a subscription and a one-time product, refund one, assert idempotency, and debug signature failures. || `/verify` | Prove the repo is actually configured: every required env var present, every configured service reachable, and the guard hooks still blocking what they claim to block. || `/write-spec` | Turn a loose request into a written spec (problem, scope, behaviour, acceptance criteria) that /ce-plan can consume without guessing. | ## Subagents | Agent | Use it for ||---|---|| `db-inspector` | Read-only Neon Postgres inspector. Explains schema, data shape and query plans. Runs SELECT and EXPLAIN only, and refuses every statement that writes or changes schema. || `designer` | Owns the Default design system and its shadcn bridge. The only agent allowed to introduce a new visual pattern or a new token. Refuses to ship a raw colour or a single-mode change. || `documentarian` | Keeps README, CLAUDE.md, DESIGN.md, docs/onboard.md and docs/solutions/ true to the code. Writes solution docs from work that just landed. || `pr-reviewer` | Reviews a diff against this repo's rules before it becomes a PR. Convention-aware, blocking on correctness and security, advisory on taste. || `security-auditor` | Audits the repo or a diff for leaked secrets, broken auth boundaries, injection, unsafe dependencies and unsafe deploy configuration. || `system-manager` | Maintains the .claude agentic layer itself: rules, skills, agents, hooks, settings. Adds a rule when a correction repeats. | ## Credit Generated by [Agentic Boilerplate](https://github.com/agentic-studio/agentic-boilerplate) from [Agentic Studio](https://theagentic.studio). - [AI Mechanic](https://theagentic.studio/ai-mechanic): Fix a vibe-coded repo, then install this system into it.- [Claude Engineering System](https://theagentic.studio/claude-engineering-system): The same agentic layer, installed into your existing codebase.- [AI Product Sprint](https://theagentic.studio/ai-product-sprint): We build the MVP on top of a repo like this one.
Default. shadcn done carefully. Neutral greys, near-black actions, one blue for links, Geist throughout.
Your agents read this design’s DESIGN.md before they touch a colour.
