> free_tool --no-signup
AGENTS.md generator
Pick your Next.js stack and get a ready AGENTS.md for Cursor, Codex, Claude Code and other coding agents: commands, a project map, server-side auth checks, Supabase RLS, verified Stripe webhooks and AI SDK rules. Copy it or download it.
# AGENTS.md
Guidance for AI coding agents (Cursor, Codex, Claude Code and others) working on this project.
Keep this file short. If something here is wrong, fix the file in the same change.
## Stack
- Next.js App Router + TypeScript (strict). React Server Components by default.
- Tailwind CSS v4 + shadcn/ui.
- Supabase (Postgres) via `@supabase/ssr`.
- Auth: Supabase Auth.
- Stripe (Checkout, Customer Portal, webhooks).
- Zod for input validation.
## Commands
- Install: `npm install`
- Dev server: `npm run dev`
- Lint: `npm run lint`
- Build: `npm run build`
- After schema changes: `supabase migration new <name>`, then regenerate types with `supabase gen types typescript`
## Project map
- `src/app/`: routes, layouts, route handlers (`route.ts`).
- `src/components/`: shared UI (`src/components/ui/` is shadcn/ui, generated).
- `src/lib/`: server utilities and clients (`src/lib/supabase/` for the browser and server clients).
- `supabase/migrations/`: SQL migrations (source of truth for the schema).
- Update this map when you add a top-level folder.
## Conventions
- Server Components by default. Add `"use client"` only for state, effects or browser APIs, and keep client components small.
- Fetch data on the server. Don't call your own route handlers from Server Components.
- Secrets live in env vars on the server. Only `NEXT_PUBLIC_` vars reach the browser, so never put a secret in one.
- Document every new env var in `.env.example`.
- Validate every external input (form data, route params, request bodies, webhook payloads) with Zod on the server.
- Style with Tailwind utility classes. Reuse shadcn/ui components before writing new ones; add them with the shadcn CLI instead of copying code by hand.
## Auth and data access
- Use `createServerClient` (server) and `createBrowserClient` (client) from `@supabase/ssr`. Create a new server client per request.
- On the server, authorize with `supabase.auth.getUser()` or `getClaims()`. Never trust `getSession()` on the server.
- Every table in an exposed schema has Row Level Security enabled with explicit policies. The `service_role` / secret key is server-only and never used for requests made on behalf of a user.
- Middleware/proxy checks are optimistic only. The real authorization check happens next to the data access.
- Check ownership on every read and write of user data (filter by the current user's id).
## Stripe
- Verify webhooks with `stripe.webhooks.constructEvent` on the raw body (`await req.text()`), never parsed JSON.
- Webhooks can arrive twice and out of order: make handlers idempotent and re-fetch the subscription from Stripe before writing.
- Grant access from the database state the webhook writes, not from the Checkout success redirect.
- Never create the Stripe client at module top level with a missing key; builds run without secrets.
- Use test mode keys and the Stripe CLI (`stripe listen`) locally.
## Working rules for agents
- Plan before large changes and list the files you will touch.
- Keep diffs minimal. Don't reformat or rename unrelated code.
- Ask before adding a dependency (`npm install <pkg>`).
- Don't edit generated files, lockfiles or applied migrations by hand.
- Before you finish: `npm run lint` and `npm run build` pass.
## Landmines
- <Add things that broke before, e.g. "the billing page must stay dynamic".>
<!-- Generated with the free AGENTS.md generator at https://vibeboot.dev/tools/agents-md-generator -->
70 lines · generated in your browser, nothing is sent anywhere.
SaaS Starter · $49
Skip the writing. The VibeBoot SaaS Starter ships with this already handled: an AGENTS.md and CLAUDE.md that match its real files and commands, plus auth, Stripe and a database on Next.js 16.4.3. $49, one-time.
14-day money-back guarantee · lifetime updates
AI Chatbot Starter · $59
Streaming chat on the AI SDK, saved conversations, server-enforced Free vs Pro limits and Stripe, with agent docs included.
14-day money-back guarantee · lifetime updates
New rules in your inbox
Occasional emails with new templates, AGENTS.md and rule updates. No spam, unsubscribe anytime.
Subscribe to the newsletterStarters are one-time payments, no subscription.
Want scoped rules too? Grab the free Cursor Rules Pack (Next.js, Supabase, Stripe, Tailwind + shadcn, AI SDK), build a single rule with the Cursor rules generator, or start from the free Lite Starter. More in all free tools.
FAQ
What is AGENTS.md?
AGENTS.md is a plain Markdown file in your repo root that tells AI coding agents how your project works: stack, commands, folder map, conventions and things not to do. Cursor, OpenAI Codex and other agents that follow the AGENTS.md convention read it automatically.
Where do I put the file?
Save it as AGENTS.md in the root of your repository and commit it. In a monorepo you can add more AGENTS.md files in sub-packages; the nearest one to the edited file applies.
Does Claude Code read AGENTS.md?
Claude Code reads CLAUDE.md. Download the optional CLAUDE.md here: it contains one line, @AGENTS.md, which imports the AGENTS.md file so you keep a single source of truth.
How is this different from Cursor rules?
Cursor rules (.cursor/rules/*.mdc) can be scoped to files with globs and are Cursor-specific. AGENTS.md is one file that many agents read. Use AGENTS.md for the project overview and the free Cursor Rules Pack for area-specific rules.
Is anything sent to a server?
No. The file is generated in your browser. Nothing you type or select is stored or sent anywhere.
vibeboot saas starter
Skip the writing. The VibeBoot SaaS Starter ships with this already handled: an AGENTS.md and CLAUDE.md that match its real files and commands, plus auth, Stripe and a database on Next.js 16.4.3. $49, one-time.
14-day money-back guarantee · lifetime updates
Building an AI chat app? The AI Chatbot Starter ships streaming chat, saved conversations, Free/Pro usage limits enforced on the server and Stripe, with AGENTS.md and .cursor/rules. Get the AI Chatbot Starter, $59
> More free tools
All tools →- VibeBoot DoctorNewPaste any error or your package.json: diagnosis, fix and the rule that prevents it.
- middleware.ts → proxy.tsNewConvert Next.js middleware to Next.js 16 proxy.ts, Auth.js v5 included.
- AGENTS.md checkerNewCheck AGENTS.md for the Next.js 16 managed block, commands and guardrails.
- Access control checkerPaste a route or server action, see what anyone can call.
- Prisma error fixerP2002, P1001, P2021, did not initialize yet: cause and fix.
- Next.js error fixerServer Component, Suspense and hydration errors: cause and fix.
- Env leak checkerPaste your .env, see which secrets would ship to the browser.
- Stripe webhook fixerPaste a Stripe webhook error, get the cause and the fix.
- Auth.js error fixerMissingSecret, UntrustedHost, redirect_uri: cause and fix.
- Cursor Rules PackFree downloadScoped .mdc rules for Next.js, Stripe webhooks, access control and more.
- Cursor rules generatorBuild one project.mdc rule for your exact stack.
- AI chatbot cost calculatorCost per message, Pro margin and a safe free-tier cap.