How to Use the AGENTS.md Generator: Step by Step
Reviewed by the OnlineFree.app team · Updated
Key points
- An AGENTS.md file is plain markdown at the repo root that tells coding agents how your project is built, tested and constrained.
- The AGENTS.md Generator needs only three inputs: project name, tech stack and one rule per line.
- Anything in parentheses or after a # in your rules is trimmed, so rephrase rules whose details matter.
- Keep generated files around 120 lines or fewer, because every line costs tokens on every agent turn.
- Generated commands are inferred from your stack string, so verify them by running them once before committing.
What is an AGENTS.md file?
An AGENTS.md file is a plain-markdown instruction file that lives at the root of a repository and tells a coding agent how the project is built, tested and constrained before it touches any code. It is not configuration and not a dependency — the agent simply reads it as context at the start of a session.
The format has no frontmatter and no required schema. In practice a useful file has four parts: an H1 with the project name, a one-line overview, a stack section, and a commands section with the exact build, dev and test lines. Rules come last. The AGENTS.md Generator produces exactly that structure from three fields.
The convention is documented at agents.md, and individual tools describe their own reading order — Claude Code, for example, documents how it loads project instruction files in the Anthropic Claude Code docs. If your agent has its own docs, check them; the reading order and supported filenames are set by the tool, not by the convention.
How to use the AGENTS.md Generator step by step
Open the AGENTS.md Generator — it is a single screen with three inputs and no signup. Fill them in this order: project name, tech stack, rules.
1. Project name: type the repo name, e.g. `acme-dashboard`. It becomes the H1 and the one-line summary, and it also drives the download filename (kebab-cased, falling back to `AGENTS` if the field is empty).
2. Tech stack: free text or a comma-separated list, e.g. `Next.js 15, TypeScript, Tailwind, Vitest, pnpm`. This string is what drives the stack-aware command block, so the more specific you are about the package manager and test runner, the closer the generated commands land.
3. Rules: one rule per line, up to 4,000 characters, for example `- Never edit files in /generated` on one line and `- Use pnpm, not npm` on the next. Hit generate, read the output, then use Copy to clipboard or Download AGENTS.md. Everything is assembled in the browser — no account, no telemetry.
What the Rules field does to your text
The generator does not dump your textarea into the file verbatim. Each line is normalized into one tight bullet, duplicates are dropped, and anything in (parentheses) or after a `#` is treated as an explanation and trimmed away. That is deliberate: the explanation was useful to you while writing the rule, not to the agent on every turn.
So `Run tests before committing # CI is slow` becomes `- Run tests before committing`. If a parenthetical is actually part of the rule — a path, a version, a flag — rewrite it so it survives, e.g. `Pin Node to 22` rather than `Pin Node (22)`.
Keep rules imperative and testable. "Prefer server components" is checkable; "write good code" is not. Ten to twenty sharp rules beat fifty soft preferences, and the 4,000-character cap is a hint that the field is meant for constraints, not documentation.
How short should AGENTS.md be?
Short enough that the whole file is cheap to re-read. Every line you add is paid for on every agent turn, which is why the generator targets roughly 120 lines as a ceiling rather than a goal. A typical output — title, overview, stack, commands, rules — lands well under that.
The biggest accidental bloat is a commands block copied from a README with install scripts, Docker examples and release steps the agent will never run. Keep build, dev, test and lint. Everything else belongs in your docs, where a human reads it once.
If the generated file feels thin, that is usually correct. Adding architecture prose rarely changes agent behaviour; adding "never edit /generated" almost always does.
Where does AGENTS.md go in a repo?
Put it at the repository root so the agent finds it from any working directory. Commit it like any other file — it is part of the project contract, and it should change in review when your build or constraints change.
In a monorepo, a root AGENTS.md plus nested files per package is a common pattern, with the root file holding only repo-wide rules. Be careful not to contradict yourself: a nested file that says "use npm" under a root file that says "use pnpm" produces exactly the ambiguity the file is meant to remove.
Generate, download, move the file into the repo, then `git add AGENTS.md`. If you keep several equally strict projects, generate each one separately rather than sharing a single file — the commands differ even when the rules do not. Other free utilities on OnlineFree.app follow the same browser-only pattern if you need more one-off helpers.
Limitations and when to hand-edit
The command block is inferred from your stack string, so it is a starting point, not a source of truth. Verify every generated command by running it once in the repo. If your test script is `pnpm test:ci`, the generator cannot know that unless the stack string or a rule says so.
Nothing is uploaded and nothing is stored, which also means nothing is remembered: there is no account, no history and no sync between devices. Copy the output somewhere safe before you close the tab.
Finally, treat the file as a living document. Review it when tooling changes, and never put secrets, tokens or internal URLs in it — an instruction file is read by a model, and it is committed to version control. Verify important commands and any policy-sensitive rules yourself before relying on them.
Frequently asked questions
Is the AGENTS.md Generator free and does it require an account?
Yes, it is free and requires no account. The page is a single screen with three fields, and the file is assembled entirely in your browser, so no signup, email or login is involved. You can generate, copy and download as many AGENTS.md files as you like.
What exactly does the generator put in the file?
It writes a frontmatter-free markdown file with an H1 project title, a one-line overview, a Stack section, a Commands section inferred from your tech stack string, and a Rules section built from your normalized rule lines. The result is deliberately compact, targeting roughly 120 lines or fewer so it does not bloat agent context.
Why were some of my rules shortened in the output?
Lines are normalized and deduplicated, and anything in parentheses or after a # character is treated as an explanation and removed. If a parenthetical is genuinely part of the rule — a version number, path or flag — rephrase it as plain text so it survives the cleanup.
Does the generated AGENTS.md work with Cursor and Claude Code?
It produces standard markdown in the layout those tools expect: a title, overview, stack, commands and rules, with no frontmatter. Every agent loads instruction files slightly differently, though, so check your tool's own documentation for filename support and reading order before assuming behaviour.
Can I edit the file after downloading it?
Yes, and you probably should. The generated commands are inferred from your stack string, so open the file, run each build, dev and test command once, and correct anything that does not match your real scripts. Then commit it so the whole team and their agents see the same constraints.