CLAUDE.md and AGENTS.md Generator
Generate CLAUDE.md, AGENTS.md and .cursorrules files for your repo. Pick a stack, describe conventions and export AI agent instructions in every format.
# CLAUDE.md This file gives Claude Code the context it needs to work in Acme Web. Read it before making changes. ## Project Marketing site and documentation for Acme, built with the App Router and MDX content. **Stack:** Next.js / TypeScript ## Commands | Task | Command | |------|---------| | Install | `pnpm install` | | Dev server | `pnpm dev` | | Test | `pnpm test` | | Lint | `pnpm lint` | | Build | `pnpm build` | Run the test and lint commands before you report a task as done. Claude should not start long-running dev servers unless asked. ## Stack conventions - App Router under app/; components are server components unless the file starts with "use client". - Route handlers live in app/api/**/route.ts and validate input with zod. - Styling uses Tailwind utility classes with semantic tokens (bg-background, text-muted-foreground). ## Code style - TypeScript runs in strict mode. Do not use `any`; prefer `unknown` plus narrowing. - Every behaviour change ships with a unit or integration test in the same PR. - Commit messages follow Conventional Commits: `feat:`, `fix:`, `docs:`, `refactor:`, `chore:`. - Do not add a dependency without asking; prefer the standard library or an existing package. ## Repository layout ``` app/ routes, layouts and API handlers components/ shared React components lib/ framework-free logic tests/ vitest unit + integration, playwright e2e public/ static assets ``` ## Do - Run pnpm test and pnpm lint before saying a task is done - Keep pull requests under 400 changed lines - Ask before changing database schemas ## Don't - Edit files under generated/ by hand - Commit .env files or API keys - Add a UI library; use the components in components/ui ## Pull request checklist - [ ] Tests pass locally - [ ] Lint and typecheck are clean - [ ] No secrets or debug output committed - [ ] PR description explains the why
What Is a CLAUDE.md File?
A CLAUDE.md file is the instruction sheet an AI coding agent reads before it touches your repository: what the project is, how to install and test it, which conventions to follow and which files to leave alone. Claude Code loads it automatically from the repository root; the same content under the name AGENTS.md is read by Codex, Cursor and GitHub's Copilot coding agent. Teams that write one report fewer wrong commands, fewer style nits in review, and agents that stop before doing something irreversible.
This generator builds the file from a short form and renders it in the four formats the popular tools expect. Everything runs in your browser.
How to Generate CLAUDE.md and AGENTS.md
- Pick a stack preset. It fills the install, dev, test, lint and build commands and a typical directory overview; edit any of them.
- Enter the project name and a one-line purpose so the agent knows what it is working on.
- Tick the code style rules that apply, such as TypeScript strict mode or conventional commits, and add project-specific rules one per line.
- Fill the Do and Don't lists with concrete instructions and adjust the pull request checklist.
- Switch between the CLAUDE.md, AGENTS.md, .cursorrules and copilot-instructions.md tabs and copy or download the ones your team uses.
CLAUDE.md vs AGENTS.md vs .cursorrules vs Copilot Instructions
The four files carry the same information but are read by different tools with different expectations:
| File | Read by | Location | Shape |
|---|---|---|---|
| CLAUDE.md | Claude Code | Repo root (also ~/.claude/ for personal rules) | Markdown with headings; loaded every session |
| AGENTS.md | Codex, Cursor, Copilot coding agent, Jules and others | Repo root, optionally per package | Same markdown, vendor-neutral wording |
| .cursorrules | Cursor | Repo root (or .cursor/rules/*.mdc) | Flat list of instructions, no headings |
| copilot-instructions.md | GitHub Copilot chat and code review | .github/ | Short prose sections |
A cursorrules file is the odd one out: Cursor injects it into the prompt as-is, so it should read like a list of orders. The other three are documents an agent skims for the section it needs.
What Makes a Good Agent Instruction File
Keep it under a page. Agents read the file on every task, so every paragraph costs context that could go to your code. Lead with commands, because a wrong test command wastes the most time. State rules as imperatives that can be checked: run pnpm lint before finishing beats keep the code clean. Name the directories that matter and the files that must not change. Finally, add the PR checklist so the agent's summary lines up with what your reviewers look for.
Revisit the file when an agent makes the same mistake twice; that is the signal a rule is missing.
Why Use a CLAUDE.md Generator
A claude.md generator turns the blank-page problem into a checklist: the stack presets know the usual commands and layout, the rule list covers the conventions most teams argue about, and the four outputs stay in sync because they come from one source. Generate the files when you create a repository, commit them next to the README and the .gitignore, and update them from the same form when conventions change. Pair it with the llms.txt generator if your documentation site should be readable by the same agents.
Frequently Asked Questions
What is CLAUDE.md?
CLAUDE.md is a markdown file at the root of a repository that Claude Code reads at the start of every session. It holds the commands to install, test and build the project, the coding conventions to follow, and the things the agent must not touch. Keeping it short and specific gives better results than a long style guide.
What is the difference between CLAUDE.md and AGENTS.md?
AGENTS.md is the vendor-neutral version of the same idea, read by Codex, Cursor, Copilot coding agent and others. This claude.md generator writes both from one form: the body is identical, only the title and the opening sentence change, so you can commit both without maintaining two documents.
How is .cursorrules different?
Cursor reads .cursorrules as a plain list of instructions rather than a structured document, so the tool flattens the same content into short lines with no headings: commands, rules, always and never lists. Newer Cursor versions also read .cursor/rules/*.mdc; paste the same text there if you prefer.
Where does copilot-instructions.md go?
GitHub Copilot looks for .github/copilot-instructions.md and prepends it to every chat and code review request. Copilot works best with short prose sections, so the generated file uses About, Build and test, Coding conventions and Things to avoid headings instead of the longer CLAUDE.md layout.
What should I put in the do and don't lists?
Put concrete, checkable instructions: run the test suite before finishing, ask before adding dependencies, never edit generated files, never commit secrets. Avoid vague guidance such as write clean code; agents already try to, and specific rules are what stop the mistakes you actually see.
Does the agents.md generator send my project details anywhere?
No. Every file is rendered in your browser from the form; nothing is uploaded.