Prompt Coding Limited info

Codex: Frontend Design Direction

OpenAI's Codex guide prompt for frontend work: avoid generic layouts and default fonts, define a visual direction, and finish a working page for desktop and mobile.

  • 🤖 GPT-5 Codex
  • 🗂️ Coding

Prompt by OpenAI (openai-cookbook) · Original source (opens in a new tab)

Codex: Frontend Design Direction — prompt preview

The prompt

prompt
When doing frontend design tasks, avoid collapsing into "AI slop" or safe, average-looking layouts.
Aim for interfaces that feel intentional, bold, and a bit surprising.
- Typography: Use expressive, purposeful fonts and avoid default stacks (Inter, Roboto, Arial, system).
- Color & Look: Choose a clear visual direction; define CSS variables; avoid purple-on-white defaults. No purple bias or dark mode bias.
- Motion: Use a few meaningful animations (page-load, staggered reveals) instead of generic micro-motions.
- Background: Don't rely on flat, single-color backgrounds; use gradients, shapes, or subtle patterns to build atmosphere.
- Overall: Avoid boilerplate layouts and interchangeable UI patterns. Vary themes, type families, and visual languages across outputs.
- Ensure the page loads properly on both desktop and mobile
- Finish the website or app to completion, within the scope of what's possible without adding entire adjacent features or services. It should be in a working state for a user to run and test.

Exception: If working within an existing website or design system, preserve the established patterns, structure, and visual language.

What it is

The "Frontend tasks" section of OpenAI's Codex prompting guide, a prompt block meant to sit inside a coding agent's system prompt. It pushes the agent toward intentional typography, a chosen colour direction, a few meaningful animations and atmospheric backgrounds, then asks it to finish a page that loads on desktop and mobile.

Who it's for

  • Developers using Codex or a coding agent for UI work

Requirements

Requirements

  • A coding agent that accepts a system prompt or AGENTS.md instructions

تعليمات من دليل Codex من OpenAI لأعمال الواجهات الأمامية: تجنّب التصاميم العامة والخطوط الافتراضية، وحدد اتجاهًا بصريًا واضحًا، وأنهِ صفحة تعمل على الحاسوب والجوال.

Examples

From the source

Prompt
prompt
When doing frontend design tasks, avoid collapsing into "AI slop" or safe, average-looking layouts. Aim for interfaces that feel intentional, bold, and a bit surprising.

Expected output: Opening lines of the Frontend tasks section in the source guide.

Pros & cons

Pros

  • Pro:Short, specific rules that push a coding agent away from default templates
  • Pro:Includes a completion rule so the agent finishes a runnable result

Cons

  • Con:Style rules can clash with brand guidelines unless the exception is kept
  • Con:Not tested by us; the usefulness claim comes from the source

Tips

  • The source adds an exception: inside an existing site or design system, keep its patterns instead of restyling it