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.

Read the prompts guideAll 40 prompts

Sources

  1. "AGENTS.md," agents.md. agents.md

Related prompts

Handover runbook prompt

A handover runbook prompt writes the document that lets you run your site without the person who built it: who owns what, how to edit and publish, how to undo a mistake and what to check each month.

Get the prompt

DESIGN.md prompt

A DESIGN.md prompt asks the AI to write your design rules into one plain-text file: colours, type, spacing, layout and a never list. Every later prompt points to that file, so screens stay consistent.

Get the prompt

One change prompt

A one change prompt edits a single thing on a page and nothing else. It names the element, the change and the rule that everything else stays put, and asks the AI to list what it will touch before it starts.

Get the prompt

Design tokens prompt

A design tokens prompt turns your DESIGN.md into a tokens file in the Design Tokens Community Group format. The same colours, type and spacing then feed code, design tools and AI builders without anyone retyping a value.

Get the prompt

Want this done for you?

Want your site set up so AI tools can work on it safely? Book a call and I'll show you how.

Book a 20-minute call