📁 Agents

Codex Website Design Prompt: Brief With Screenshot Checks

Brief OpenAI Codex to build a small website: pages, sections, design tokens, stack, accessibility bar and a build-and-screenshot check before it reports done.

0.0
0Reviews
P
December 2, 2026

Prompt

Act as a front-end lead who writes build briefs for OpenAI Codex. You turn a site idea into two pieces: a short AGENTS.md section with the rules that hold for every task in the repo, and a first task prompt that tells Codex exactly which pages and sections to build, which design tokens to use, how to check its own work and what to report. You keep the brief to facts the owner gave you and leave copy that is missing as clearly marked placeholders, not invented claims.

Inputs:
- What the site is for and who visits it: [Site Purpose]
- Pages and the sections on each, in order: [Pages and Sections]
- Colors, fonts, spacing and corner radius: [Design Tokens]
- Framework, package manager and hosting: [Stack]
- Reference screenshots or sketches you will attach with --image, and what to take from each: [Reference Images]
- Where the real copy and photos live: [Content Source]
- Accessibility and performance bar: [Quality Bar]
- Commands Codex must run and pass before it says done: [Done Checks]

Generate:
1. AGENTS.md section for the website repo: stack and commands from [Stack] and [Done Checks], the token file location, naming rules, and "do not" rules (no new dependencies without asking, no copy beyond [Content Source]).
2. Design tokens as CSS custom properties built only from [Design Tokens], with a note where a value is missing.
3. Page build plan: each page from [Pages and Sections] with its sections in order, the component each section uses and the content field it pulls from [Content Source].
4. Reference notes: for each item in [Reference Images], what to copy (layout, spacing, mood) and what not to copy (logos, text, photos).
5. Quality checks from [Quality Bar], written as checks Codex can run or inspect: heading order, alt text, color contrast, keyboard focus, image sizes.
6. Self-check loop: run every command in [Done Checks], take the screenshots listed there, compare them with [Reference Images], fix, and repeat once.
7. Done report: files changed, commands run with pass or fail, screenshots taken, placeholders left and questions for the owner.

Instructions

Save the AGENTS.md part in the repo root, then start Codex in that folder and paste the task prompt, attaching your references with --image (for example codex --image hero.png,cards.png). Checked in OpenAI's Codex docs on December 1, 2026: Codex reads AGENTS.md before doing any work, /init can create a starter AGENTS.md, and the CLI accepts one or more images with --image or -i (comma-separated or repeated). Your own screenshot script is what lets Codex check its work; if you do not have one, ask Codex to propose one and approve it before it adds a dependency. Variation: for a single landing page, cut the plan to one page and add a form spec. Variation: for an existing site, replace the build plan with "change only these sections" and attach before screenshots. Tip: keep real copy in data files so Codex never has to write prices or claims. Not affiliated with OpenAI.

Generated Output

This image was generated using the prompt above.

Codex Website Design Prompt: Brief With Screenshot Checks - Result

Examples

Example Input

Site Purpose: one-page-plus site for Quaylen Pottery Studio, a small studio that sells wheel-throwing classes. Visitors are adults booking a first class on their phone.
Pages and Sections: Home (hero with class photo and Book a class button, three class cards, how a first class works in 3 steps, studio location, footer); Classes (list of the three classes with price and length); Contact (address, hours, email link).
Design Tokens: clay #B5651D for buttons, cream #F7F1E8 background, charcoal #2B2B2B text, headings in Fraunces, body in Inter, 8px spacing scale, 12px corner radius.
Stack: Astro with npm, static output, hosted on Netlify.
Reference Images: hero.png (take the full-width photo with text on the left, not the logo), cards.png (take the card spacing and soft shadow).
Content Source: content/classes.json has the three classes with name, price and length; content/studio.json has address, hours and email. Photos in public/photos/.
Quality Bar: one h1 per page, alt text on every photo, AA contrast, visible keyboard focus, images under 300 KB.
Done Checks: npm run build must pass; npm run shots runs scripts/shots.mjs and saves screenshots at 375px and 1280px wide for each page.

Example Output

AGENTS.md (website section)
## Quaylen Pottery Studio site
- Stack: Astro, npm, static output, deployed on Netlify.
- Before saying a task is done, run: npm run build, then npm run shots (saves 375px and 1280px screenshots per page).
- Tokens live in src/styles/tokens.css. Use the variables; do not hard-code colors or radii.
- Copy comes only from content/classes.json and content/studio.json. If a field is missing, insert TODO(owner) and list it in the report.
- Do not add dependencies without asking. Do not copy logos, text or photos from reference images.

src/styles/tokens.css
:root {
  --color-accent: #B5651D;   /* clay, buttons */
  --color-bg: #F7F1E8;       /* cream */
  --color-text: #2B2B2B;     /* charcoal */
  --font-heading: "Fraunces", serif;
  --font-body: "Inter", sans-serif;
  --space-1: 8px; --space-2: 16px; --space-3: 24px; --space-4: 32px;
  --radius: 12px;
}
Missing: a hover color for buttons and a font size scale. Ask the owner or keep browser defaults.

TASK PROMPT FOR CODEX (attach hero.png and cards.png with --image)
Build three pages in this Astro repo.

Home: Hero (full-width class photo from public/photos/, heading and Book a class button on the left, as in hero.png). ClassCards (three cards from content/classes.json with name, price and length; spacing and soft shadow as in cards.png). FirstClassSteps (3 steps; the steps are not in the content files, so use TODO(owner) text). Location (address and hours from content/studio.json). Footer.
Classes: one list of the three classes from content/classes.json with price and length.
Contact: address, hours and an email link from content/studio.json.

From the references take layout, spacing and mood only. Do not copy the logo or any text in them.

Quality checks:
- Exactly one h1 per page; headings do not skip levels.
- Every img has alt text describing the photo.
- Text and button colors meet WCAG AA contrast against cream; report the clay button with white text and its ratio.
- Every link and button shows a visible focus outline.
- Every image in public/photos/ under 300 KB; list any that are larger instead of compressing silently.

Self-check loop:
1. npm run build. Fix errors until it passes.
2. npm run shots. Open the 375px and 1280px screenshots of each page.
3. Compare Home with hero.png and cards.png. Fix spacing or layout gaps, then run both commands once more.

Report back:
- Files created or changed
- npm run build and npm run shots: pass or fail, with the error if any
- Screenshots saved, by page and width
- TODO(owner) placeholders left (at least the three first-class steps)
- Questions: button hover color, font size scale, any image over 300 KB

Share this prompt

Reviews (0)

Please login to leave a review.
Loading reviews...