How to rebrand a Next.js starter kit with an AI coding agent
What goes in an AGENTS.md file, and how the "Make it yours" task gets Claude Code, Codex or Cursor to rebrand a starter kit safely.
Short answer: give the agent two things. The first is an AGENTS.md file that explains where everything lives and which rules must never break. The second is one written task that says exactly what to ask you, which files to change and how to check the result. Launchfast ships both, so the first thing you do after buying is answer a few questions about your product.
Why a starter kit needs instructions for agents
A starter kit is mostly decisions that are already made: where the plans are defined, how access is decided, which file owns payments. A coding agent that doesn't know those decisions makes new ones. It adds a second place to define prices, or calls the payment provider from a page. The code still runs, but the kit's guarantees are gone.
AGENTS.md is a plain Markdown file at the root of the repository. Claude Code, Codex, Cursor and other agents read it before they change code.
What goes in AGENTS.md
Launchfast's file has four parts.
1. A map of where things live. One table row per responsibility:
| Path | What it owns |
|---|---|
src/config.ts | Site name, support email and the plans for sale |
src/lib/billing/dodo.ts | All Dodo Payments code: checkout, portal, webhooks |
src/lib/billing/index.ts | The access rule: getBillingStatus() |
src/db/schema.ts | Every table |
2. Rules that must hold. These are short and testable, for example:
- Only
src/lib/billing/dodo.tsimports the Dodo SDK. - Decide access with
getBillingStatus(); never call the payment provider on a page request. - Webhook handlers must be idempotent and must ignore subscription events older than the stored one.
- Money is stored as integers in the smallest currency unit.
3. Framework traps. Next.js 16 with cacheComponents changes what you can do at the top of a page. For example, reading the session or searchParams must happen inside a component wrapped in <Suspense>. Agents trained on older versions get this wrong, so the file says it outright.
4. Commands to check the work: npm run typecheck, npm run lint, npm test and npm run build.
The "Make it yours" task
The task is a section of AGENTS.md. Launchfast also includes a /make-it-yours command for Claude Code. It has five steps.
- Ask in one message. The agent asks for your product's name, who it's for, its main features, how people get started, your plans and prices, a brand colour, your support email and legal name, and your tone. Anything you skip, it chooses and tells you what it chose.
- Make the changes. The agent updates the plans and site details in
src/config.ts, rewrites the landing page copy, and sets the brand colour in both the light and dark themes. The text on that colour must keep at least 4.5:1 contrast. It also fills in every bracketed placeholder in the terms and privacy pages, deletes the example blog post and offers to draft your first real one. - Follow the writing rules. Be specific, and never invent statistics, customer counts, testimonials or logos.
- Check the work. Typecheck, lint, tests and a production build must pass, and a search for the placeholder product name must find nothing.
- Say what's next. The agent tells you to run
npm run setup, which connects the database, payments and email.
No API keys are needed for any of this. Keys come later, when npm run setup asks for them.
Why a written task beats a long prompt
- It's repeatable. Every buyer's agent runs the same steps, so a bug fixed in the task is fixed for everyone.
- It's reviewable. The task lives in the repository, so changes to it show up in a diff like any other code.
- It ends with checks. "Make the copy nice" has no finish line. "Build passes and no placeholder text is left" does.
Writing your own
If you maintain a template or an internal starter, start small:
- List every file a new user must change, and what goes in each.
- Write each rule as one sentence an agent can check against a diff.
- End with the exact commands that prove the change works.
Launchfast's AGENTS.md and "Make it yours" task are included with the kit. See how setup works.