AGENTS.md Generator

Generator / Guides / AGENTS.md vs CLAUDE.md

AGENTS.md vs CLAUDE.md

AGENTS.md is the shared instruction file for many coding agents. CLAUDE.md is the file Claude Code has always read. You can use either, or keep one source of truth and point the other at it.

What Claude Code reads

According to the Claude Code documentation, Claude reads AGENTS.md when there is no CLAUDE.md in the working directory or any directory above it. If both exist, it reads the CLAUDE.md files only.

A subfolder AGENTS.md is loaded when Claude works with files in that folder and the folder has no CLAUDE.md of its own.

Keep one shared file

If your repository also has a CLAUDE.md, create a CLAUDE.md next to AGENTS.md that starts with a line containing @AGENTS.md, then add any Claude specific instructions below it. Claude reads the imported file first.

A symlink from CLAUDE.md to AGENTS.md also works, but it does not suit Windows checkouts, where Git may turn a committed symlink into a plain text file.

Size matters for both

The same guidance applies to either file: aim for under 200 lines, group instructions under clear headings and avoid conflicting rules.

Generate either format

The generator exports the same selection as AGENTS.md, CLAUDE.md, a Cursor rule file or GitHub Copilot instructions, so you can switch format without redoing your choices.

Generate your AGENTS.md

More guides