| Duration | ~50 min in the lesson + ~30 min homework |
| Prerequisites | Lesson 9.1 — Codex set up in the course project with AGENTS.md; a Chromium-based browser. |
| Checkpoint | none (the lesson ends with a commit and push, no tag) |
What you will have
The student has run one plan, build and review loop in Codex, has the Playwright browser MCP server connected to Codex, and holds a table that gives the Codex equivalent of every Claude Code feature used in sections 0 and 1, including the ones that have none.
Video
The video for this lesson is not recorded yet.
Prompts used in this lesson
Part 3 — The brief and project memory: lessons 1.1 and 1.2
I want to check what you loaded before we work. List the instruction files you read at the start of this session, in order, and say in one sentence what each one told you. Done means I can compare your list with my project. Do not change anything.
Part 4 — Plan first: lesson 1.3
/plan Purpose: I want a short "Services" section on about-me.html so a visitor sees what Brightside Cleaning offers. Context: The page is one file with its styling inside it. The services are Regular clean, Deep clean and End-of-tenancy clean, each with one sentence. Put the section above the Contact section. Done looks like: the section shows three services in the page's existing style, and nothing is cut off in a narrow, phone-width window. Constraints: edit only about-me.html. No prices. No JavaScript. Give me a plan first: what you will change, in what order, how I can check it, and anything you are unsure about.
One change to the plan: add a fourth line under the three services, "Not sure which one you need? Ask us." Mark this item "(changed by me)". Show me the updated plan.
Part 6 — Extensions: lesson 1.6
Purpose: I want you to look at my page in a real browser and tell me what a visitor sees. Context: A local web server is already running for this folder at the address http://localhost:3000. The page is about-me.html. Use the Playwright browser tools. Done looks like: you open the page, save a screenshot as screenshots/about-me.png, and describe in five sentences what is visible. Constraints: create no file other than the screenshot and change none. Describe only what the browser shows.
Do along
Do these steps on your own project, pausing the video where a step says so.
- Pause after Part 4. Start
codexin your project and set Read Only with/permissions. - Send the
/planbrief from Part 4. Adapt: your own three services. - Read the plan. Ask for one change, marked "(changed by me)".
- Tell Codex to implement the plan. Read and approve the edit.
- Pause after Part 5. Run
/diff, then/reviewon the uncommitted changes. Reload the page. - Pause after Part 6. Exit Codex. Run
codex mcp add playwright -- npx -y @playwright/mcp@latest, thencodex mcp list. - In a second terminal, run
npx --yes serve .in the project folder and note the address it prints. - Start
codex, check/mcp, and send the browser prompt from Part 6 with your address. - Compare the screenshot with the description. Ask Codex to add
.playwright-mcp/to.gitignore. - Stop the web server with
Ctrl+C. Ask Codex to commit ("Bonus 9.2: services section, browser connected") and push.
Check your work
- Open
about-me.htmlin the browser. Expected: the Services section, including the item you added to the plan. - Run
codex mcp list. Expected: aplaywrightline. - Open
screenshots/about-me.png. Expected: a picture of your page; every sentence of Codex's description is visible in it. - Without the table, name the Codex equivalent of plan mode, Manual mode,
/contextand/rewind. Expected:/plan;/permissions→ Read Only; none, ask which files were loaded; none, use Git. - Run
git status. Expected: nothing to commit.
Common problems
- Codex started editing without showing a plan. → The request was sent without
/plan. → Stop it, restore the file withgit restore about-me.html, and send the brief again after/plan. - Codex says it has no browser tools. → The session started before the server was added. → Exit, start
codexagain, check/mcp. - The browser cannot open the page. → The web server is not running, or the address differs. → Run
npx --yes serve .yourself and give Codex the address it prints. - A skill you created is not offered. → It is in
.claude/skills/, or the session is older than the skill. → Move it to.agents/skills/<name>/SKILL.mdand start a new session.
Homework
About 30 minutes, after the lesson, on your own. Nothing later in the course depends on it.
- The loop again, on your own change. Choose one more small addition to your page that your business needs (the area you serve, a short "About us"). Write the four-part brief yourself and send it after
/plan. Change the plan once, have it implemented, then run/diffand/review. Ask Codex to commit and push, without a tag. Deliverable: the commit. Done when: the addition shows on the page and you can say which item of the plan was yours. - Undo with Git, on purpose. With
git statusclean, ask Codex for a change you do not want, such as a red main heading. Approve it and look at/diff. Then rungit restore about-me.htmlin your own terminal and reload the page. Deliverable: the restored page. Done when: the page looks as before andgit statusreports nothing to commit. - A second look through the browser. Start the web server yourself as in Part 6. Reuse the browser prompt, but ask Codex to check the change from task 1 in a narrow, phone-width window and save
screenshots/about-me-narrow.png. Compare its description with the picture. Commit the screenshot, without a tag. Deliverable: the screenshot. Done when: every sentence of the description is visible in it, or you have written down which sentence was not.