On this page
Claude Code Skills, Cursor Rules, AGENTS.md: AI Agent Config
This guide breaks down the three dominant AI agent configuration formats: AGENTS.md, CLAUDE.md, and Cursor rules. It explains why a layered architecture with AGENTS.md as the cross-tool source of truth minimizes duplication, cuts token costs, and improves agent reliability for engineering teams using multiple AI coding tools.
Your AI coding agent is only as good as the instructions it reads. That’s the uncomfortable truth most teams discover after their third tool migration, when they realize they’ve been maintaining five copies of the same conventions in five different formats. The configuration layer — the markdown files, rules, and skills sitting next to your code has become the real differentiator in 2026, and the landscape is more fragmented than it needs to be.
Three formats dominate: AGENTS.md as the cross-tool open standard, CLAUDE.md as Claude Code’s native memory system, and .cursor/rules/*.mdc as Cursor’s glob-scoped rule engine, per the Claude Code skills vs Cursor rules comparison. Each solves a different layer of the problem. Choosing wrong means duplicated work, context bloat, and agents that ignore your conventions within weeks.
The Three Layers of Agent Configuration
AGENTS.md is a Linux Foundation-hosted open standard under the Agentic AI Foundation, read natively by 20+ coding agents including Codex, Cursor, Copilot, Gemini CLI, Aider, Windsurf, and Zed, and adopted by 60,000+ open-source repositories as of mid-2026, per the AGENTS.md guide. It’s plain Markdown with no required fields, placed at the repository root, serving as a cross-tool “README for agents.” Think of it as the vendor-neutral baseline: one file, every tool.
CLAUDE.md is Anthropic’s native configuration format for Claude Code, offering richer features than AGENTS.md including a 3-layer memory model, permission controls (allow/ask/deny in settings.json), and support for hooks, subagents, and skills, per Claude’s steering documentation. It loads at session start and stays in context for the entire conversation, which means every line costs tokens whether relevant or not.
The modern Cursor format is .cursor/rules/*.mdc using YAML frontmatter with glob-scoped activation and per-rule size limits of approximately 2,000 tokens, per the 2026 comparison. The legacy .cursorrules file is deprecated. Rules load only when matching files are touched, which makes them far more token-efficient than always-on formats.
Here’s the critical insight: these aren’t competitors. They’re layers. The 2026 best practice for multi-tool teams is a layered architecture: AGENTS.md as the canonical cross-tool source of truth, with CLAUDE.md and .cursor/rules serving as thin tool-specific adapters, and Skills for reusable workflows, per Gen α AI.
How Claude Code Skills Differ from Cursor Rules
Claude Code Skills are reusable, task-specific packages (SKILL.md) that load progressively when invoked, support chaining across projects, and can execute arbitrary bash commands and tool integrations, per Claude Code Guides. A skill’s name and description load at session start, but the full body only loads when the skill is invoked — subject to a shared token budget across all invoked skills.
Cursor Rules are persistent project instructions loaded per-request (auto or manual), with glob-based activation that only consumes tokens when matching files are touched, and manual activation via @rules reference, per Claude Code Guides. A rule scoped to src/api/**/*.ts won’t consume context when you’re editing a React component.
The architectural difference is fundamental. Skills are procedural — they encode how to do something, like a release checklist or a deployment workflow. Rules are declarative — they encode constraints that should always apply within a scope, like “all API handlers must validate input with Zod.”
Claude Code provides seven methods for instructing behavior: CLAUDE.md files, rules, skills, subagents, hooks, output styles, and appending the system prompt, each with different loading times, compaction behavior, and context costs, per Claude’s steering documentation. Subagents run in isolated context windows with zero cost in main context until called, while hooks fire on lifecycle events and bypass compaction entirely.
Cursor 3.8, released June 18, 2026, introduced a /automate skill that builds automation configurations from plain-language descriptions, plus six new trigger types including Slack emoji reactions and GitHub event types, per Pondero. This blurs the line between Cursor and Claude Code’s automation models, but the underlying config formats remain distinct.
The Context Budget Problem Nobody Talks About
Here’s where things get expensive. According to HumanLayer research, frontier LLMs reliably follow roughly 150-200 instructions, and Claude Code’s system prompt already burns about 50 of them, leaving a budget of 100-150 instructions for user-defined rules. Every line of your AGENTS.md, CLAUDE.md, and .cursor/rules files spends from that budget every single turn.
Chroma’s context-rot study of 18 frontier models across 194,480 API calls showed uniform degradation as input grows, meaning long context does not prevent config bloat from causing instruction adherence rot. A 2,000-line AGENTS.md doesn’t just waste tokens — it actively makes your agent less reliable.
Only Claude Code and Cursor enforce permissions first-party, per Gen α AI. AGENTS.md prose is advisory unless the consuming tool backs it with a runtime hook. This means your carefully written “never modify production database” instruction in AGENTS.md is a suggestion to most tools, not a hard boundary.
The practical implication: keep your root AGENTS.md under 200 lines. Push tool-specific constraints into native formats where they can be enforced. Use subdirectory-level AGENTS.md files in monorepos so the agent only reads what’s relevant to the package being edited.
Pricing Reality Check for Config-Heavy Workflows
Configuration choices have direct cost consequences in 2026’s usage-based billing landscape. Cursor Teams pricing is $40/user/month. Claude Max plans are $100/month for 5x Pro usage or $200/month for 20x Pro usage. Cursor Pro includes $20 of API agent usage, Pro+ includes $70, and Ultra includes $400, with daily agent users typically needing $60-$100/month total and power users $200+/month, per Spectrum AI Lab.
A 50-developer team using Cursor Teams would cost $24,000/year in subscriptions alone (50 × $40 × 12). That’s before token overages, which is where config bloat hits your wallet directly. Every unnecessary line in a rules file that loads every turn is burning tokens you’re paying for.
This is why the layered architecture matters financially, not just organizationally. A lean AGENTS.md that every tool reads natively, supplemented by thin native adapters, costs less to operate than maintaining five separate full-length config files. Teams running both Cursor and Claude Code — which, according to our Cursor vs Claude Code comparison, is most professional teams — should treat config standardization as a cost-control measure.
For a deeper breakdown of how these pricing models interact with real-world usage patterns, see our AI coding tools cost analysis.
What the Data Actually Shows About Productivity Gains
Vendor marketing consistently claims 3x or higher productivity gains for their AI coding tools. The reality is more modest. DX research across 400+ engineering organizations tracking velocity over 14 months shows a median PR throughput gain of just 7.76%, with most teams landing in the 5-15% range.
That’s not nothing — a 7.76% throughput gain across a 50-engineer team is meaningful. But it’s nowhere near the order-of-magnitude gains promised by vendors, and it suggests that the quality of your configuration layer matters more than which tool you pick. A well-configured agent on a “worse” model will outperform a poorly configured agent on a “better” one, because instruction adherence is the bottleneck.
This aligns with what we’ve found in our GitHub Copilot vs Cursor vs Claude Code comparison: the tool matters less than how well you’ve set it up.
The Recommended Setup for 2026
For teams running multiple AI coding tools, here’s the configuration stack that minimizes duplication while preserving each tool’s native strengths:
Layer 1 — AGENTS.md (repo root): Project overview, build/test commands, code style, security boundaries, commit/PR guidelines. Keep it under 200 lines. This is every agent’s first read.
Layer 2 — Thin native adapters:
CLAUDE.mdfor Claude Code: permission controls, hooks, subagent definitions, and any Claude-specific steering that can’t be expressed in AGENTS.md prose..cursor/rules/*.mdcfor Cursor: glob-scoped rules that activate only when relevant files are touched, keeping context costs low.
Layer 3 — Skills and subagents: Reusable, task-specific packages (SKILL.md) for procedural workflows like releases, deployments, and code audits. These load on demand and can be shared across projects.
Layer 4 — MCP and hooks: Live data access and deterministic automation. These live outside the main context window and don’t compete for instruction budget.
The key discipline: AGENTS.md is the single source of truth. Native adapters re-export and extend it with tool-specific features — they don’t duplicate it. When you update a convention, you update AGENTS.md and the change propagates to every agent reading the repo.
The Uncomfortable Question
AGENTS.md was supposed to eliminate configuration fragmentation. Instead, most teams now maintain AGENTS.md plus CLAUDE.md plus .cursor/rules — a third mandatory layer on an already crowded config stack. The standard solved the “five different filenames” problem but not the “three copies of the same content” problem.
The teams that handle this best treat agent configuration like any other infrastructure: versioned, reviewed, and audited for bloat. They measure token consumption per config file. They set CI checks that flag when AGENTS.md exceeds a line count threshold. They understand that every line they add is a line their agent has to process on every single turn, across every tool, for every engineer on the team.
Your agent’s configuration files are not documentation. They’re a control plane with a hard resource constraint. The question isn’t which format to adopt — it’s how disciplined you are about what you put in it.