Coding prompts · How to use a skill
write-agents-md-prompt
A prompt that has your AI agent write or tidy an AGENTS.md project rules file - real build, test and lint commands, code style, folder map and do-not-touch rules - so every coding agent starts with the same context. Use when the user wants an AGENTS.md, CLAUDE.md or .cursor/rules file, says the AI keeps forgetting project conventions, or onboards an agent to a repo.
Version 1.0 · Updated 2026-10-31
Install in Claude Code, Cursor or Codex (optional)
Only for AI coding tools that read skill folders. Run one line in a terminal, in your project folder. It downloads this skill's text files from TheSkillVault and nothing else; you can read them first with “View raw SKILL.md”.
Claude Code (all your projects)
curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/write-agents-md-prompt/raw' -o ~/'.claude/skills/write-agents-md-prompt/SKILL.md'Cursor (this project)
curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/write-agents-md-prompt/raw' -o '.cursor/skills/write-agents-md-prompt/SKILL.md'Codex and other Agent Skills tools (this project)
curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/write-agents-md-prompt/raw' -o '.agents/skills/write-agents-md-prompt/SKILL.md'
Or connect the whole library over MCP
Add TheSkillVault to Cursor or add this to your app's MCP settings (read-only; help):
{
"mcpServers": {
"theskillvault": {
"url": "https://theskillvault.ai/mcp"
}
}
}Write an AGENTS.md project rules file (prompt)
AGENTS.md is a plain Markdown file at the root of your repo. Coding agents read it before they work, so they know how to build, test and follow your conventions. This prompt makes the agent study the repo and write one that is short and true.
When to use
- Starting with AI agents on an existing project.
- The agent keeps using the wrong package manager, test command or code style.
- Your
CLAUDE.md,.cursor/rulesandAGENTS.mddisagree with each other.
Steps
- Open the repo in your agent and paste the prompt below.
- Check every command it lists by running it once.
- Commit the file, and add one line to it each time the agent repeats a mistake.
Prompt
Write (or update) AGENTS.md at the root of this repo. Study the repo first; do not guess.
1. Read package.json or the equivalent build files, lockfiles, CI config, README,
linters and formatters, and any existing CLAUDE.md, .cursor/rules or AGENTS.md.
2. Write these sections, short and concrete:
- Project: one or two sentences on what it is and the main stack.
- Commands: the exact install, dev, build, test, single-test and lint commands.
Only list commands you found in the repo.
- Layout: the 5-10 folders that matter and what lives in each.
- Conventions: naming, style and patterns the code really uses, with one file
to copy as an example.
- Testing: where tests live and what must pass before a change is done.
- Boundaries: files and folders never to edit (generated code, migrations,
vendored code), and actions that need my approval first (deploys, deleting
data, changing dependencies).
- Secrets: where config lives (.env, secret manager). Never write real keys,
tokens or passwords into AGENTS.md.
3. Keep it under 150 lines. Prefer bullets. Remove anything a linter already enforces.
4. If CLAUDE.md or other rule files exist, make AGENTS.md the source of truth and
point the others at it (e.g. a CLAUDE.md that says "See AGENTS.md").
5. For a monorepo, add a short AGENTS.md inside a package only where its rules differ.
6. List any commands you could not confirm, and show me the file before saving.
How to adapt
- Works with Codex, Cursor, Claude Code, GitHub Copilot and other agents that read
AGENTS.md. If you use Claude Code, a one-lineCLAUDE.mdsaying "See AGENTS.md" covers it. - New project with no code yet? Tell it the planned stack and ask for a starter file instead.
- Keep it current: when a review catches a repeated mistake, add a one-line rule.
Done when
- Every command in the file runs as written.
- A fresh agent session follows the commands and boundaries without being told.
Example prompt
"Write an AGENTS.md for this repo so Cursor and Claude Code stop using npm when we use pnpm."
Licence: CC BY 4.0. Attribution when you reuse it: From TheSkillVault, https://theskillvault.ai, CC BY 4.0