Skip to content
Agents tracked: 258 Downloads (7d): 219M up 6.1% GitHub stars: 5.5M VS Code installs: 148M Releases (7d): 327 Agent status: 1 with issues Updated Oct 7, 2026

AI agent config files: AGENTS.md, CLAUDE.md, Cursor rules and the rest

Every coding agent reads a project instructions file before it starts: your commands, conventions and limits. Here is which file each of 25 agents reads, where it goes, and templates you can copy. From each tool's official documentation, checked Oct 7, 2026.

One file for every agent

  1. Write your shared instructions in AGENTS.md at the repository root. 22 of the 25 tools below read it.
  2. For Claude Code, add a CLAUDE.md whose first line is @AGENTS.md. Claude Code skips AGENTS.md when a CLAUDE.md exists, and this import brings it back.
  3. For Gemini CLI, add AGENTS.md to context.fileName in its settings. Aider needs --read AGENTS.md.
  4. Keep tool-specific extras (Cursor .mdc rules, Copilot applyTo files) small and only for what one tool needs.

Which file each agent reads

Open a tool for details, the global file and a template.

AgentProject fileGlobal fileReads AGENTS.md
CLAUDE.md ~/.claude/CLAUDE.md and ~/.claude/rules/*.md ✓ Yes, from v2.1.277, but by default only when the project has no CLAUDE.md (change it in /…
AGENTS.md ~/.codex/AGENTS.md (or AGENTS.override.md) in $CODEX_HOME ✓ Native format.
.cursor/rules/*.mdc User Rules in Cursor settings (stored in the app, not a file); Team Rules from the dashboard on Team and Enterprise plans ✓ Yes, at the root and in subfolders.
.github/copilot-instructions.md Personal and organization instructions on GitHub.com; in VS Code, instruction files in your profile ✓ Yes. In VS Code it is the chat.useAgentsMdFile setting; nested AGENTS.md files are expe…
GEMINI.md ~/.gemini/GEMINI.md – Only if you add it: set context.fileName in settings.json, e.g. `["AGENTS.md", "GEMINI.…
.windsurf/rules/*.md ~/.codeium/windsurf/memories/global_rules.md (one file, always on) ✓ Yes.
.clinerules/ ~/Documents/Cline/Rules (Windows: Documents\Cline\Rules); ~/.agents/AGENTS.md for cross-tool rules ✓ Yes, in the project and ~/.agents/AGENTS.md.
.roo/rules/ ~/.roo/rules/ and ~/.roo/rules-<mode>/ ✓ Yes, on by default (setting roo-cline.useAgentRules).
CONVENTIONS.md — – Not automatically according to Aider's docs; load it with --read AGENTS.md.
.rules The Rules Library (in the app); rules marked Default go into every new thread ✓ Yes, but only if none of the higher-priority files exists.
.junie/AGENTS.md ~/.junie/AGENTS.md ✓ Yes.
.kiro/steering/*.md ~/.kiro/steering/ ✓ Yes, always included.
AGENTS.md ~/.config/amp/AGENTS.md or ~/.config/AGENTS.md ✓ Native format.
.continue/rules/ — ✓ The source code loads a root AGENTS.md as an always-on rule; the docs don't mention it ye…
AGENTS.md / .goosehints ~/.config/goose/.goosehints ✓ Yes, by default.
AGENTS.md ~/.config/opencode/AGENTS.md (falls back to ~/.claude/CLAUDE.md) ✓ Native format.
AGENTS.md instructions in ~/.config/kilo/kilo.jsonc ✓ Yes, always loaded; the agent needs your approval to edit it.
.augment/rules/ ~/.augment/rules/ ✓ Yes (and CLAUDE.md).
AGENTS.md ~/.factory/ ✓ Native format.
QWEN.md ~/.qwen/QWEN.md ✓ Yes, it reads an existing AGENTS.md too.
AGENTS.md Global Rules in Warp Drive (not a file) ✓ Yes, the default.
AGENTS.md Devin CLI: ~/.config/devin/AGENTS.md; cloud Devin uses Knowledge in the app ✓ Native format.
AGENTS.md — ✓ Yes, the only instruction file it documents.
replit.md — – Not mentioned in Replit's docs.
CRUSH.md / AGENTS.md ~/.config/crush/CRUSH.md and ~/.config/AGENTS.md ✓ Yes; /init creates AGENTS.md by default.

Templates to copy

Starting points written by us; replace the commands and folders with yours.

AGENTS.md for a TypeScript projectAGENTS.md
# AGENTS.md

## Project
One paragraph: what this repository does and who uses it.

## Commands
- Install: `pnpm install`
- Dev server: `pnpm dev`
- Tests: `pnpm test` (run before you finish)
- Lint and types: `pnpm lint && pnpm typecheck`

## Layout
- `src/app/`: routes and pages
- `src/lib/`: shared logic, no UI code
- `tests/`: mirrors `src/`

## Conventions
- TypeScript strict mode; avoid `any`.
- Follow the patterns already in `src/` before adding new ones.
- Small, focused functions; name things for what they do.

## Boundaries
- Never read or edit `.env*` files or commit secrets.
- Ask before adding a dependency or changing a public API.

## Done means
Tests pass, lint is clean, and the change is explained in the PR description.
AGENTS.md for a Python projectAGENTS.md
# AGENTS.md

## Project
One paragraph: what this package does.

## Commands
- Set up: `uv sync`
- Tests: `uv run pytest -q`
- Lint and format: `uv run ruff check . && uv run ruff format .`
- Types: `uv run mypy src`

## Conventions
- Python 3.12; type hints on every public function.
- Use `pathlib`, f-strings and dataclasses; no new global state.
- Tests live in `tests/` and name the behaviour they check.

## Boundaries
- Don't touch `migrations/` without asking.
- Never print or log secrets; config comes from environment variables.
Nested AGENTS.md in a monorepopackages/api/AGENTS.md
# API package

Applies to everything under `packages/api/`, on top of the root AGENTS.md.

- Run `pnpm --filter api test` instead of the full test suite.
- Handlers live in `src/routes/`, one file per resource.
- Validate every request body with the schemas in `src/schemas/`.
- Database access only through `src/db/`; no raw SQL in handlers.
CLAUDE.md that reuses AGENTS.mdCLAUDE.md
@AGENTS.md

## Claude Code
- For changes that touch several files, outline the plan first and wait for a go-ahead.
- After editing, run the test command from AGENTS.md and fix failures before you stop.
Claude Code rule for one part of the code.claude/rules/api.md
---
paths:
  - "src/api/**/*.ts"
---

# API rules
- Every endpoint validates its input and returns typed errors.
- Add or update the matching test in `tests/api/`.
Claude Code permissions (from the official docs).claude/settings.json
{
  "$schema": "https://json.schemastore.org/claude-code-settings.json",
  "permissions": {
    "allow": [
      "Bash(npm run lint)",
      "Bash(npm run test *)"
    ],
    "deny": [
      "Read(./.env)",
      "Read(./.env.*)"
    ]
  }
}
Cursor rule for React components.cursor/rules/react-components.mdc
---
description: Conventions for React components
globs: src/components/**/*.tsx
alwaysApply: false
---

- Function components with named exports.
- Props type named `<Component>Props`, declared above the component.
- Styling with the existing Tailwind classes; no inline style objects.
- Each new component gets a test next to it.
Repository instructions for GitHub Copilot.github/copilot-instructions.md
This is a Next.js app written in TypeScript.

- Build with `pnpm build`; test with `pnpm test`.
- Put shared logic in `src/lib/`, never in components.
- Prefer server components; add "use client" only when needed.
- In pull requests, explain the why, and list anything that still needs a human check.
Copilot instructions for test files only.github/instructions/tests.instructions.md
---
applyTo: "**/*.test.ts,**/*.spec.ts"
---

- Use Vitest's `describe` and `it`.
- One behaviour per test, named after the behaviour.
- Mock network calls; never call real APIs from tests.
Codex instruction settings~/.codex/config.toml
# Folders without AGENTS.md: read these names instead
project_doc_fallback_filenames = ["TEAM_GUIDE.md", ".agents.md"]
# Raise the 32 KiB cap on combined instructions
project_doc_max_bytes = 65536
Make Gemini CLI read AGENTS.md.gemini/settings.json
{
  "context": {
    "fileName": ["AGENTS.md", "GEMINI.md"]
  }
}
Windsurf rule for test files.windsurf/rules/tests.md
---
trigger: glob
globs: "**/*.test.ts"
---

- Use the helpers in `tests/utils/`; don't build fixtures by hand.
- Each test checks one behaviour.
Kiro steering file for the API.kiro/steering/api-standards.md
---
inclusion: fileMatch
fileMatchPattern: "src/api/**/*.ts"
---

# API standards
- REST resources are plural nouns; errors use the shared error type.
- Every endpoint has an integration test.
Always load conventions in Aider.aider.conf.yml
read:
  - AGENTS.md
  - CONVENTIONS.md
Extra instruction files in OpenCodeopencode.json
{
  "instructions": ["CONTRIBUTING.md", "docs/guidelines.md", ".cursor/rules/*.md"]
}

What to put in it

Commands

How to install, run, test and lint. Agents run these to check their own work, so exact commands matter most.

Layout and conventions

Where things live and the patterns to follow. Point to an example file rather than describing a style at length.

Boundaries

What not to touch (secrets, migrations, generated code), when to ask first, and what "done" means.

What is AGENTS.md?

An open, plain-Markdown file at the root of a repository that tells coding agents how to work on the project: commands, layout, conventions and limits. It is stewarded by the Agentic AI Foundation under the Linux Foundation, and 22 of the 25 tools on this page read it.

Should I use AGENTS.md or CLAUDE.md?

Write the shared instructions once in AGENTS.md. Claude Code reads AGENTS.md only when there is no CLAUDE.md, so if you also need Claude-specific notes, create a CLAUDE.md whose first line is @AGENTS.md: Claude Code imports the file, and the other agents keep reading AGENTS.md directly.

Where do Cursor rules go?

In .cursor/rules/ as .mdc files with front matter (description, globs, alwaysApply). Plain .md files in that folder are ignored; Cursor also reads AGENTS.md.

How long should an instructions file be?

Short enough to read in a minute. Claude Code's docs suggest under about 200 lines per CLAUDE.md, Cursor suggests under 500 lines per rule, and Codex stops reading at 32 KiB of combined instructions by default.