ProfessorGPTProfessorGPT
Reference

SKILL.md vs CLAUDE.md vs AGENTS.md: what's the difference?

These three files get lumped together, but they solve different problems: two load every session, one loads on demand. Here's how SKILL.md, CLAUDE.md, and AGENTS.md actually differ — and why most projects use more than one.

5 min read Updated Oct 15, 2026 Intermediate
§1The key split

Why these three get confused

Search for AI coding config and you'll hit SKILL.md, CLAUDE.md, and AGENTS.md side by side, as if you must pick one. You don't — they aren't three rivals for the same slot.

The split that matters is about loading:

  • CLAUDE.md and AGENTS.md are the same category — always-on project instructions, loaded at the start of every session. (Gemini's GEMINI.md belongs here too.)
  • SKILL.md is a different mechanism — an on-demand capability that loads only when a task matches it.
  1. Session startsCLAUDE.md · AGENTS.md · GEMINI.mdloaded in fullalways-on
  2. Session startsevery skill's name + description~100 tokens eachalways-on
  3. A task matches a skillthat SKILL.md's bodyloaded nowon demand
  4. The instructions need morescripts/ · references/ · assets/only if usedon demand
Fig. 1 — When each file reaches the model: context files load in full at session start; a skill's body waits for a matching task.

Once you see that two of them are always on and one is on demand, the "vs" mostly dissolves.

§2What each one is

What each one is

SKILL.md

SKILL.md is the entry point of an Agent Skill: a folder with a SKILL.md file — YAML frontmatter with a name and description, then Markdown instructions — plus optional scripts/, references/, and assets/. Anthropic released the format as an open standard on December 18, 2025; it's specified at agentskills.io and read by Claude Code, Codex, Gemini CLI, Antigravity, GitHub Copilot, Cursor, and many more.

It loads through progressive disclosure: only each skill's name and description sit in context up front; the full body loads when the task matches; bundled files open only if the instructions reach for them. So a skill costs almost nothing until it's used — and unlike the other files, it can ship runnable scripts.

CLAUDE.md

CLAUDE.md is Claude Code's instructions file: build and test commands, conventions, "always do X" rules that Claude reads at the start of every session. It can live in the project (./CLAUDE.md or ./.claude/CLAUDE.md), in your home folder (~/.claude/CLAUDE.md), or in an organization-wide managed location. Files in the directories above your working directory load at launch; ones in subdirectories load when Claude starts working there. Anthropic suggests keeping each file under about 200 lines — and it's guidance, not enforcement: use hooks and permissions for hard rules.

AGENTS.md

AGENTS.md is a tool-agnostic open format — a "README for agents" at the repo root. It's now stewarded by the Agentic AI Foundation under the Linux Foundation and used by more than 60,000 open-source projects. Codex, GitHub Copilot's coding agent, Cursor, Jules, Aider, Zed, Warp, VS Code, and many others read it; in a monorepo, the AGENTS.md closest to the edited file wins.

GEMINI.md

GEMINI.md is Gemini CLI's context file — the Gemini equivalent of CLAUDE.md, loaded from ~/.gemini/GEMINI.md and from your workspace and its parent folders. Gemini CLI reads AGENTS.md too if you add it to the context.fileName setting.

Claude Code now reads AGENTS.md

Since v2.1.277, Claude Code reads a repository's AGENTS.md as its project instructions when there's no CLAUDE.md in your working directory or above it. Have both? By default it reads only CLAUDE.md — set Project instructions to load both, or keep an @AGENTS.md import inside your CLAUDE.md.

§3Side by side

Comparison table

DimensionSKILL.mdCLAUDE.mdAGENTS.md
LoadingOn demand — only name + description up frontAlways on — every sessionAlways on — every session
ScopeOne reusable capabilityThe whole project, for Claude CodeThe whole project, for any agent
Read byClaude Code, Codex, Gemini CLI, Antigravity, Copilot, Cursor, and moreClaude CodeCodex, Copilot, Cursor, Gemini CLI (when configured), Claude Code (when no CLAUDE.md), and more
Location~/.claude/skills/, ~/.agents/skills/, ~/.gemini/skills/, project folders./CLAUDE.md, ./.claude/CLAUDE.md, ~/.claude/CLAUDE.md, managed policyRepo-root AGENTS.md; nested files in monorepos, closest wins
Can bundle scriptsYes — scripts/, references/, assets/NoNo
Best forSpecialized procedures you need sometimesAlways-needed Claude Code facts and rulesAlways-needed repo facts, portable across agents
§4Decide

Which one when

A quick decision guide:

  • Facts every session needs — build commands, conventions, architecture, hard constraints? Use an always-on file. Want it portable across agents? Write AGENTS.md. Claude Code-only team? CLAUDE.md is the native path, and an AGENTS.md now works there too.
  • A multi-step procedure you need only sometimes — a release checklist, a migration runbook, a formatter with a helper script? Make it a skill so it loads on demand and costs nothing the rest of the time.
  • Long reference material that would bloat every session? Put it in a skill's references/, not in CLAUDE.md or AGENTS.md.
  • Something that must never be skipped? None of these files enforce anything. Reach for hooks and permissions.

Anthropic's own guidance puts it well: keep CLAUDE.md to facts Claude should hold in every session, and move procedures into skills.

§5Together

Use them together

They're complementary, not either/or. A healthy setup looks like:

  • AGENTS.md (or CLAUDE.md) for the always-on baseline: how to build, test, and lint; naming conventions; "never touch these files" rules.
  • Skills for the specialized jobs: generating a changelog, running a data migration, scaffolding a component — each with its own instructions and optional scripts.

One repo, every agent

Put the baseline in AGENTS.md and your team's skills in .agents/skills/. Codex reads both as-is. Gemini CLI reads the skills folder, and AGENTS.md once you add it to context.fileName. Claude Code reads AGENTS.md when there's no CLAUDE.md, and takes its copy of the skills from .claude/skills/.

§6Build one

Create your skill by tool

Start with the Agent Skills pillar, then follow the guide for your agent:

Ready to build one? Use the Skill Builder to generate a working SKILL.md, or browse skills to see real examples.

Right file, right job

  • Always-needed facts → AGENTS.md or CLAUDE.md
  • Occasional procedures → a skill
  • Long references → a skill's references/
  • Hard rules → hooks and permissions
  • Mixed-agent team → AGENTS.md plus .agents/skills/

Frequently asked questions

Is SKILL.md a replacement for CLAUDE.md or AGENTS.md?+
No. CLAUDE.md and AGENTS.md are always-on project instructions loaded every session, while SKILL.md is an on-demand skill loaded only when a task matches it. Most projects use an always-on file for baseline context and skills for specialized tasks.
What's the difference between CLAUDE.md and AGENTS.md?+
They're the same category — always-on repo instructions. AGENTS.md is a cross-tool open format read by Codex, Copilot, Cursor, and many other agents; CLAUDE.md is Claude Code's own file, with extras like user-level and organization-wide locations.
Does Claude Code read AGENTS.md?+
Yes, since v2.1.277. Claude Code reads AGENTS.md as the project instructions when there's no CLAUDE.md in your working directory or above it. With both present it reads only CLAUDE.md by default; set Project instructions to load both, or import AGENTS.md with @AGENTS.md inside your CLAUDE.md.
Why is SKILL.md cheaper on tokens than CLAUDE.md?+
SKILL.md uses progressive disclosure: only the skill's name and description sit in context up front, and the full body loads when a task matches. CLAUDE.md is loaded every session, so everything in it always consumes context.
Can AGENTS.md or CLAUDE.md bundle scripts like a skill can?+
No. AGENTS.md and CLAUDE.md are plain instruction files. A skill is a folder that can bundle runnable scripts, reference docs, and assets alongside its instructions, which the agent loads only when needed.
Which should I use for build and test commands?+
An always-on file: AGENTS.md if you want portability across agents, or CLAUDE.md if you're Claude Code-only. Save skills for multi-step procedures you invoke only sometimes.
What about GEMINI.md?+
GEMINI.md is Gemini CLI's always-on context file — the Gemini equivalent of CLAUDE.md, loaded from ~/.gemini/GEMINI.md and your workspace. Gemini CLI also reads AGENTS.md if you add it to the context.fileName setting.

Build your skill now

Generate a standard SKILL.md in seconds — no YAML by hand.