CLAUDE.md example
Context
Claude Code looks for CLAUDE.md. Cursor looks for AGENTS.md. You want both tools to follow one set of rules.
The problem
A full copy of the rules in both files drifts. Every chat then pays to read two versions that disagree.
What you do
CLAUDE.md contains one import, @AGENTS.md. Add a line under it only when Claude Code needs something Cursor does not.
What this achieves
Both tools read the same brief. A change to the rules happens in one place.
Who reads it
Claude Code reads CLAUDE.md from the repo root. An @path line pulls that file into the same instructions. Cursor does not need this file if AGENTS.md is already there.
What it is for
Keep one copy of the rules. CLAUDE.md points at AGENTS.md and adds a note only when Claude Code needs something the other tools do not.
If the same rule is written in both files, they drift, and every chat pays to read both.
What goes in
- The import line @AGENTS.md.
- A short Claude-only note, if you truly have one.
Sample
CLAUDE.md
@AGENTS.md
# Claude Code only
Add a note here only when Claude Code needs something Cursor does not.
Do not copy the rules from AGENTS.md into this file.What stays out
- A paste of AGENTS.md.
- Tool-specific rules that belong in .cursor/rules/.
Before launch, run the Vibe Coding Security Checklist. These files do not replace that audit. Open the Vibe Coding Security Checklist.
