AI Coding · Rules File

What Are AGENTS.md and CLAUDE.md?
The Rules Files You Write for AI Coding Tools

What is AGENTS.md? It's a rules file you write for AI coding tools. When you use tools like Claude Code, Codex, or Cursor, they read the project's AGENTS.md before they get to work and treat what's inside as "the rules this project must follow."

It's just an ordinary Markdown file that lives in the project's root directory. The one Claude Code reads is usually called CLAUDE.md, and it does the same job—telling the AI what the project is, what tech it uses, what it can do, and what it should leave alone.

So if you notice a new AGENTS.md or CLAUDE.md in a project, don't panic. It isn't code—it's a plain-language "project briefing," except this time the reader happens to be an AI.

If you're not even clear on what the md format itself is, read What Is Markdown first—this article will go more smoothly after that.

What AGENTS.md and CLAUDE.md actually are

  • In one line: standing instructions you write ahead of time for AI coding tools. Every time one gets to work, it reads this file first and follows it.
  • Format: plain text plus Markdown syntax, with the .md extension—written the same way as a README.
  • Location: by convention it sits in the project's root directory, and the filename is usually all caps (AGENTS.md / CLAUDE.md).
  • How it differs from typing in the chat box: what you type in the chat box only applies that one time; rules written into AGENTS.md are "long-term memory" that takes effect every time, so you don't have to repeat yourself.

Why this file is suddenly popping up everywhere

More and more people have been using AI to write code in recent years. Tools like Claude Code, Codex, and Cursor can read your project and edit your files directly, but at first they have no idea about the particulars of your project.

So people realized: instead of repeating "we use TypeScript, write commit messages in English, don't touch that config" at the start of every new conversation, it's better to put it in a fixed file and let the tool read it itself.

That's how AGENTS.md and CLAUDE.md came about. They're not some newly invented, mysterious format—they're just an "I can't be bothered to say it every time, so I'll write it down" memo—the only twist is that the audience is an AI tool rather than a teammate.

Where you'll run into AGENTS.md / CLAUDE.md

Situation What you'll see
You ask an AI coding tool to set up a project for you It may go ahead and generate an AGENTS.md or CLAUDE.md, filling in the project structure and conventions
You clone someone else's open-source repo There's an AGENTS.md in the root—the project rules the author left for the AI (and for you)
A tool prompts you to "create a rules file" For example, Claude Code will suggest you write a CLAUDE.md so it understands your project better
Someone on your team already set it up A rules file written by someone else, handed to you along with the project

Filename cheat sheet: which tool reads which

Different tools recognize slightly different filenames. Here are a few common ones—always defer to the official docs of the tool you're actually using, since this area changes fast.

Filename Roughly who it's for In one line
AGENTS.md A fairly universal convention, supported by a growing number of AI coding tools (like Codex) Use it when you want one set of instructions that "most agents can read"
CLAUDE.md Claude Code The project memory Claude Code reads before every task
.cursorrules / .cursor/rules/ Cursor Cursor's project rules
.github/copilot-instructions.md GitHub Copilot Copilot's project-level instructions

You don't need to create all of them. Just write the one that matches the tool you use; some tools can also read the general-purpose AGENTS.md.

What's usually inside, and how to read it

Open up an AGENTS.md and the content usually centers on a few areas. You don't have to read it word for word—skim it against the table below and you'll know what the author is laying out.

Section What it usually says You read it to learn
Project overview What the project is, what tech stack it uses Figure out in one line what the project does
How to run it Commands for installing, starting, building, and testing How to get it running once you take it over
Code conventions Naming style, directory structure, which libraries to use What rules to follow when you change things
What not to do Which files not to touch, which patterns not to use Which areas are landmines that cause problems if you touch them
Other context Business background, past decisions, things to watch out for Where the AI (and you) are likely to trip up

The trick to reading it: start with "Project overview" to confirm it's what you want, then read "What not to do" to avoid the landmines; save the rest for when you actually start working. It's a reference, not an article you have to read in one sitting.

It's not the same thing as README.md or plan.md

These three files look alike, but they serve different purposes—don't mix them up.

  • README.md: the project's manual, mainly for people—what it is, how to install it, how to use it. See What Is README.md for details.
  • plan.md: a plan document the AI drew up and generated for you on a particular occasion, recording "how this task is going to be done." See How to Read Codex plan.md for how to read it.
  • AGENTS.md / CLAUDE.md: the standing rules you write for AI coding tools, read before every task to constrain how they work.

The simple split: README is for people, plan is a one-off plan, and AGENTS.md is the rules that stay in effect for the long term.

Open your local AGENTS.md with NoteLoom

Whether this file was generated by an AI or you're writing it yourself, once it lands on your disk it's just a local .md file. NoteLoom is an editor that reads and writes local md files right in the browser, which makes it a good fit for opening AGENTS.md.

Let's be clear about the boundaries up front: NoteLoom has no AI whatsoever, and it doesn't integrate with Claude Code, Codex, or Cursor. It won't write rules for you, won't summarize, won't understand your project, and certainly won't carry out what's in AGENTS.md. All it does is let you open this file, read it clearly, edit it, and save it back to your disk.

It gives you three views for reading the same file:

View How it helps you read / edit AGENTS.md
reading Renders the rules file as formatted text so you can read it calmly and see how many sections there are and what each covers (read-only, can't edit)
live Edit while seeing the formatting—handy for adding a line to a rule or tweaking a command
source See the raw Markdown symbols—use it when you want to check that lists and code blocks are written correctly

Here's roughly how you use it:

  1. Open app.noteloom.cc in Chrome, Edge, or Arc.
  2. Select the local folder that contains AGENTS.md (NoteLoom has to mount a folder before it can read or write).
  3. Open AGENTS.md or CLAUDE.md from the file tree.
  4. Use the reading view to see the formatting first; switch to live or source when you want to edit.
  5. When you're done, it writes straight back to the original local file—no account involved, nothing goes to the cloud.

How to write AGENTS.md: a good-enough example

No need to overcomplicate it. A first version that clearly covers "what the project is, how to run it, and what not to touch" is plenty. Here's what good-enough looks like:

# AGENTS.md

## What this project is
A personal blog written in Astro, deployed on Cloudflare Pages.

## How to run it
- Install dependencies: npm install
- Local preview: npm run dev
- Build: npm run build

## Rules to follow when writing code
- Use TypeScript, don't use any
- Put components in src/components/, one component per file
- Write commit messages in English, one line that clearly says what changed

## What not to do
- Don't change the deployment config in src/config.ts
- Don't write secrets into the code

A few key points:

  • Use plain language, don't pile on jargon. It should be something both people and the AI can understand.
  • Write down specific conventions that are easy to get wrong, like "write commit messages in English" or "don't touch that config file"—these are far more useful than a vague "keep the code clean."
  • Keep it short—ideally readable within a screen or two; if it's too long, both the AI and you will tend to skip it.
  • To get symbols like #, -, and code blocks right, see How to Write Markdown.

While writing, just use the live view to type and watch the formatting at the same time; what you type and which rules you set are entirely up to you—NoteLoom won't generate anything for you, it has no AI.

Common pitfalls

  • Opening it in Notepad shows a pile of # and -: that's just unrendered text, not a broken file. Switch to an editor that can display Markdown formatting and it'll look fine.
  • Assuming only programmers need to deal with it: you'll run into it even if you don't write code—ask an AI to build a little tool or organize a project for you, and it may create one. Just read it as a project briefing.
  • Writing it too long and exhaustive: a rules file that runs hundreds of lines is one neither the AI nor you will bother reading. Write down just the few most important, most error-prone points.
  • Assuming the tool will follow it strictly: AGENTS.md is a "strong suggestion," not a hard lock. The AI will generally take it into account, but there's no guarantee it follows every line, so review the important changes yourself.
  • Expecting NoteLoom to understand or execute it for you: it won't. NoteLoom only opens, reads, edits, and saves this local file—it doesn't connect to any AI tool and doesn't run the rules inside.

FAQ

What's the difference between AGENTS.md and CLAUDE.md?
They do the same job—both are standing rules files written for AI coding tools—and the difference is mainly in the filename convention. CLAUDE.md is the name Claude Code tends to read; AGENTS.md is a more general convention that an increasing number of tools support. Whichever tool you use, create the matching file according to that tool's docs.
Does AGENTS.md have to go in the project root directory?
By convention it goes in the project root, where tools find it most easily. Some tools also support putting it in a subdirectory, where it applies to that part of the code. Defer to the docs of the tool you use, but the root directory is the safest bet.
I don't write code—do I need to deal with AGENTS.md?
You might. When you ask an AI to build a little tool or organize a project for you, it may generate one. You don't necessarily need to know how to program—just read it as a "project briefing" to learn what the project is and what not to touch, and that's enough.
Are AGENTS.md and README.md the same thing?
No. README.md is mainly for people—it explains what the project is and how to install and use it; AGENTS.md / CLAUDE.md is mainly for AI coding tools, the rules they follow before every task. The two can exist side by side, each handling its own job.
Will AI coding tools always follow AGENTS.md strictly?
No guarantee. It's a strong suggestion, not a hard lock; tools will generally take the rules into account, but won't necessarily follow every one. It's safer to review the important changes yourself.
Can NoteLoom auto-generate or summarize AGENTS.md for me?
No. NoteLoom has no AI features whatsoever—it won't auto-write, won't auto-summarize, and doesn't connect to Claude Code, Codex, or Cursor. It gives you the reading / live / source views; how the rules are written and edited is up to you, and it only opens, displays, and saves the file back to your disk.
Can I open AGENTS.md with NoteLoom on my phone or in Safari?
Not for now. NoteLoom relies on the browser's File System Access API, which currently works in Chromium-based desktop browsers like Chrome, Edge, and Arc; Firefox, Safari, and mobile aren't supported yet.

Open up your AGENTS.md and take a look

Mount your project folder in NoteLoom, use the reading view to read AGENTS.md clearly, and switch to live to edit and save it back to your disk—no software to install and no account to sign up for.

Open NoteLoom and try it