Home / Compare / agents.md vs cursor rules

agents.md vs cursor rules — what goes where in 2026

Two markdown files that look similar, ship next to each other, and shape what your AI coding agent does. Here is how to choose between them, when to use both, and how to migrate.

The short version

What loads where

ToolReads agents.mdReads .cursorrulesWins on conflict
CursorYes (since 2025)Yes.cursorrules
Codex CLIYesNo
AiderYes (via CONVENTIONS.md path)No
ClineYesNo
Claude CodeYes (as a fallback)NoCLAUDE.md wins
WindsurfPartialNo

Where each one belongs

Pick by your audience.

Use agents.md when

Use .cursorrules when

Migration: .cursorrules to agents.md

Most .cursorrules files port directly. The notable differences:

The reverse migration (agents.md → .cursorrules) is rarely worth doing.

Both at the same time

Yes, you can ship both. A common pattern in 2026:

repo-root/agents.md            # source of truth, ~200 lines
.cursorrules         # one line: "See agents.md."
CLAUDE.md            # one line: "See agents.md." + Claude Code-specific overrides

This way Cursor users get redirected to the canonical doc. Claude Code users get their own pointer. Codex/Aider/Cline users hit agents.md directly.

When neither is enough

If the agent is doing something repeatable — a multi-file refactor, a migration, a code review — neither file format helps. That's what skills and workflows are for. agents.md and .cursorrules describe how the agent should behave in general; skills describe specific procedures.

Browse MDs

Last updated: 2026-04-25.