Skip to main content
All templates

Prompt template

Seven AGENTS.md Rules for Vibe-Coding Agents

Seven standing rules for AGENTS.md / CLAUDE.md: no fake-green tests, no guessed packages, no memory-API calls, prove done with real output, stop after two failed fixes, change only what was asked, and never destructive git without approval. Shared by @kloss_xyz.

Made for GPT ImageRevision 3

Start from an example

Pick an example to load its exact settings, then make it yours.

  • View case

Make it yours

Only the parts worth changing are shown. The prompt updates as you go.

Rule 1 core sentence.

Rule 2 core sentence.

Rule 4 core sentence.

Your prompt

1. For every test you write, confirm it would fail if the code under test did nothing. If it would still pass, rewrite it. A green test suite is the easiest thing for an agent to fake. 2. Show me the link. Never guess a package name. Agents repeat the same fake package names, and attackers can register them. 3. Before using any library's API, check the installed version and read its actual docs or source. Never write code from memory of an older version. Agents write code for the version they were trained on. Yours could be newer or older. 4. Run it and show me the actual output, not a summary. 'It compiles' is not proof. If you can't run it, say so. When agents grade their own work, they rarely fail themselves. 5. If two fixes fail the same way, stop. The shared assumption is probably wrong. Question it before writing another fix. Never retry a theory you already ruled out. Agents retry the same wrong theory with more confidence every time. 6. Only change what a task requires. If you notice other issues, first list them instead of immediately fixing them. The bugs you didn't ask for come from the fixes you didn't ask for. 7. One command can erase a day of work, and agents run them casually.

Click a highlighted part to change it.

When to use it

Use when you want a portable, model-agnostic rules file that travels with your harness across Claude Code, Codex and Cursor on the same repo.

How to get the best result

  • Drop the seven rules into AGENTS.md (or your global config if Claude would otherwise ignore AGENTS.md when CLAUDE.md exists).
  • Keep rule 4's prove-it line; summaries without output are how agents self-grade as done.

Watch-outs

  • If the repo has both CLAUDE.md and AGENTS.md, Claude Code may skip AGENTS.md until you change Project instructions in /config.

Source and attribution

Example cases by
klöss

Browse more