AGENTS.md: One File of Instructions for Every AI You Use
I use Claude, ChatGPT and a few AI helpers that do tasks for me. They all follow the same rules about how I write, what they may do and which of my notes to read. That’s because the rules live in one file on my computer, called AGENTS.md.
The steps to set up your own are at the end of this post.
What AGENTS.md is
AGENTS.md is a short note written for AI. It sits in the folder where you keep your work. Before an AI does anything for you, it reads this note first.
The note tells the AI who you are, how you like to work and the rules it must follow. It also tells the AI which of your other files to read for each kind of job.
The .md at the end of the name means it’s a Markdown file. That’s plain text, like a note you’d type in any notes app, with a few symbols for headings and lists. Any AI can read it. What is a Markdown file? shows how to make and open one.
I didn’t make up the name. Many AI tools already agree on AGENTS.md and look for a file with that name on their own.
I organize my own folder in a way I call the Human Stack. In it, AGENTS.md is the first file any AI opens, and it points the AI to the rest of my notes.
Why one file, not two
Claude works differently. It looks for a file with its own name, CLAUDE.md, in the same folder. So the easy thing is to keep two files with the same rules in both, one for Claude and one for everything else.
That works until you change a rule. You update one file and forget the other. Now Claude follows one set of rules and ChatGPT follows another, and nothing warns you.
It happened to me. The folder that builds this website had both files, and they disagreed about how blog posts should be named. I only noticed while writing this post. I’ve fixed it now, with the two lines below.
The fix is two lines in CLAUDE.md
Keep all your rules in AGENTS.md. Then make CLAUDE.md a tiny file that sends Claude there. It holds only these two lines.
Read AGENTS.md in full before starting any task, and follow it.
@AGENTS.md
The first line is a plain instruction. Any AI that reads CLAUDE.md can follow it and open AGENTS.md. The second line is a shortcut that Claude Code, the version of Claude made for working with files, understands. It pulls in AGENTS.md automatically. You don’t need to know which version of Claude you use. Keep both lines, and every version gets your rules.
I started with only the shortcut line. In June I tested it, and the Claude app on my computer ignored it. Every chat in that app had been starting without my rules, and nothing looked broken. Adding the plain sentence fixed it. Anthropic, the company that makes Claude, recommends the same two-file setup in its own instructions.
I’m not proud of the next part. After I found that gap, it took me seven weeks to fix my own file. I’d written the lesson down and never gone back to change the file.
You may read online about making CLAUDE.md a “symlink”, a kind of shortcut file. I tried that first. It works on a Mac, but it often breaks on Windows computers and in cloud folders like OneDrive, so I don’t teach it.
Check that it works
If you ask an AI whether it read your file, it may say yes even when it didn’t. So ask it to show you.
Open a new chat in your folder. Before you give it any task, ask it to quote one of your rules from AGENTS.md, word for word. If it quotes the rule, it’s working. If it can’t, or the words are a bit different, the file isn’t reaching it.
What to put in AGENTS.md
The AI reads AGENTS.md at the start of every chat. The longer it gets, the easier it is for the AI to miss a rule. So keep it to rules that apply every time.
Mine covers how I write, what an AI may and may not do for me, and which files to read for each kind of work. Everything else lives in other files that AGENTS.md points to.
Someone in one of my programs had their AI suggest a long list of extra rules. The list said what to do when two of their notes disagree. It looked thorough, but it would almost never be used. One plain sentence does the job.
If I ask for something different in our conversation, do that. This file is the default.
If an AI starts ignoring your rules late in a long chat, adding more rules won’t help. Start a new chat, and the AI reads the file again from the top.
If your AI app can’t open your folder
Some AI apps can open a folder on your computer. Others can’t, so you paste text in instead. If you’re not sure which kind you have, ask it: “Can you open and read files in a folder on my computer?”
Most AI chat apps also let you group chats into a project. A project has a box for instructions that apply to every chat in it.
If the app can open your folder, put this one line in that box.
Read AGENTS.md in the attached folder before any work, and follow it.
Don’t paste the whole file in. A pasted copy is a second copy, and it goes out of date the moment you change the real one.
If the app can’t open your folder, paste what’s in AGENTS.md into that box instead. Each time you change AGENTS.md, paste it again.
Why your rules belong in your own folder
This month I told a group of coaches, “The gold shouldn’t stay in AI. We want that gold to live in your vault because that’s yours that you can take anywhere.” By gold I meant what you’ve built while working with AI, like your rules and your notes. Your vault is the folder where you keep them.
I call my approach Human-First AI. The human is the source, and the AI is the amplifier. You decide how AI works with you. If your rules live in one company’s settings page, they stay behind when you switch tools, and you start again.
In AGENTS.md they live in a file you own, next to the rest of your notes. It’s the same reason I keep my notes as plain files in Obsidian, the notes app I use. I explain why in why Obsidian is my second brain for AI. When I moved from ChatGPT to Claude, my notes came with me because they were in my files. AGENTS.md does the same for my rules.
Set it up
If you don’t have a folder for your work yet, start with Set Up Your Human Stack. One prompt builds the folder and writes AGENTS.md and CLAUDE.md for you. If you have a folder already, follow these steps.
- Ask your AI to create a file called AGENTS.md at the top of the folder you work from. You can also make it yourself in any plain text app.
- Write your rules in it. Start with how you like to write and what an AI must never do for you.
- Look in the same folder for a file called CLAUDE.md. If it has rules in it, move them into AGENTS.md. If there’s no CLAUDE.md, create one.
- Make CLAUDE.md hold only these two lines.
Read AGENTS.md in full before starting any task, and follow it.
@AGENTS.md
- If your AI app can open your folder, put the one-line pointer in your project’s instructions box. If it can’t, paste the contents of AGENTS.md into that box instead.
- Open a new chat and ask it to quote one rule from AGENTS.md.
If it can’t quote the rule, check that both files sit at the top of the same folder. Open the folder in your AI app again. Then try once more in a new chat.
Write your rules once, in a file you own, and let every AI read them from there.
FAQ
What is AGENTS.md?
AGENTS.md is a short note written for AI. It sits in the folder where you keep your work and tells any AI who you are, how you work and which files to read first. Many AI tools look for it on their own.
Does Claude read AGENTS.md?
Claude Code, the version of Claude made for working with files, can read AGENTS.md on its own, but only when the folder has no CLAUDE.md. The setup that works in every version is a CLAUDE.md with two lines: a sentence telling Claude to read AGENTS.md, then @AGENTS.md.
Should I make CLAUDE.md a symlink to AGENTS.md?
A symlink works on a Mac, but it often breaks on Windows computers and in cloud folders like OneDrive. A two-line CLAUDE.md that points to AGENTS.md works on any computer.
What should go in AGENTS.md?
Only the rules that apply every time, such as how you write, what an AI may and may not do for you, and which files to read for each kind of work. Keep everything else in other files that AGENTS.md points to.
