What this stage does
This is the stage where the website factory becomes executable. The goal is not to become a developer overnight. The goal is to give Codex a proper workbench: an editor, a runtime, a project folder, written rules, and a clear review loop.
The scary part is usually not code. It is uncertainty: which tool to open, which command matters, what Codex is allowed to change, and how to know whether the result is safe. This guide turns those unknowns into a controlled workflow.
Steps
Guide
Install the Basic Workbench
Start with the boring tools. Install VS Code or another proper editor so the website is visible as files, not as scattered snippets in chat. Then install Git so changes can be reviewed and reversed with a history, not remembered from a conversation.
If the site uses a JavaScript stack, install Node.js and npm. For most non-technical users, the practical check is simple: open a terminal in the project folder and run
node -vandnpm -v. If both commands return versions, the basic runtime exists.Do not install random packages because an AI answer sounds confident. Use the project's existing instructions first. If there are no instructions yet, create them before asking Codex to build anything substantial.
Choose the Codex Surface
Codex can fit different comfort levels. The CLI is strong when you are comfortable in a terminal. The IDE extension is useful when you want Codex close to the editor. The Codex app is useful when you want a more guided place to manage agent work.
For a first website workflow, choose the surface that makes review easiest. The best setup is the one where you can see the changed files, read what Codex did, and run the project's checks before accepting the work.
If you use the CLI, the current OpenAI setup path is to install Codex from the official Codex CLI documentation, then run
codexinside the project folder. The first run signs in with a ChatGPT account or API key. On Windows, use the native Windows setup, the IDE extension, or WSL2 depending on your project and company restrictions.- 3
Create the Project Instruction File
Read GuideCreate an
AGENTS.mdfile in the project root. This is the file that tells Codex how this project works: what commands to run, what style to follow, what not to touch, where assets live, and what counts as done.A useful first version can be short: project goal, install command, development command, build command, test or lint command, design rules, content rules, image rules, and any files that should not be edited without approval.
Keep this file practical. Codex does not need a brand manifesto when it is fixing a footer. It needs concrete instructions such as
run npm run build before finalizing,use existing colors from the design file, anddo not change tracking scripts unless the task asks for it. Give Codex Small Jobs First
Do not start with
build the whole website. Start with a contained task that proves the workflow: create a reusable footer, adjust a header, add one content section, fix one mobile layout issue, or wire one tracking check.A good first prompt has four parts: the goal, the relevant files, the constraints, and the done condition. For example:
Update the footer to match AGENTS.md. Use existing components and colors. Do not change routing. Done when the page builds and the footer fits on mobile.This is how you keep the AI useful. Codex can inspect files, edit code, and run commands, but you still define the box it should work inside. Small jobs make mistakes easier to see and corrections cheaper.
Run Checks Before You Trust the Result
Every Codex task should end with evidence. At minimum, read the changed files, read the summary, and run the project's normal check command. For a website, that usually means a build command, a lint command if available, and a visual check in the browser.
If Codex says a command failed, treat that as useful information, not as a failure of the whole workflow. Ask it to explain the failure, fix the smallest cause, and rerun the same check. The goal is a repeatable loop: change, check, inspect, accept.
Never publish directly from an AI-generated change because it looks right in the conversation. Publish after the project checks pass and the visible page matches the expected outcome.
Prepare the Handoff to Skills
Once the basic setup works, turn repeated instructions into skills. A skill is useful when you find yourself giving Codex the same narrow workflow again and again: build a footer, create a thumbnail, prepare metadata, review mobile layout, or check tracking tags.
This is the bridge to the next guide. Codex is the workbench. Skills are the reusable tools on that workbench. Without Codex setup, skills are just instructions. With Codex setup, they become repeatable production workflows.
Be Aware
Codex changes too much at once.
Stop the task, narrow the prompt, name the exact files or component area, and require a check before finalizing.
The project has no command Codex can run.
Add the real install, dev, build, lint, or test commands to AGENTS.md. If the project has no checks yet, make a simple build or smoke-check command the first technical improvement.
The setup works on one computer but not another.
Write down the operating system, Node version, package manager, and exact commands. Treat that note as part of the project, not as personal memory.
The user cannot tell whether the result is safe.
Use smaller tasks, require Codex to summarize changed files, and verify through commands plus browser review before publishing.
Return to the Main Guide?
Main guide
Start Your Website Factory
First Codex Task Prompt
Prompt Script
Use this project as the source of truth.
Goal:
Complete one small website task safely.
Task:
[Describe the exact change here.]
Relevant files:
[List known files, or say "inspect the project and identify the files first."]
Constraints:
- read AGENTS.md before editing
- use existing components, colors, typography, and project patterns
- do not change routing, tracking, legal links, or unrelated files unless the task requires it
- do not invent brand values, page claims, URLs, contact details, or navigation items
- stop and ask if a missing input would cause guessing
Done when:
- the change is implemented
- the affected files are summarized
- the normal project check command has been run, or the reason it could not run is explained
- any visual or mobile risk is called out clearly
