CodexPrompt

AGENTS.md generator with a deletion rule

by Ramon Sosa ✓

Summary

Writes a repo's rules file for Codex and keeps it short with a simple test: if deleting a line makes the agent slip up, that line stays.

The prompt

We are going to write the `AGENTS.md` for this repo. The goal is not to document it: it is that an agent coming in with no context does not make the mistakes we already know get made here.

Step 1. Research before writing. Review the repo and tell me what you found about:
- How it is installed, run, tested and deployed. The exact commands.
- Which conventions are really followed, according to the code, not according to the README.
- Which things look reasonable but are forbidden here for a reason.
- Which paths are sensitive: secrets, migrations, billing, authentication.
- What mistake a new agent would make in its first hour.

Step 2. Write the file. Every line has to be a behavior instruction, not a description. "Tests run with `[COMMAND]`" works. "This project values quality" does not.

Step 3. Apply the deletion rule to every line, one by one: if I delete this line, does the agent make a concrete, nameable mistake? If you cannot name the mistake, delete the line.

Step 4. After deleting, tell me how many lines are left and what you removed. If the file goes over [LIMIT] lines, keep deleting: a long file gets ignored entirely, and then it was no use.

Constraints:
- No secrets, tokens or credentials. If something is read from the environment, give the variable name and nothing else.
- No aspirational rules that the repo does not meet today.
- If two rules contradict each other, do not leave both: tell me which one wins and why.

How to use

Copy the full prompt and paste it into ChatGPT, Claude or Gemini. Fill in the [BRACKETS] with your business info and you are done.

Recommended

See more →

More resources like this

Get the newest prompts and tools every week.