AGENTS.MD GENERATOR

2prompt turns your stack and house rules into ready-to-commit AGENTS.md, CLAUDE.md, GEMINI.md, Cursor rules and Copilot instructions, with a free library of tested files for popular stacks and a converter for the ones you already have.

Zero retention: everything you type stays in this browser. Verify it yourself in DevTools.
Jump to your files
Start
Stack

Languages

Commands

Paste the exact commands. They are the most useful lines in the file: they are how an agent checks its own work.

Code style
Working rules
Product constraints
Project-specific
Your filesUpdated as you type. Nothing is sent anywhere.
AGENTS.mdFor Codex, Cursor, Copilot, Jules, Windsurf and more
# AGENTS.md

Project: my-app. A web app.

This file is the single source of truth for every coding agent working in this repository. The tool-specific files (CLAUDE.md, GEMINI.md, .github/copilot-instructions.md and .cursor/rules/project.mdc) point here. Edit this file, not those.

## Stack

- Language: TypeScript
- Framework: React + Vite
- Tests: Vitest
- Package manager: npm

## Commands

Run these from the repository root.

- Install dependencies: `npm install`
- Run locally: `npm run dev`
- Build: `npm run build`
- Run all tests: `npm test`
- Lint: `npm run lint`
- Type-check: `npx tsc --noEmit`

## Code style

- Indentation and line wrapping are whatever the formatter produces; do not hand-format against it.
- TypeScript runs in strict mode. Do not use `any`; use `unknown` and narrow it, or write the real type.
- Match the style and patterns of the surrounding code, even where you would personally choose differently.
- Never swallow an error. Handle it where you can act on it, or rethrow it with context about what failed.
- Commit messages follow Conventional Commits: `feat:`, `fix:`, `refactor:`, `test:`, `docs:`, `chore:`, with an imperative summary under 72 characters.

## Working rules

- Before you say a task is done, run the test, lint and type-check commands above and make sure they pass. If you could not run them, say so.
- Never write secrets, API keys, tokens or passwords into code, tests, fixtures, logs or commits. Read them from environment variables, and never commit `.env` files.
- Do not add a new dependency without asking first. Prefer the standard library and what is already installed.
- Never run destructive commands (`rm -rf`, `git reset --hard`, `git push --force`, `DROP TABLE`, deleting cloud resources) without explicit approval.
- Change only what the task needs. Do not refactor, rename or reformat unrelated code.
- If the request is ambiguous or conflicts with these rules, ask one specific question instead of guessing.

## Project phase

This project is in active development. Follow the patterns that already exist; consistency beats novelty.
CLAUDE.mdFor Claude Code
# CLAUDE.md

@AGENTS.md

## Claude Code

- The shared project instructions are imported from AGENTS.md on the line above. Edit AGENTS.md, not this file, so every agent stays in sync.
- Put Claude-only preferences below this line. Personal, uncommitted notes belong in CLAUDE.local.md.
GEMINI.mdFor Gemini CLI
# GEMINI.md

@./AGENTS.md

## Gemini CLI

- The shared project instructions are imported from AGENTS.md on the line above. Edit AGENTS.md, not this file.
- Alternative: delete this file and set "context": { "fileName": ["AGENTS.md"] } in .gemini/settings.json so Gemini CLI reads AGENTS.md directly.
.github/copilot-instructions.mdFor GitHub Copilot
# Copilot instructions

Project: my-app. A web app.

The full instructions are in AGENTS.md at the repository root. Read it before you change code; if anything here disagrees with it, AGENTS.md wins. The essentials are repeated below for Copilot surfaces that only read this file.

## Stack

- Language: TypeScript
- Framework: React + Vite
- Tests: Vitest
- Package manager: npm

## Commands

- Install dependencies: `npm install`
- Run locally: `npm run dev`
- Build: `npm run build`
- Run all tests: `npm test`
- Lint: `npm run lint`
- Type-check: `npx tsc --noEmit`

## Working rules

- Before you say a task is done, run the test, lint and type-check commands above and make sure they pass. If you could not run them, say so.
- Never write secrets, API keys, tokens or passwords into code, tests, fixtures, logs or commits. Read them from environment variables, and never commit `.env` files.
- Do not add a new dependency without asking first. Prefer the standard library and what is already installed.
- Never run destructive commands (`rm -rf`, `git reset --hard`, `git push --force`, `DROP TABLE`, deleting cloud resources) without explicit approval.
- Change only what the task needs. Do not refactor, rename or reformat unrelated code.
- If the request is ambiguous or conflicts with these rules, ask one specific question instead of guessing.
.cursor/rules/project.mdcFor Cursor
---
description: Project instructions for every task (mirrors AGENTS.md)
globs:
alwaysApply: true
---

# Project rules

The project instructions live in @AGENTS.md at the repository root, which Cursor loads automatically. They are not repeated here, so they cost context only once. Edit AGENTS.md, not this rule.

Before you change code, check the Commands and Working rules sections of AGENTS.md, and run its test and lint commands before you say a task is done.

Put Cursor-only rules below, or add scoped rules as more .mdc files with `globs` (for example `src/components/**/*.tsx`).

The .zip is laid out exactly as the files go into your repository: AGENTS.md and CLAUDE.md at the root, the Copilot file in .github/, the Cursor rule in .cursor/rules/.

About the AGENTS.md generator

How Can You Verify That Nothing Leaves This Browser?

You do not have to take our word for it. Developer tools show every request a page makes, so you can watch this page work and confirm that nothing you type is sent. The check takes under a minute.

  1. Open your browser developer tools with F12, or Cmd+Option+I on a Mac, and select the Network tab.
  2. Reload the page and let it finish. You will see the page's own files, its web fonts, and one anonymous page-view request. Nothing has been typed yet, so none of them can contain your input.
  3. Click the clear icon in the Network tab so that the log is empty.
  4. Fill in the generator form, switch tabs, copy a file and download the zip.
  5. Look at the Network tab again. It is still empty. Downloads are built in the page as Blob URLs, so even the zip never touches a server. For extra proof, turn on offline mode after the page loads: everything keeps working.

Only the feedback form can add a line to that log, and it sends only the vote and comment you type into it. 2prompt has no server code at all: no API, no model and no database of your files. The production site also sends a Content-Security-Policy header that tells your browser to refuse connections to anywhere except this site, the fonts and the anonymous analytics endpoint.

What Does the AGENTS.md Generator Do?

The AGENTS.md generator writes the instruction files that coding agents read before they touch your code. You describe your project once: the languages and framework, the database and hosting, the exact commands that install, build, test and lint it, and the rules your team cares about. 2prompt writes AGENTS.md as the single source of truth, plus thin files for the tools that look elsewhere: CLAUDE.md for Claude Code, GEMINI.md for Gemini CLI, .github/copilot-instructions.md for GitHub Copilot and .cursor/rules/project.mdc for Cursor.

All five files appear side by side in tabs and update as you type. You can copy any one of them, or download a zip that is laid out exactly as the files go into your repository. Nothing about this needs a server, an account or a model: the files come from deterministic templates that run in this page, so the same answers always produce the same files.

Why Does Every Repository Need an AGENTS.md Now?

Coding agents are only as good as what they know about your project. Without instructions, an agent guesses your package manager, invents a test command, reformats files your formatter owns, and declares a task done without running anything. The fix is cheap: a short file at the root of the repository that tells the agent how the project is built, how to check its own work, and which lines it must not cross.

The catch is that every tool grew its own file. Claude Code reads CLAUDE.md, Gemini CLI reads GEMINI.md, Copilot reads a file in .github, Cursor reads .mdc rules, and Windsurf has its own rules folder. AGENTS.md is the shared answer: an open format, now stewarded by the Agentic AI Foundation under the Linux Foundation, that Codex, Cursor, Windsurf, Cline, Zed, Jules and parts of Copilot read directly. Teams that run two or three agents in one repository need one file that all of them follow, and small pointers for the tools that do not read it yet. That is exactly the set 2prompt writes.

Which Files Does 2prompt Generate?

  • AGENTS.md: the canonical file, with Stack, Commands, Project layout, Code style, Working rules, Product constraints, Project-specific notes and Project phase sections. See the AGENTS.md format guide.
  • CLAUDE.md: imports AGENTS.md with Claude Code's @AGENTS.md syntax, so Claude sees the same instructions on every version. See CLAUDE.md.
  • GEMINI.md: imports AGENTS.md with Gemini CLI's @./AGENTS.md syntax, and explains the settings alternative. See GEMINI.md.
  • .github/copilot-instructions.md: points to AGENTS.md and repeats the stack, commands and working rules inline, because Copilot Chat on github.com and in several IDEs reads only this file. See Copilot instructions.
  • .cursor/rules/project.mdc: a short always-on rule that points to AGENTS.md, which Cursor already loads, without repeating it. See Cursor rules.

Windsurf reads AGENTS.md directly, so it needs no extra file. The Windsurf rules guide explains when a separate rule still helps.

How Do You Use the Generator?

  1. Pick a starting point in the first box: one of the 28 tested stacks, or start from scratch.
  2. Set the stack: languages, framework, database, hosting, test runner and package manager.
  3. Paste your exact commands. Install, run, build, test, test one file, lint, type-check and format. Leave blank any your project does not have.
  4. Tick the code style conventions, working rules and product constraints that apply. Each box writes one specific, checkable sentence.
  5. Add your key directories and any house rules, one per line.
  6. Read the five files in the tabs, then download the zip or copy the files you need.

The address bar keeps the whole form in the part after the #, so you can bookmark it or send the link to a teammate. Browsers never send that part of a URL to any server.

What Makes a Good AGENTS.md?

The best instruction files are short, specific and checkable. Every line is loaded into the agent's context on every task, so a line has to earn its place.

  • Exact commands. The single most useful thing in the file. An agent that knows pnpm test and pnpm lint can check its own work; one that does not will guess or skip it.
  • Rules a machine can follow. "Ask before adding a dependency" is a rule. "Write clean code" is a wish. The linter flags the second kind.
  • No contradictions. Two rules that disagree, such as tabs in one line and spaces in another, make the agent choose at random.
  • No secrets. The file is committed and read by every tool; a pasted key leaks to all of them.
  • Small enough to load. Claude Code's documentation suggests under 200 lines for CLAUDE.md, and Codex stops reading project files at 32 KiB by default.

The generator writes every sentence to those standards, and the files it produces pass the linter with no errors or warnings.

What Is in the Stack Library?

The library has 28 hand-reviewed presets, each with real commands, a conventional directory layout and the rules agents most often get wrong on that stack: Server Components and the service-role key on Next.js with Supabase, migrations shipped with every Django model change, strong parameters in Rails, npx expo install for native modules in Expo. Every preset has its own page with the full files in plain text, and a button that loads it into the generator so you can change anything.

Popular presets: Next.js + Supabase, Next.js + Prisma, React Router v7 (Remix), React + Vite SPA, Vue 3 + Vite, Nuxt, SvelteKit, Astro, and the rest on the stacks page.

How Does Convert and Lint Work?

Most teams already have an instruction file, often a .cursorrules from a year ago or a CLAUDE.md that grew by accretion. Paste it into Convert & Lint and you get two things at once.

  • A lint report with line numbers: missing build or test commands, vague rules, contradictions, pasted secrets, outdated tool and model names, a size and token estimate, and Cursor rules that can never apply.
  • A conversion of the same file into AGENTS.md plus the four tool files, with headings mapped to standard sections. The converter moves text; it never invents commands you did not write.

Converter pages: .cursorrules to AGENTS.md, CLAUDE.md to AGENTS.md and copilot-instructions.md to AGENTS.md.

Which Agents Read Which File?

The short version, checked against each vendor's documentation on 2026-11-13:

  • OpenAI Codex, Cursor, Windsurf, Cline and Jules read AGENTS.md.
  • Claude Code reads CLAUDE.md, and reads AGENTS.md only when no CLAUDE.md exists unless you change a setting, so a CLAUDE.md that imports AGENTS.md is the reliable bridge.
  • Gemini CLI reads GEMINI.md, and reads AGENTS.md if you add it to context.fileName.
  • GitHub Copilot reads copilot-instructions.md everywhere, and agent files only in some surfaces.
  • Zed reads the first file it finds from a fixed list, so a forgotten .cursorrules can hide your AGENTS.md.

The full table, with each vendor's source link and the details that trip people up, is on the compatibility page. We re-check it against the vendor docs and date every check.

Is 2prompt Really 100% Client-Side?

Yes, and you can check it. The generator, the converter, the linter and the zip builder are JavaScript that runs in this page. There is no server-side code at all: no API, no model call, no database of your files. What you type is never uploaded, never stored, and never put anywhere except the address bar of your own browser when you change the generator form.

Two things do make network requests, and neither carries anything you typed: the page loads its fonts from Google Fonts, and it sends one anonymous page-view count when it loads, before you can type anything. If you use the feedback form, it sends the vote and comment you write in it. That is the whole list. The production site also sends a Content-Security-Policy header that tells your browser to refuse connections anywhere else.

Who Is 2prompt For?

  • Developers starting a new repository who want their agents set up correctly from the first commit.
  • Teams adding a second or third agent to an existing repository, who need one source of truth instead of three drifting files.
  • Anyone with an old .cursorrules or an overgrown CLAUDE.md that needs cleaning up, porting or checking.
  • People who want to understand the vocabulary: the AI glossary explains context windows, MCP, RAG, evals and the rest in plain language, and the models page compares frontier and open-weight models without benchmark soup.

What Happened to the Old 2prompt?

2prompt used to be a seven-step wizard that sent your answers to a language model and returned a long "master prompt" to paste into a chat. That job is now done better, for free, by the chat tools themselves, and it needed a server and a paid model to work. We retired it. The new 2prompt keeps the useful part of the old wizard, the questions about your stack, your constraints and your project's phase, and turns those answers into files your agents actually read, without any model in the loop.

Part of the 2suite.io privacy-first ecosystem of free browser tools.

Frequently Asked Questions

Is 2prompt free?

Yes. The generator, the stack library, the converter and the linter are free to use with no account, no limits and nothing to install. The files you generate are yours to commit to any project, commercial or not.

Is anything I type sent to a server?

No. Everything runs in your browser. The form, the files and anything you paste into the linter are never uploaded or stored. The generator form is kept only in the address bar after the #, which browsers do not send to servers.

Does 2prompt collect any analytics?

Yes, one anonymous page-view count when a page loads, before you can type anything. If you submit the feedback form, your vote and comment are sent too. No analytics event is attached to the form, the generated files or anything you paste.

Does 2prompt use AI to write the files?

No. The files come from deterministic templates, so the same answers always produce the same files and nothing is sent to a model. That is also why the tool is free to run and works offline once the page has loaded.

Which file should I commit?

Commit AGENTS.md as the source of truth, plus the wrapper for each tool your team uses. If nobody uses Gemini CLI, skip GEMINI.md. Keep the wrappers thin so you only ever edit AGENTS.md.

Will Claude Code read AGENTS.md on its own?

Recent versions can, but by default only when there is no CLAUDE.md or CLAUDE.local.md. The generated CLAUDE.md imports AGENTS.md with the @AGENTS.md line, which works on every version and keeps both files in sync.

How long should AGENTS.md be?

As short as it can be while still giving exact commands and checkable rules. Claude Code documentation suggests under 200 lines for CLAUDE.md, and Codex reads at most 32 KiB of project instructions by default.

Can I edit the generated files by hand?

Yes. They are plain Markdown. Edit AGENTS.md for shared changes and leave the wrappers as pointers, then paste the result into the linter to catch contradictions or vague rules you added.

Was this helpful?