Minimal AGENTS.md Template
A lean AGENTS.md that works across Codex, Cursor, Copilot, and Gemini CLI: setup, verification, and the rules agents break most.
# AGENTS.md ## Setup ```bash [INSTALL COMMAND, e.g. pnpm install] [ENV SETUP, e.g. cp .env.example .env] ``` ## Verify your changes Run these before finishing any task: a task is not done if any of them fail: ```bash [TYPECHECK COMMAND] [TEST COMMAND] [LINT COMMAND] ``` ## Project rules - [MOST IMPORTANT CONSTRAINT, e.g. "All API routes must validate input with zod schemas in lib/schemas."] - [SECOND, e.g. "Never import server-only modules into client components."] - [THIRD, e.g. "Database changes require a migration file, never edit the schema directly."] ## Code style - [LANGUAGE + STRICTNESS, e.g. "TypeScript strict mode; explicit return types on exported functions."] - Match the style of surrounding code over any general convention. ## Boundaries Never touch without being explicitly asked: [e.g. `migrations/`, `*.gen.ts`, `.github/workflows/`, anything in `vendor/`]. ## When unsure Prefer asking over assuming for: deleting files, changing public APIs, adding dependencies, and anything touching [SENSITIVE AREA, e.g. billing/auth].
How to use
Save as AGENTS.md in your repo root. The format is an open standard read by Codex, Cursor, Copilot, Gemini CLI, and 20+ coding agents, no frontmatter or required fields, just Markdown. In monorepos, add nested AGENTS.md files per package; agents use the closest one to the file being edited. If you also use Claude Code, make CLAUDE.md a one-line import: '@AGENTS.md'. Lead with verification commands: they're the highest-leverage lines in the file.
More agent prompts
You are a software engineering agent working in the [PRODUCT/TEAM] codebase ([LANGUAGE/STACK]). Your objective is to take an assigned task from description to verified, working code. You may read and modify anything in the repository; you do not push, merge, deploy, or alter CI configuration unless the task explicitly says to. # Operatin
Coding Agent System Prompt
Autonomous coding agent that matches repo conventions, proves work with passing tests before claiming done, and reports failures truthfully.
You are a debugging agent for the [PRODUCT] codebase. Your objective is to find the root cause of a reported bug, fix it with the smallest possible change, and prove the fix. You are not here to refactor, harden, or improve unrelated code: a debugging session that ends in a 40-file diff has failed even if the bug is gone. # Reproduce Bef
Debugging Agent System Prompt
Root-cause-first debugging agent: no fix until the bug is reproduced, minimal diffs only, and done means the repro dies while the test suite stays green.
You are a code migration agent. Your objective is to move the [PRODUCT] codebase from [SOURCE VERSION/FRAMEWORK] to [TARGET VERSION/FRAMEWORK] while preserving behavior exactly. You are a mechanical translator with judgment, not a redesigner: the product must work the same after every step you take. # The Prime Rule: Migration Changes On
Code Migration Agent System Prompt
Framework-upgrade agent that migrates in build-green slices, verifies every codemod, follows official guides over memory, and never mixes in behavior changes.