AGENTS.md Design Rules: A Template That Keeps Codex, Claude Code and Cursor Off the AI Look (2026)
A prompt steers one chat; a rules file steers every request. Which file each agent reads in November 2026, a copy-paste AGENTS.md design section that bans the defaults by name, and how to check that it held.
On this page
The anti-slop prompt works for one conversation. The next session starts from the defaults again, unless the rules live in a file the agent reads on every request.
A prompt is a message: it shapes the answer it is attached to, then scrolls away. A rules file is different. Coding agents load it at the start of each session or each request, so a decision written there once applies to every page the agent generates afterwards. For design, that is the difference between fixing one hero section and never getting the default hero again.
This article gives you three things: which file each current tool actually reads, a design section for that file that you can paste as it is, and a way to check that the rules held.
Which file your tool reads (November 2026)
The good news of 2026 is that most tools converged on one file, AGENTS.md, at the root of the repository. The details still differ, and they matter.
| Tool | What it reads | Note |
|---|---|---|
| OpenAI Codex | AGENTS.md, also in subfolders | The nearest file to the code being edited applies |
| Cursor | AGENTS.md, and .cursor/rules/*.mdc | A plain .md file inside .cursor/rules is ignored; it needs the .mdc extension |
| GitHub Copilot | AGENTS.md, or .github/copilot-instructions.md | Both work in agent mode |
| Claude Code | CLAUDE.md; AGENTS.md only when there is no CLAUDE.md | If you keep both, put a line @AGENTS.md in CLAUDE.md |
| Lovable | AGENTS.md or CLAUDE.md at the top level, with every message | Plus project Instructions in the settings |
| Bolt | agents.md, found automatically once attached | The main instructions must be in the file itself |
Sources: Cursor rules, Claude Code memory, Lovable Instructions, Bolt project context, GitHub Copilot repository instructions.
The trap is Claude Code. It reads CLAUDE.md first, and many repositories already have one for build commands. If yours does, the design rules in AGENTS.md are silently skipped. One line fixes it: add @AGENTS.md to CLAUDE.md, and Claude Code imports the shared file.
The old single-file .cursorrules no longer appears in Cursor's documentation. If your project still relies on it, move the rules to AGENTS.md.
Why rules beat a longer prompt
Three reasons, all practical.
They persist. The agent reads them on every request, including the ones where you forgot to paste the prompt, and including the requests a teammate makes.
They are versioned. The file sits in the repository. A change to the palette is a diff someone can review, not a message lost in a chat history.
They can be specific. A prompt that says "make it distinctive" gives the model nothing to act on; the most likely distinctive page is still blue. A rules file can name the exact tokens to avoid and the exact tokens to use, and the agent can look them up while it writes code.
The template
Paste this section into AGENTS.md and fill in the five values in angle brackets. Keep the banned list literal: models follow string bans much better than adjectives.
## Design rules
Every page and component generated or edited in this repository follows
these rules. They override the defaults of any component library.
### Tokens (use these, do not invent others)
- Background: <#hex> Text: <#hex> Accent: <#hex>
- Display font: <family> Body font: <family>
- All colours come from the CSS variables in src/styles/tokens.css.
If a value you need is not there, stop and ask.
### Banned defaults (never write these)
- Utility families bg-, text-, border-, ring-, from-, via-, to- with
blue, indigo, sky, violet or purple, unless they are the tokens above.
- Hex #3b82f6, #2563eb, #6366f1, #8b5cf6, #7c3aed as an accent.
- Gradients from blue to purple, and gradient text.
- Inter, Geist, Roboto or system-ui as the display face.
- A row of three identical cards (grid-cols-3 with the same card three times).
- Fade-up on scroll: opacity 0 plus a y offset, whileInView reveals, AOS.
- backdrop-blur on more than one surface.
- Button labels "Get started", "Learn more", "Start for free".
- rounded-2xl or rounded-3xl cards with shadow-lg or larger.
### Layout and motion
- Vary the layout from one section to the next.
- Content is visible without JavaScript; nothing starts at opacity 0.
- At most one deliberate entrance on the first screen. Respect
prefers-reduced-motion.
### Copy
- Every button names the action it performs.
### Working order
1. Search the existing components before writing a new one.
2. Change the shared component or the theme, not one page.
3. Run the build and the linter; fix what you broke.
4. List the files you changed. Do not commit without review.A few notes on the choices.
The tokens come first. A ban without a replacement leaves the model to pick something, and its next most likely pick is another default. Naming the accent and the two faces closes that gap.
The ban list matches what a scanner can find. Each line corresponds to a pattern you can search for in the code. That is deliberate: a rule you can check is a rule you can enforce.
The working order is for agents. Codex, Claude Code and Cursor all edit files and run commands. Telling them to fix the shared component and to run the build turns one prompt into a reviewable change instead of a page-by-page patch.
Filling in the five values
If you do not have a palette yet, do not take the first one a model suggests: it is the same suggestion it gives everyone. Two quick ways out:
- From your brand. One accent you already use on the logo or the product, one near-white and one near-black that are not pure white and black.
- From your domain. The free scan on Sailop generates a palette and a type pair from the hostname of your site, deterministic, so the same domain always gets the same system. Run the AI slop checker on your site and copy the tokens from the fix kit into the template.
For the fonts, pick a display face and a text face that are clearly different from each other, and neither of them Inter or Geist. The typography tells article has the reasoning.
Cursor: the always-on version
AGENTS.md is enough for Cursor. If your team prefers Cursor's own rules folder, save the same text as .cursor/rules/design.mdc with this header, so the rule is applied to every request and not only when a matching file is open:
---
description: Design rules for this repository
alwaysApply: true
---Without alwaysApply: true, Cursor treats the rule as optional and attaches it only when the request matches its globs.
Check that the rules held
A rules file is a request, not a guarantee. Models drift, especially on long sessions and on pages built from a component library that ships its own theme. Check after the next generation:
- Deploy a preview, then scan the page with the AI website detector. It lists which of the eight defaults are still on the page, with the literal class it found.
- If something came back, search for that literal string in the repository. It usually sits in one shared component or in the library's theme file.
- Add the specific token to the banned list if it is not there yet.
If you work in Claude Code, Codex or Cursor, you can let the agent run the check itself: add the Sailop MCP server and ask it to scan the preview URL after each change.
Common mistakes
Adjectives instead of tokens. "Modern, clean, premium" describes the default. Every generated landing page already believes it is modern and clean.
Rules that fight the component library. shadcn/ui and similar libraries read their colours from CSS variables. If your rules ban blue but the theme file still defines the primary colour as blue, the components win. Change the theme variables first.
A CLAUDE.md that hides AGENTS.md. Covered above, and the most common reason the rules "do nothing" in Claude Code.
Rules that are too long. A design section of a page or two is read and applied. Twenty pages of philosophy are skimmed. Keep the banned list literal and short, and move the reasoning to a separate document the file links to.
Related
- The Anti-Slop Prompt Template: the per-conversation version of these rules, for chats and one-off generations.
- How to Stop Cursor and Claude Code From Shipping Tailwind-Blue Slop: the token file and the pre-commit check that go with a rules file.
- What to paste in Lovable, v0 and Bolt: the same rules for builders that are driven from a chat.
Scan your site free
Eight AI-builder defaults, the evidence for each on your page, and the fix kit. Free, no account. If your site has more pages to fix, the site report covers up to 25 of them.
Read the whole site, with a fix prompt per default
Get told when the CLI ships