CLAUDE.md vs AGENTS.md vs SKILL.md: Complete 2026 Specification & Matrix
CLAUDE.md is Claude Code’s always-loaded workspace memory (plain Markdown, zero frontmatter, read in full at session start). AGENTS.md is the vendor-neutral repository contract natively read by Cursor, OpenAI Codex, Windsurf, and Aider using nearest-directory monorepo inheritance (zero frontmatter). .claude/skills/<name>/SKILL.md is a progressive-disclosure capability module governed by agentskills.io: mandatory YAML name and description frontmatter keeps idle cost near ~50 tokens until a matching task triggers full Markdown and external API execution.
Loading Lifecycle, YAML Rules & Per-Turn Token Tax
Dumping external REST schemas or scraping scripts into root CLAUDE.md or AGENTS.md charges 5,000+ input tokens on every turn. Separating universal repo conventions from progressive-disclosure skills and remote Streamable HTTP MCP cuts idle context waste by 92%.
| Dimension | CLAUDE.md | AGENTS.md | SKILL.md (.claude/skills/*) |
|---|---|---|---|
| Primary Standard & Readers | Anthropic Claude Code CLI & IDE (supports @path imports) | Vendor-neutral standard (Cursor, Codex, Windsurf, Aider, Amp) | Agent Skills Spec (Claude Code, Cursor Skills, Codex, OpenClaw) |
| YAML Frontmatter | None (plain Markdown; frontmatter adds noise) | None (plain Markdown headings & command lists) | Required: name (<=64c lowercase/hyphens) + description (<=1024c) |
| Context Loading Rule | Eagerly loaded in full at session initialization | Eagerly loaded from repo root + nearest subdirectory | Progressive disclosure: ~50 tok metadata at start; body on trigger |
| 20-Turn Session Token Cost | ~24,000 tok if 1,200-tok file; 100,000+ tok if bloated with APIs | ~24,000 tok across 20 turns (always in system context) | ~1,000 tok across 20 turns when idle; body loaded only when needed |
| What Belongs Inside | @AGENTS.md bridge + Claude-specific slash/worktree preferences | Build, test, typecheck commands, directory layout, code style | Domain workflows, POST /v1/invoke recipes, validation scripts |
| Live External API Pattern | Never inline raw schemas; point to SKILL.md or MCP | Document env var name ($AGENTAPIGATE_API_KEY) only | Bind scoped aag_agent_* sub-key ($1-$5/day cap) or Streamable MCP |
“Each skill directory must contain a SKILL.md file with YAML frontmatter defining a lowercase hyphenated name (up to 64 characters matching the parent directory) and a concise description (up to 1,024 characters) used for progressive capability discovery.”
Source: Agent Skills Specification (agentskills.io). Because only frontmatter loads initially, you can ship 15 specialized data skills in one monorepo for ~750 total startup tokens.
“AGENTS.md is a simple, open, plain-Markdown format for guiding coding agents — acting as a README for agents with predictable build steps, test commands, and project conventions without proprietary frontmatter.”
Source: AGENTS.md Open Format (agents.md). Bridge Claude Code to it in one line with @AGENTS.md inside CLAUDE.md.
Build Your Repository’s CLAUDE.md, AGENTS.md & SKILL.md Bundle
Select your stack, active coding agents, live data capabilities, and daily sub-key cap below to generate a zero-duplication 3-file configuration bundle plus a tested stateless POST /v1/invoke command.
Generate Matched CLAUDE.md + AGENTS.md + SKILL.md
aag_agent_*)@AGENTS.md ## Claude Code Session Rules - Shared build/test commands inherit from `@AGENTS.md` (0 duplicate maintenance across claude-code, cursor, codex). - Keep root memory under 80 lines. External data schemas live in `.claude/skills/agentapigate-data/SKILL.md` (progressive disclosure: ~48 tokens at startup). - Credential boundary: read `$AGENTAPIGATE_API_KEY` (`aag_agent_*`, max `$5.00/day`, `$0` charged on non-200/empty).
web.extract.markdown · $0.001)curl -sS -X POST https://api.agentapigate.ai/v1/invoke \
-H "Authorization: Bearer ${AGENTAPIGATE_API_KEY:-aag_agent_your_scoped_subkey}" \
-H "Content-Type: application/json" \
-d '{"capability":"web.extract.markdown","params":{"url":"https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"},"format":"json"}'aag_agent_* daily budget sub-keys.Get $0.25 Free Sandbox & Scoped Key → Run in 10sFrequently Asked Questions
What is the architectural difference between CLAUDE.md, AGENTS.md, and SKILL.md?
CLAUDE.md is Claude Code workspace memory loaded in full at session startup (plain Markdown, zero YAML frontmatter). AGENTS.md is the vendor-neutral repository contract read natively by Cursor, OpenAI Codex, Windsurf, and Aider. SKILL.md (.claude/skills/<name>/SKILL.md) is an on-demand capability module with mandatory YAML name and description frontmatter so only ~50 tokens load until triggered.
Why does putting external API schemas inside CLAUDE.md or AGENTS.md hurt coding accuracy and token budgets?
Every line inside root CLAUDE.md or AGENTS.md is billed on every single turn of the conversation. Pasting 30 REST endpoints or OpenAPI blocks burns 5,000+ input tokens per turn even when fixing a CSS typo. Isolating external data APIs inside SKILL.md or mounting https://mcp.agentapigate.ai/mcp (~363 schema tokens) cuts baseline context overhead by over 90%.
How do I share one repository rule set across Claude Code, Cursor, and Codex without duplicating files?
Keep build, lint, test, and architecture rules in root AGENTS.md, then place "@AGENTS.md" at the top of CLAUDE.md (or symlink CLAUDE.md -> AGENTS.md), while keeping heavy domain workflows inside .claude/skills/*/SKILL.md.
How should SKILL.md authenticate to external data APIs safely?
Reference an environment variable holding a scoped aag_agent_* sub-key configured with read_only=true and a hard daily USD ceiling (such as $1/day or $5/day) via POST https://api.agentapigate.ai/v1/invoke, rather than exposing an uncapped master billing credential.