AI context file prompt
An AI context file prompt writes an AGENTS.md for your website's code: how to run it, where content lives, the design and writing rules, and what must never change. Coding agents read it before they edit anything, so every future AI change follows your rules.
- Stage
- Grow, step 39 of 40
- Use it
- As soon as the site lives in code, and before anyone else, or any other AI tool, works on it.
- You need
- Access to the site's code
- DESIGN.md and your writing rules
- You get
- An AGENTS.md under 120 lines, plus questions about anything unclear.
The prompt
Write an AGENTS.md for this website repository.
Include how to install, run and build it; where pages, content
and styles live; the design rules (link to DESIGN.md);
the writing rules; what must never change (URLs, schema @id values,
tracking, legal pages); and how to check work before committing.
Keep it under 120 lines of plain Markdown.
Ask me about anything you can't confirm from the code.JSON version, for teams and automations
Fill each value under "inputs", keep the rest. It follows the prompt schema. When to use JSON.
{
"$schema": "https://websitesdesigner.com/insights/prompts/prompt.schema.json",
"id": "context-file",
"name": "AI context file prompt",
"stage": "grow",
"step": 39,
"of": 40,
"version": "2026-11-19",
"url": "https://websitesdesigner.com/insights/prompts/context-file/",
"inputs": {},
"instructions": [
"Write an AGENTS.md for this website repository.",
"Include how to install, run and build it; where pages, content and styles live; the design rules (link to DESIGN.md); the writing rules; what must never change (URLs, schema @id values, tracking, legal pages); and how to check work before committing.",
"Keep it under 120 lines of plain Markdown.",
"Ask me about anything you can't confirm from the code."
],
"output": "An AGENTS.md under 120 lines, plus questions about anything unclear.",
"checks": [
"It says how to build and check the site.",
"It lists what must never change.",
"It links to DESIGN.md instead of copying it."
]
}What good output looks like
- It says how to build and check the site.
- It lists what must never change.
- It links to DESIGN.md instead of copying it.
What experts miss
- List what must never change. Agents follow rules well and guess badly about which URLs earn your leads.
- Put the checks in, not only the rules. "Run the build and the link check before committing" turns a rule into a habit.
- Use nested files for special areas. A second AGENTS.md in a subfolder can hold rules for that part only, such as the blog content.
Why it works
AGENTS.md is an open format for guiding coding agents, used by more than 60,000 open-source projects.1 It's plain Markdown in the root of the repository. Agents that read it start every task with your rules instead of guessing.
How to adapt it
- Add your publishing steps if the site deploys on every push.
- Add who to ask before changing pricing, legal or tracking.
Mistakes to avoid
- Secrets or passwords in the file. It lives in the repository.
- A file so long that agents skim it.
Go deeper
Vibe coding a website covers working with coding agents. The handover runbook prompt is the version for people. This prompt is part of the grow stage. It follows the AI website design prompts guide and the six steps in how to use AI to design a website.