This is the template from the reel. The zip has four files. Put them in the root of your project, fill in the parts in angle brackets, and delete the comment lines.
1. The rules file: AGENTS.md (or CLAUDE.md)
The AI reads this at the start of every session, so you stop explaining your project again and again. The name depends on your tool:
| Tool | File name |
|---|---|
| Claude Code | CLAUDE.md |
| Codex and most other agents | AGENTS.md |
| Cursor | .cursor/rules/project.mdc |
What goes in it, and nothing else:
## What this project is
One or two sentences.
## How to run it
- Install: npm install
- Run locally: npm run dev
- Test: npm test. Run this before saying a change is done.
## Rules
- Never read, print or commit .env.
- Never touch migrations/ without asking first.
- For anything bigger than a small fix, write the plan in PLAN.md first
and wait for me to approve it.
- Do not add a new library without asking.
## Known gotchas
- Restart the dev server after editing next.config.js
Keep it short. A long rules file gets skimmed by the AI the same way it gets skimmed by people. Add a line each time the AI makes the same mistake twice.
2. Secrets: .env, .env.example and .gitignore
Your API keys go in .env. That file never gets committed. .env.example lists the names with no values, so the next person (or the AI) knows what to fill in.
# .env.example (safe to commit)
OPENAI_API_KEY=
ANTHROPIC_API_KEY=
DATABASE_URL=
# .gitignore
.env
.env.*
!.env.example
Do this before your first commit. If .env was already committed once, adding it to .gitignore later does not remove it from history, and the key is already exposed. That case has its own page: the leaked-key checklist.
3. The plan file: PLAN.md
Before it writes any code, the AI writes the plan here: the goal, the steps, the files it will touch, what it will not touch, and what it is unsure about. You read it, change what is wrong, and reply "approved".
## Goal
## Steps
- [ ] 1. ...
- [ ] 2. ...
- [ ] 3. Test: how we will know it works
## Files it will touch
## Out of scope
## Risks / questions for me
## Status
Waiting for approval.
Two minutes reading a plan saves the hour you would spend undoing a wrong build. Many tools have a plan mode built in (Claude Code, Cursor, Codex). The file still helps, because it survives between sessions and you can see what was agreed.
The five-minute setup
- Download the zip and copy the files into your project root.
- Rename
AGENTS.mdif your tool wants a different name. - Fill in "what this project is" and "how to run it".
cp .env.example .envand paste your keys into.env.- Run
git statusand check that.envdoes not appear in the list.
Rules, secrets, plan.