- Node 20+
- pnpm 9+ (
npm i -g pnpm) - Claude Code (
npm i -g @anthropic-ai/claude-code)
mkdir my-saas && cd my-saasCopy these files/folders into the directory:
SPEC.mdAGENT.mdINSTALL.md(optional, reference)modules/tests/
The agent will first ask for your project name (e.g. invoicer) and
will generate it in a subfolder with that name, separate from the
specs. Final layout:
workspace/
SPEC.md, AGENT.md, INSTALL.md ← specs (reference, don't touch)
modules/, tests/ ← specs (reference)
scope.json ← config created by the agent
invoicer/ ← ← your SaaS (name you picked)
src/, package.json, ...
.env.local ← fill your keys here
claudePaste this prompt:
Read AGENT.md and run the interview step by step. One question at a
time. Save the answers in scope.json. When done, generate the
Next.js 16 project following SPEC.md + the active modules in modules/.
Then run the tests in tests/ and iterate until they all pass.
The agent offers 3 modes upfront:
- Preset (30 sec, recommended): pick an archetype
(
ai-saas,waitlist,b2b-classic,solopreneur,api-service)- a single extras question.
- Quick (1 min): 5 core questions (auth, db, billing, forms, email)
- extras.
- Custom (3 min): full control.
Modules always applied (not asked): SEO, legal pages, rate-limit, error-tracking. If you don't want one of them, say so at the end ("remove sentry").
Shortcuts:
- Option number
- First letter
skip/ Enter → use the default
The agent will:
- Scaffold with
pnpm create next-appinto<projectName>/ - Apply every active module
- Generate
.env.example,README.md,CLAUDE.md - Install dependencies
- Run
typecheck,lint,build - Run the tests in
tests/and iterate
The agent prints which env vars you must fill in based on the active modules.
cd <projectName> # e.g. cd invoicer
cp .env.example .env.local
# Edit .env.local with your real keyscd <projectName>
pnpm dev- Build fails: the agent should iterate. If it doesn't, tell it:
"Run
pnpm buildand fix errors until it passes". - Tests fail: tests are functional. If one needs real credentials
(Stripe, Resend), the agent should skip it by marking it
requires_envin the YAML.