AgentAPIGate
2026 Agent Repository Specification · Context Budget Architecture

CLAUDE.md vs AGENTS.md vs SKILL.md: Complete 2026 Specification & Matrix

Architectural Summary (BLUF)

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.

01 / Side-by-Side Specification & Context Economics

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%.

DimensionCLAUDE.mdAGENTS.mdSKILL.md (.claude/skills/*)
Primary Standard & ReadersAnthropic 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 FrontmatterNone (plain Markdown; frontmatter adds noise)None (plain Markdown headings & command lists)Required: name (<=64c lowercase/hyphens) + description (<=1024c)
Context Loading RuleEagerly loaded in full at session initializationEagerly loaded from repo root + nearest subdirectoryProgressive 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 preferencesBuild, test, typecheck commands, directory layout, code styleDomain workflows, POST /v1/invoke recipes, validation scripts
Live External API PatternNever inline raw schemas; point to SKILL.md or MCPDocument env var name ($AGENTAPIGATE_API_KEY) onlyBind scoped aag_agent_* sub-key ($1-$5/day cap) or Streamable MCP
Primary Spec · agentskills.io/specification
“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.

Primary Spec · agents.md
“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.

02 / Interactive 3-File Scaffolder + Live cURL

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.

Interactive 3-File Repo & Skill Bundle Builder

Generate Matched CLAUDE.md + AGENTS.md + SKILL.md

Startup Context: ~350 tok (vs 5,400+ tok monolith)
1. Primary Stack
2. Active Coding Agents in Repo
3. On-Demand Live Data Capabilities (Isolated in SKILL.md)
4. Scoped Sub-Key Daily Ceiling (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).
Tested Stateless Endpoint Call (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"}'
Includes $0.25 free sandbox + scoped aag_agent_* daily budget sub-keys.Get $0.25 Free Sandbox & Scoped Key → Run in 10s

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.