facebook pixel
Skip to content

workflowContext Engineering4 min read

AGENTS.md — One File, Every Agent

Our take
The open standard that makes your project context portable across Claude Code, Cursor, Codex, Copilot, and 20+ other agents. Write it once, every agent reads it.

A simple AGENTS.md at the root of your repo gives every coding agent the same project-specific instructions. Donated by OpenAI to the Linux Foundation's Agentic AI Foundation in December 2025, it's now the cross-tool standard with adoption in 60,000+ open-source projects.

On this page10 parts
  1. 01The Problem
  2. 02What It Is
  3. 03What to Include
  4. 04What to Cut
  5. 05Example
  6. 06AGENTS.md and CLAUDE.md Together
  7. 07Why This Matters for Senior Teams
  8. 08Where It Fits in the Stack
  9. 09When Not to Use It
  10. 10Source

The Problem

CLAUDE.md works great — until your team has one engineer on Cursor, another on Codex, a third on Claude Code, and a fourth experimenting with Gemini CLI. Each tool reads its own context file (.cursorrules, .github/copilot-instructions.md, CLAUDE.md, GEMINI.md), so the same project ships with four near-duplicate files that drift out of sync within a sprint. New engineers don't know which one is canonical. Conventions silently diverge by tool.

AGENTS.md collapses that mess into one file every agent reads.

What It Is

A plain markdown file at the repo root. Same idea as CLAUDE.md, same style — but every major agent now reads it natively or via fallback: Claude Code, Cursor, GitHub Copilot, OpenAI Codex, Gemini CLI, Windsurf, Devin, Factory, Aider, Zed, Warp, Jules, Amp, RooCode. If you use more than one agent in a year, AGENTS.md is the file you actually want to maintain.

OpenAI donated AGENTS.md to the Agentic AI Foundation (opens in a new tab) in December 2025, alongside Anthropic's MCP and Block's goose. It's a Linux Foundation-backed open standard, not a vendor format.

What to Include

Same discipline as CLAUDE.md — the cheat sheet for an engineer who already knows how to code. Common sections:

  • Setup — install, env vars, ports, anything non-obvious to bootstrap the repo
  • Build & test commands — exact commands to type-check, lint, run unit tests, run e2e
  • Code style — module system, import aliases, linter rules the agent must respect
  • Conventions — branch naming, commit format, PR rules, where new files go
  • Anti-patterns — "never use X, always use Y" — the highest-ROI lines you'll write
  • Security & secrets — what's in .env.example, what must never be committed

What to Cut

Don't paste in framework docs. Don't write "follow best practices." Don't auto-generate the file with an LLM and call it done — a March 2026 ETH Zurich study (opens in a new tab) found that LLM-generated AGENTS.md files often hurt agent performance more than they help. Write yours by hand, keep it short, and only include what the agent can't infer from the code.

Example

markdown
# Stack
- React Router v7, TypeScript strict, Tailwind CSS
- Node >= 24.0.0, npm
- Notion as the data store (no Prisma in production)
# Commands
- `npm run dev` — dev server on :3000
- `npm run typecheck` — type check only
- `npm run test` — Vitest
- `npm run validate` — full check before PR
# Conventions
- ES modules only — no `require`
- Use the `~/` alias for `app/`, never relative paths
- Server-only files end in `.server.ts`
- Form submissions go to Notion via `app/models/Lead.server.ts`
# Anti-patterns
- Never use `React.FC` — typed function components only
- Never use `any` — fix the type or use `unknown`
- Never commit `.env` — update `.env.example` instead
- Never auto-generate this file — keep it hand-written and short
# PRs
- Conventional Commits: `feat(scope): …`
- Run `npm run validate` before pushing
- Keep diffs reviewable — split unrelated work into separate PRs

AGENTS.md and CLAUDE.md Together

You don't have to pick one. The pattern most senior teams settle on:

  • AGENTS.md holds shared, tool-agnostic context — stack, commands, conventions, anti-patterns. Every agent reads it.
  • CLAUDE.md holds Claude-specific instructions only — slash command preferences, plan-mode behavior, Claude Code skills your team uses. Claude Code reads both.
  • Other tools fall back to AGENTS.md and ignore the rest.

If you have an existing CLAUDE.md, the migration is one move: rename the universal parts to AGENTS.md, leave a thin Claude-only CLAUDE.md (or delete it).

Why This Matters for Senior Teams

  • One source of truth across agents.No more .cursorrules drift versus CLAUDE.md drift. The same conventions apply whether the next PR comes from Claude Code, Cursor, or Codex.
  • Onboarding is instant.A new engineer on any agent gets the same project guardrails on day one.
  • Standards survive tool churn.When a better agent ships next quarter, your context already works. No rewrite.
  • Reviewable in PRs.AGENTS.md changes go through code review like any other artifact. Drift is visible.

Where It Fits in the Stack

  • Pairs with Spec Kit.AGENTS.md sets the project-wide rules; /speckit.constitution adds principles per-feature. Together they cover global and local context.
  • Pairs with skills.AGENTS.md tells the agent what to do; skills (figma-to-code, webapp-testing, sentry-code-review) tell it how. Reference your installed skills in AGENTS.md so any agent knows to use them.
  • Pairs with worktree tooling.Each worktree inherits the same AGENTS.md, so parallel agents stay consistent.

When Not to Use It

If you only use one agent and have no plans to switch, a tool-specific file (CLAUDE.md, .cursorrules) is fine — AGENTS.md adds zero value over what you already have. The standard earns its keep when more than one agent reads the same repo, or when you expect to switch tools within the next year. For most teams in 2026, that's everyone.

Private Workshop

Want to bring AI into your Frontend workflow?

We help product teams adopt AI-powered development practices, from agent workflows to custom skills and tooling, on whichever coding agent they already run.

What happens next
  1. 01

    Tell us what you are building.

    Your stack, the AI tools you use, where you are stuck.

  2. 02

    We book a 15-minute call.

    We look at how your team works with agents today.

  3. 03

    We shape the workshop.

    Private and hands-on, on your own codebase.

0/2000

Your info stays with us. That's it.