Guides · Updated October 26, 2026

AGENTS.md vs CLAUDE.md vs SKILL.md vs Cursor rules

By Tineessa Nelson, Use This Skill

AGENTS.md, CLAUDE.md and Cursor rules are standing instructions: the agent reads them at the start of every session, so they hold the facts about your project it always needs. A SKILL.md is a packaged procedure: the agent sees only its description until a task matches, then loads the full file. AGENTS.md is read by Codex, Cursor and, since v2.1.277, Claude Code.

Which file does each agent read?

The four files do overlapping jobs, and the agents read them differently. This table is from each tool's documentation, read on October 26, 2026.

AGENTS.md CLAUDE.md Cursor rules SKILL.md
What it is Plain Markdown instructions for any coding agent Claude Code's project instructions Cursor's project, user and team rules One skill: instructions plus optional scripts and reference files
Where it lives Repository root and subfolders ./CLAUDE.md or ./.claude/CLAUDE.md, plus ~/.claude/CLAUDE.md .cursor/rules/*.mdc .claude/skills/<name>/ or .agents/skills/<name>/
When it loads Every session Every session; subfolder files when the agent reads files there Depends on the rule: always, by file pattern, by description, or when mentioned Description always; the full file only when used
Codex Yes Only if you add it as a fallback filename No Yes, from .agents/skills
Claude Code Yes, when there is no CLAUDE.md (v2.1.277 and later) Yes No Yes, from .claude/skills
Cursor Yes, root and subfolders Not mentioned in its rules docs Yes Yes, including .claude/skills and .codex/skills

The short version: if you use more than one agent, put the shared project rules in AGENTS.md, keep tool-specific settings in CLAUDE.md or Cursor rules, and move long, task-specific procedures into skills.

How do skills in the wild use these files?

We checked the skills in the Use This Skill directory to see how the two kinds of file meet in practice. Of the 1,051 skills whose full SKILL.md text we hold (the crawl of October 26, 2026, out of 2,056 listed), 40 skills from 9 repositories mention CLAUDE.md, AGENTS.md or Cursor rules by name. Most of them do one of three things:

What the skill does with the file Example in the directory
Reads it first for the project's standards The game-studio skills from Donchitos/Claude-Code-Game-Studios, such as code-review, read CLAUDE.md for the project's coding standards
Writes to it, so a decision is not asked again setup-ts-deep-modules adds a pointer to CLAUDE.md if present, otherwise AGENTS.md; two Next.js adoption skills, after asking, run a step that writes a docs index into AGENTS.md
Steps aside for it using-superpowers says user instructions in CLAUDE.md, AGENTS.md or GEMINI.md take precedence over skills

That pattern matches how the documentation divides the work. The instruction file holds facts about this project; the skill holds a way of working that can travel between projects, and it looks up the project's facts when it runs. Only one skill in the set mentions a Cursor rules file, and none of the 2,056 listed skills lives in a .cursor/skills folder: 83 sit in .claude/skills and 11 in .agents/skills, with the rest in other folders of their repositories.

What does AGENTS.md do?

AGENTS.md is a plain Markdown file with no required fields. Codex builds its instructions from it: a global file in ~/.codex, then one file per directory from the repository root down to where you are working, joined in that order so that "files closer to your current directory override earlier guidance." Codex stops adding files at 32 KiB by default (project_doc_max_bytes), and an AGENTS.override.md in a directory replaces that directory's AGENTS.md.

Cursor reads AGENTS.md in the project root and in subfolders; nested files combine with their parents, and the more specific instructions win. Claude Code reads it too, with the conditions in the next section.

What does CLAUDE.md do, and does Claude Code read AGENTS.md?

CLAUDE.md is where Claude Code keeps instructions you would otherwise repeat: build commands, conventions, project layout. Files in your working directory and the folders above it load at launch; files in subfolders load when Claude reads files there. The documentation suggests keeping each file under 200 lines, because "longer files consume more context and reduce adherence." Instructions that matter only for some files can go in .claude/rules/ with a paths field, so they load only when Claude touches a matching file.

Since v2.1.277, Claude Code can read AGENTS.md without an import. The default is either-or:

Your repository has Claude Code reads
AGENTS.md and no CLAUDE.md or CLAUDE.local.md AGENTS.md
AGENTS.md and a CLAUDE.md or CLAUDE.local.md CLAUDE.md only
A CLAUDE.md that imports @AGENTS.md Both, through the import

Two details catch people. Adding a personal CLAUDE.local.md to a project that relies on AGENTS.md stops Claude Code from reading AGENTS.md, unless you set Project instructions to claude-md-and-agents-md in /config. And Claude Code does not read AGENTS.override.md or anything under .agents/, which Codex does use. Articles written before that version may still tell you Claude Code ignores AGENTS.md.

What are Cursor rules?

Cursor has three kinds of rules besides AGENTS.md. Project rules live in .cursor/rules and must use the .mdc extension; a plain .md file there is ignored. Each rule's front matter decides when it applies:

Front matter When the rule is used
alwaysApply: true Every chat
globs set When a matching file is in context
description set When the agent judges it relevant
Neither Only when you @-mention it

User rules apply across all your projects, and team rules are managed from the dashboard on Team and Enterprise plans. When rules conflict, team rules come first, then project rules, then user rules. Cursor suggests keeping each rule under 500 lines.

What makes SKILL.md different?

A skill is a folder with a SKILL.md file and anything it needs: scripts, templates, reference files. Claude Code, Codex and Cursor all follow the Agent Skills open standard, so one folder works in all three. The difference from the other three files is when it costs context:

  • Claude Code keeps every skill's description in context and loads the body only when the skill is used; the description and when_to_use text are cut at 1,536 characters in the listing.
  • Codex shows skill names and descriptions in a list capped at 2% of the model's context window by default, then reads the full SKILL.md when it picks one.
  • Cursor shows the agent the available skills and lets it decide from each description.

Our own proofs show what that loading costs. In the tdd proof of October 24, 2026, the same brief used 302 input tokens without the skill and 2,914 with it, so loading the skill added about 2,600 tokens to each of the three runs. An instruction file pays a cost like that in every session; a skill pays it only on the tasks that need it. That is why the Claude Code documentation suggests turning a section of CLAUDE.md into a skill once it "has grown into a procedure rather than a fact."

How should I split my instructions?

Put it in When it is
AGENTS.md A fact every agent needs, every session: build and test commands, project layout, conventions
CLAUDE.md or .claude/rules/ Something only Claude Code needs, or a rule for certain paths
.cursor/rules/*.mdc Something only Cursor needs, or a rule tied to file patterns
A skill A multi-step procedure for one kind of task, which you may want in other projects too

All four are instructions your agent will follow with your permissions, so read any you did not write. Before you install a skill, paste its GitHub link into the live skill check; every listed skill is also scanned weekly, as explained in Are agent skills safe?. For when a skill should hand work to a subagent instead, see Skills vs subagents vs slash commands, and for skills tested side by side, browse the proven skills.

Directory counts are from the October 26, 2026 crawl in data/skills.json; token counts are from the tdd proof in data/proofs.json. Agent behavior is from the Claude Code, Codex and Cursor documentation linked below, read on October 26, 2026.

Questions

Does Claude Code read AGENTS.md now?

Yes, from Claude Code v2.1.277. By default it reads AGENTS.md only when there is no CLAUDE.md, .claude/CLAUDE.md or CLAUDE.local.md in your working directory or above it. Set Project instructions to claude-md-and-agents-md in /config to have it read both.

Should I keep both an AGENTS.md and a CLAUDE.md?

Only if they say different things. The simplest setup for a team using several agents is one AGENTS.md with the shared rules, plus a CLAUDE.md that imports it with @AGENTS.md and adds anything specific to Claude Code.

What about the old .cursorrules file?

Cursor's rules documentation, read on October 26, 2026, describes project rules in .cursor/rules as .mdc files, user rules, team rules and AGENTS.md, and does not mention a root .cursorrules file. New rules belong in .cursor/rules.

Can a SKILL.md replace my CLAUDE.md or AGENTS.md?

No. A skill loads only when its task comes up, so facts the agent needs in every session, such as build commands and project layout, belong in the instruction file. A long procedure that only matters for one kind of task is a good candidate to move into a skill.