Codex, AGENTS.md & Other Coding Agents

Use OpenAI Codex and the shared AGENTS.md convention so any coding agent follows your mobile project rules.

Codex is OpenAI's coding agent, available as a CLI and in the cloud. It reads AGENTS.md, an open convention that many coding agents support, so one file can steer several tools.

Core concepts

  1. AGENTS.md as the shared file: Keep one AGENTS.md with setup commands, conventions and testing instructions. If you use more than one agent, this avoids maintaining three copies of the same rules. — AGENTS.md
  2. Cloud tasks and branches: Cloud agents can work on a branch in the background and open a pull request. Treat that PR like any contributor's: read it, run it, then merge. — Codex docs
  3. Delegating the boring work: Good jobs for agents: upgrade dependencies, add tests, rename files, write migrations. Keep product decisions with you. — Codex docs
  4. Using several agents safely: Do not let two agents edit the same files at once. Give each a separate branch or a separate area of the app. — Git branching guide

Concept videos

YouTube channels and searches for these topics. On a large screen they open in the reading panel next to the roadmap.

Explanation

What belongs in AGENTS.md

Install and run commands, test commands, code style, folder map, and a short list of things the agent must never do. It should read like a README written for a machine.

Reviewing agent pull requests

Check that the diff matches the plan, that tests exist, that no secrets or .env files were added, and that no unrelated files changed.

What Is It?

AGENTS.md is a plain markdown file that tells coding agents how to work in your repository.

Why Should I Care?

One shared file keeps behaviour consistent when you move between Codex, Cursor and Claude Code.

Real World Analogy

AGENTS.md is the house rules sheet on the fridge: whichever contractor walks in, they read the same page.

Visual Mental Model

text
AGENTS.md -> Cursor / Claude Code / Codex -> branch -> pull request -> your review

Smallest Possible Example

text
AGENTS.md
Setup: npm install, npx expo start
Checks: npx tsc --noEmit, npx expo lint, npm test
Style: TypeScript strict, NativeWind classes, hooks in lib/
Never: commit .env, add dependencies without asking, edit ios/ or android/ by hand

Common Mistakes

❌ Forgetting to list the test command.

Agents then skip verification. Put the exact commands in the file.

❌ Merging an agent PR because CI is green.

Green CI does not prove the feature works on a phone. Run it.

Build This Mini Project

Write an AGENTS.md, ask an agent to add a unit test for one utility function on a new branch, and review the PR.

Prompts for Cursor, Claude Code & Codex

Paste these into Cursor, Claude Code, Codex, or any coding agent. Replace the bracketed parts with your app details, and keep the agent in plan mode first so you review the approach before it edits files.

Branch-safe task

text
Work on a new branch named feat/[name]. Implement only: [task]. Run typecheck, lint and tests. Open a summary of changes, listing every file touched and why.

Dependency upgrade

text
Upgrade Expo to the latest SDK following the official upgrade guide. List breaking changes that affect this repo, apply them in separate commits, and run expo-doctor at the end.

Rules, databases & blogs to use

Resources

Threads in the same domain as this chapter — go deeper on iHateReading without leaving the roadmap.

Cursor, Codex, Claude Code prompts collection cover

Cursor, Codex, Claude Code prompts collection

200+ copy-paste prompts for coding agents to build better products.

Agent harnessing: the part of building AI agents nobody talks about cover

Agent harnessing: the part of building AI agents nobody talks about

Loop, tools, memory, sandbox, and tracing live in your code — not the model weights.