Day 16 of 21
Create your first personal Codex workflow
Goal: Build one complete reusable workflow from scratch — a pre-session checklist, a standard opening prompt, and a closing report request — then test it on a small real task so you know it works before your next session.
What to do
Understand the difference between a workflow and a skill
A skill (from Day 15) is a saved instruction block for one specific type of task — "check all page titles" or "fix broken links." A workflow is different: it is the repeatable process you follow before and after every Codex session, regardless of what the task is. Think of the workflow as the outer wrapper. You run the pre-session checklist, paste your opening prompt, do the task, then close with the report request. The skill lives inside the session. The workflow surrounds it.
Build the pre-session checklist
The pre-session checklist is a short numbered list you run through before opening Codex. It should take under two minutes. Copy the template below into a new text file called "codex-workflow.txt" saved in the root of your project folder — the same folder you open in Codex, not in Documents or on your Desktop. Fill in any project-specific items where indicated. Keep the total list under eight items.
PRE-SESSION CHECKLIST — run this before every Codex session
1. Branch: open GitHub Desktop. Am I on the right branch, (NOT main)
If not on the right branch: create or switch to a working branch now.
2. Task size: is my task small enough to finish in one session?
If not: split it. Write only the first phase in one sentence.
3. Task written down: do I have my task written in one sentence?
If not: write it now before opening Codex.
4. Plan-first: will I ask Codex for a plan before approving any edits?
Yes: always.
5. Rollback ready: do I know how to discard or revert if something breaks?
Yes: GitHub Desktop > right-click file > Discard Changes.
6. AGENTS.md current: is my current goal line in AGENTS.md up to date?
If not: update it now with today's one-sentence goal.Build the standard opening prompt
The opening prompt is a block of text you paste into Codex at the very start of every session. It reminds Codex of your rules, confirms it read AGENTS.md, and sets the task for this session. Without a standard opening, each session starts with Codex knowing nothing — even if you have a detailed AGENTS.md. Copy and customise the template below. Add it to your codex-workflow.txt file under a heading called "OPENING PROMPT."
OPENING PROMPT — paste this at the start of every Codex session
Read my AGENTS.md file. Confirm you read it by telling me:
1. My project name
2. The current goal
3. One thing you must never change without asking
My task for this session:
[WRITE YOUR ONE-SENTENCE TASK HERE]
Before you touch any file:
- Write a plan listing every file you will change and what you will do
- Wait for me to say "go ahead"
- Tell me if the task is more than three files — I may want to split itBuild the standard closing report request
The closing report request is a short prompt you paste at the end of every Codex session. It asks Codex to summarise what happened, flag any risks, and tell you what to check. Add it to your codex-workflow.txt under a heading called "CLOSING PROMPT." The closing prompt is what you use just before opening GitHub Desktop to review the diff.
CLOSING PROMPT — paste this at the end of every Codex session
Before I close this session:
1. List every file you changed in this session and what you did to each one
2. Is there anything I should check in the browser before committing?
3. Did you make any change that was not in the original approved plan, If yes, name it.
4. What is the safest next step for the next session?
Keep the summary to five bullet points or fewer. Plain English only.Test the full workflow on your small task
Now use the workflow you just built on the task you wrote down at the start of today. Run the pre-session checklist. Open Codex and paste the opening prompt with your task. Let Codex plan and build. Before committing, paste the closing prompt. Review the diff. Commit if it looks right. This is the full cycle — and now you have a written process for every future session.
Expected result
You have a saved codex-workflow.txt file with three sections: pre-session checklist, opening prompt, and closing report request. You tested all three on a real Codex session. The workflow is committed to your branch.
Key takeaway
- A workflow stops every session from being a guessing game. Run the checklist before opening Codex. Paste the opening prompt first. Paste the closing prompt before reviewing the diff. Three minutes of process gives you a session you can explain and repeat.