AI Learning Hub › Learn AI › Self-Paced Courses › Codex Without the Code › Teach Codex How You Work

Module 9 ยท Supervisor

Teach Codex How You Work

Move standing expectations out of every prompt and into the project itself with AGENTS.md, then check that Codex reads it.

By the end

  • Explain what context means for an agent
  • Identify instructions worth making persistent
  • Create project-specific guidance in AGENTS.md
  • Verify that Codex actually sees and uses that guidance
  • Distinguish project instructions from a reusable Skill

Stop repeating the same instructions

Throughout this tutorial, you have repeatedly told Codex things such as:

If the same expectations apply across many tasks in one project, repeating them in every prompt is inefficient and easy to forget. Some guidance belongs in the project itself.

Context

The information and instructions available to Codex when it works on a task.

AGENTS.md

A project instruction file that tells Codex how it should work in that project.

Skill

A reusable workflow that helps an AI perform a particular kind of task consistently.

Context changes the work

A good prompt is only one source of context. Codex may also be working with:

Better context reduces avoidable guessing, without guaranteeing a perfect result. The important question is:

What should Codex know every time it works in this project — even if I forget to repeat it?

Step 1 — Look before creating instructions

Prompt to try

Do not change anything.

Inspect this project and tell me:

- whether it already contains an AGENTS.md file or other project-specific agent instructions;
- where those instructions are located, if they exist;
- what instructions currently apply to your work in this project; and
- whether you see evidence of project expectations that I have been repeating manually but have not yet made persistent.

Base your answer only on evidence available in this project and our work on it.

Do not invent project requirements.

Stop after your analysis.

Persistent does not mean “everything I ever said”

Not every preference belongs in a project instruction file. A useful standing instruction should be:

Do not use AGENTS.md as a transcript of every prompt you have ever written.

Step 2 — Turn repeated expectations into project guidance

Prompt to try

Based only on this project and the work we have completed in this tutorial, propose a concise AGENTS.md for this project.

Do not create the file yet.

Include only guidance that is supported by evidence from the project and has been useful across multiple tasks.

Consider whether the standing instructions should address:

- preserving existing fictional resource content unless a task explicitly changes it;
- keeping the project simple and avoiding unnecessary external dependencies or services;
- maintaining keyboard accessibility and narrow-screen usability when changing interfaces;
- checking interactive behavior in a real browser when behavior changes;
- reporting what was verified and what remains uncertain;
- keeping publishing, deployment, GitHub connections, and other external actions outside the task unless explicitly authorized.

For each proposed instruction:

- state the instruction;
- explain what evidence in this project supports it; and
- explain why it belongs in standing project guidance rather than only in one prompt.

Do not invent new requirements.

Step 3 — Make the useful guidance persistent

Codex includes a shortcut for creating project instructions. In the current desktop app, type /init to create an AGENTS.md starting point for the current project.

Generated instructions still need human review. The shortcut describes the project well, but it may not include every expectation you have been repeating — compare what it wrote against the guidance you just reviewed, and add what is missing.

However the file is created, the standing guidance for this project should say, concisely:

Project guidance

  • Preserve the existing fictional resource titles and descriptions unless a task explicitly asks to change them.
  • Keep the project simple. Do not add external libraries, frameworks, APIs, accounts, analytics, or network dependencies unless the task explicitly requires them.
  • When changing an interface, preserve keyboard accessibility and narrow-screen usability.
  • When interactive behavior changes, verify the result in a real browser rather than relying only on code inspection.
  • Report what you verified and anything you could not verify.
  • Do not publish, deploy, connect this project to GitHub, or take other external actions unless explicitly authorized.

Review instructions before making them persistent

An instruction file can influence many future tasks, which makes a mistake in persistent guidance more costly than the same mistake in a one-time prompt. Before saving standing instructions, ask:

Persistent context should reduce repeated mistakes — not permanently encode a bad assumption.

Step 4 — Start fresh and see what Codex knows

Start a new Codex conversation for the same project using the current desktop app, rather than continuing in the conversation where AGENTS.md was created. In the fresh conversation, use this exact prompt:

Prompt to try

Do not make any changes.

Before we begin a new task, tell me what project-specific instructions apply to your work here.

For each instruction:

- summarize it in plain language; and
- tell me where that instruction came from.

Do not infer additional rules that are not actually present.
Codex recognizing persistent project guidance from AGENTS.md in a new conversation: a table of instructions, each with a plain-language summary and a source column naming AGENTS.md
In a fresh conversation, Codex lists the standing instructions and names AGENTS.md as the source of each one. Open full-size image: the generated AGENTS.md (opens in a new tab)

Step 5 — Not every reusable instruction belongs in the project

AGENTS.md answers:

“How should Codex work in this project?”

A Skill answers:

“How should an AI perform this kind of task?”

Prompt to try

Do not create or install anything yet.

Review the workflows we have used in this tutorial.

Identify:

- one instruction that clearly belongs in this project's AGENTS.md; and
- one workflow that could be useful across many different projects and therefore might be better represented as a reusable Skill.

Explain why they belong in different places.

For the reusable workflow, propose only:

- a short Skill name;
- when it should be used;
- the major steps it would contain; and
- what evidence it should report at the end.

Do not create the Skill yet.

Where Skills fit

A Skill packages instructions and supporting resources for a repeatable kind of work, and unlike AGENTS.md it is not inherently tied to one project: you might use the same interface-review Skill in several different projects while each project keeps its own AGENTS.md.

In the current desktop app, Skills appear under Plugins in the sidebar, on the Skills tab. Availability and installation can vary by workspace and product.

Save the project guidance

Once you are satisfied that the instructions are accurate and that Codex recognizes them in a fresh conversation, ask Codex to create a local commit for the new AGENTS.md, with a short commit message describing the addition of project guidance.

Do not connect to GitHub, and do not publish or upload anything.

What to notice

Better agent behavior does not always require a better one-time prompt; sometimes the missing ingredient is better context. AGENTS.md gives Codex standing guidance that belongs to one project, while a Skill represents a workflow that may be useful across many.

Both can reduce repetition, but neither should contain instructions simply because they sound helpful. Persistent guidance should be deliberate, evidence-based, and reviewed just as carefully as any other change.

Checkpoint

You are ready for Module 10 if you can:

Persistent instructions save repetition. They also deserve persistent scrutiny.