An agent rules file
Writes short rules for .cursor/rules, CLAUDE.md, or AGENTS.md, using the repo's real commands.
When to use it
Use it at the start of a repo, or when the agent repeats the same mistake. Do not use it to specify a feature: that is a task prompt, not a permanent rule.
Variables
[PROJECT][STACK][COMMANDS][NEVER][STYLE]
Copy prompt
Write an agent rules file for work in [PROJECT]. Stack: [STACK] Real commands (test, lint, dev): [COMMANDS] Never do: [NEVER] Style: [STYLE] Format - I will name the path on the next line if I already know it. If I do not, propose one: AGENTS.md at the root, or CLAUDE.md, or one file under .cursor/rules. Do not create all three. - 80 lines maximum. Short sentences. No language tutorial. - Sections: how to run, what you may change, [NEVER], how to know you are done. - Every command in [COMMANDS] must exist in the repo. If it does not, do not invent the script: write "there is no test command" or ask. - [STYLE] becomes at most 5 bullets (file names, UI copy language, what not to reformat). - Do not include a secret, an internal URL with a credential, or "be creative". Do not - Do not rewrite the app in this task. Only the rules file. - Do not delete a block I have marked as a second brain or a human note. If the file already exists, keep that block and show the diff. Deliver: the full file and a list of what you could not verify in the repo.
How to run this prompt
- Point at the file. Say whether you want .cursor/rules, CLAUDE.md, or AGENTS.md. One at a time.
- List what never to do. NEVER is the mistake the agent already made in this repo.
- Check the commands. If the file cites a script that does not exist, delete the line.
Where this breaks
A long rule file is not read. The prompt caps the length and tells the model to cite the command in package.json, not a generic one.
Result
Slot for a screenshot or demo. No result is published yet.