Keeping AGENTS.md, CLAUDE.md, and Cursor Rules in Sync A developer documented how coding agents load repository instruction files, showing that Codex applies a 32 KiB cumulative cap across the entire AGENTS.md directory chain, Claude Code expands @path imports in full at session start, and Cursor loads .mdc rules conditionally via globs. The writeup recommends treating AGENTS.md as the single source of truth, importing it from CLAUDE.md, and pushing situational workflows into glob-scoped rules or SKILL.md files to avoid silent truncation and token bloat. If you run Claude Code in the terminal while someone else opens the same repository in Cursor or Codex, instruction files drift apart fast. Copy-pasting a 400-line style guide into every tool's config file doesn't just double your maintenance. Depending on the client, it can silently truncate nested package rules or add thousands of static tokens to every turn. Here is how each instruction format actually loads, three traps worth avoiding, and a minimal layout that keeps one source of truth. AGENTS.md CLAUDE.md @AGENTS.md import plus Claude-only notes .cursor/rules/ .mdc globs rules that shouldn't load globally SKILL.md | File | Read by | Loading behavior & budget | |---|---|---| | AGENTS.md | Codex, Cursor, Windsurf, Cline | Loaded along directory chain root - cwd ; 32 KiB cumulative cap in Codex | | CLAUDE.md | Claude Code | Loaded in full at session start @path imports expand immediately | | .cursor/rules/ .mdc | Cursor v0.45+ | Loaded conditionally when active files match YAML globs | | SKILL.md | Claude Code, Codex, Goose | Progressive disclosure: only name + description ~50 tokens load until triggered | OpenAI Codex walks from ~/.codex/AGENTS.md to your repo root AGENTS.md and down to your current working directory. By default, project doc max bytes is 32,768 bytes 32 KiB across that entire chain , not per file. If your root AGENTS.md is a 28 KiB architecture essay, a package-specific packages/api/AGENTS.md deeper in the tree gets truncated or dropped without a loud warning. Keeping root AGENTS.md under ~150 lines of concrete build, lint, and test commands leaves plenty of room for subdirectory overrides. @path imports in A common assumption in Claude Code is that splitting a large CLAUDE.md into imports like this keeps the context window lean: @docs/architecture.md @docs/coding-standards.md It helps human readability, but it does not defer loading. Claude Code expands @path imports into the session context at launch. If a rule only applies to database migrations or API routes, put it in path-scoped rules .claude/rules/ .md or .cursor/rules/ .mdc or an on-demand SKILL.md instead of importing it into root CLAUDE.md . Agent Skills validate YAML frontmatter strictly: name : 1–64 characters, lowercase alphanumeric and single hyphens only ^ a-z0-9 + - a-z0-9 + $ , and it db-check/SKILL.md - name: db-check description : 1–1,024 characters stating both If name has uppercase letters, underscores, or doesn't match the folder name, the agent skips it silently. Instead of hand-editing the same rules in three places: Project Instructions @AGENTS.md Claude Code Notes - Run /clear between unrelated tasks to avoid re-caching long threads. CLAUDE.local.md gitignored . src/components/ / .tsx . Most instruction drift comes from treating AGENTS.md and CLAUDE.md as separate documents. Pick AGENTS.md as the base, import it from CLAUDE.md , and push situational workflows out to skills or glob-scoped rules. If you want to check byte budgets or generate the boilerplate files side by side, there's a small browser-based linter and converter https://findaitier.com/agents-md-vs-claude-md/ and a set of MIT starter templates on GitHub https://github.com/BeyenAI/agents-md-claude-md-templates . Related: Why Your MCP Config Works in Cursor but Not in VS Code https://dev.to/beyenai/mcp-config-schema-differences-in-2026-claude-code-mcpservers-vs-vs-code-vscodemcpjson-1pg6 How are you organizing repo instructions when teammates use different coding agents?