Seven documented Codex and Claude Code features that help one developer plan, build, test and review like a small team.
When you build software alone, you do every job yourself. You plan, write the code, test it and review it. Nobody checks your work. And when you open an old project, you can lose hours just working out how it fits together.
An AI coding agent can take some of that load. It's an AI that works inside your project: it reads your files, changes code and runs commands, such as your tests. You tell it what you want in plain English.
This article covers the two best-known agents, Codex from OpenAI and Claude Code from Anthropic, with seven tricks and six smaller tips. Every feature comes from the official docs.
| Term | What it means |
|---|---|
| Terminal | The text window where you type commands. A CLI is a tool you use there. |
| IDE | The app you write code in, such as VS Code. |
| Branch | A separate line of work in Git, the tool that tracks code changes. |
| Pull request (PR) | A request to add a branch's changes to the main code, so they can be reviewed first. |
| Tokens | Small chunks of text an AI reads and writes. The more tokens a task uses, the more of your plan's usage it takes. |
| CI | Tools that run checks automatically every time code changes. |
Most features exist in both, under different names. Figure 1 lines them up.
Each trick explains the idea first, then shows how to do it in each tool.
Both tools read a notes file from your project at the start of every session. Think of it as onboarding docs for the AI: how to run the tests, and what not to touch.
AGENTS.md. If you have several, Codex combines them, and the one closest to the folder you're working in takes priority.CLAUDE.md. Version 2.1.277 and later also read AGENTS.md, but by default only if there's no CLAUDE.md or CLAUDE.local.md. Run claude --version to check yours. To share one file, write @AGENTS.md inside CLAUDE.md./init command that writes a first draft.Start with the command that runs your tests. Anthropic calls it "the single most useful line" in the file.
## Commands
- Run tests: npm test
## Rules
- Never edit files in /migrations by hand.
In plan mode, the agent researches your code and writes a plan for you to approve. In Claude Code, it can't edit your files until you approve the plan. You fix the plan first, then let it start. Fixing a plan takes a minute; undoing wrong changes takes much longer.
Shift+Tab until the status bar shows plan mode, or start your message with /plan. Claude will "research and propose changes without making them."/plan and your request.It's also the easiest way into a project you didn't write. The agent reads all the code; you read a short summary.
Try this/plan Explain how an order moves from the cart to payment. Then propose how to add discount codes, and list the files you'd change.
An agent can't tell whether its work is right unless it can check. Tests give it that check, because they pass or fail. Anthropic's advice: "Give Claude something it can run that comes back pass or fail."
For bugs, ask for the test first. A test that fails before the fix and passes after it proves the bug is gone.
Try thisCheckout shows a 500 error when the cart is empty. Error message: [paste]. Write a failing test that shows the bug, fix it, then run all the tests.
In a long session, the AI has more to keep in mind and can forget early details. A subagent is a helper the main agent sends off to do one focused job, like searching the code. It works separately and reports back only its answer.
.claude/agents/..codex/agents/.Good to know: OpenAI says subagents "consume more tokens than comparable single-agent runs," so they use up your limits faster.
Two agents in the same folder can overwrite each other's changes. The fix is a Git worktree: a second copy of your project on its own branch.
claude --worktree feature-auth starts a session in its own worktree.You can also send work to the cloud, so it runs on the provider's computers instead of your laptop:
claude --cloud "Fix the flaky date test" starts a cloud session. A flaky test is one that sometimes passes and sometimes fails.--attempts flag on codex cloud exec runs 1 to 4 separate attempts at the same task, so you can keep the best result. For example: codex cloud exec --env ENV_ID --attempts 3 "Fix the flaky date test".Your job becomes writing clear tasks and checking results (Figure 3). Before letting agents run alone, read our guide to AI agent guardrails.
A skill is a saved set of instructions for a job you repeat, like "prepare a release." It's a folder with a SKILL.md file inside.
.claude/skills/ and run one with / plus its name..agents/skills/ and call one with $ plus its name. $skill-creator helps you write one.A skill only needs a name, a description that says when to use it, and the steps. This one works in either tool, saved as release-notes/SKILL.md in the folder above:
---
name: release-notes
description: Writes release notes from the commits since the last tag. Use when preparing a release.
---
1. List the commits since the last Git tag.
2. Group them into Features, Fixes and Other.
3. Add the notes to the top of CHANGELOG.md.
An agent can still skip a skill's advice. A hook can't be skipped: it's a small script that runs automatically at a set moment, every time. Anthropic says hooks make "certain actions always happen rather than relying on the LLM to choose to run them." For example, a hook can run your code formatter after every edit, or block edits to .env, the file that usually holds passwords.
Here's Anthropic's documented formatter hook. It goes in .claude/settings.json and needs jq and Prettier installed:
{
"hooks": {
"PostToolUse": [
{
"matcher": "Edit|Write",
"hooks": [
{
"type": "command",
"command": "jq -r '.tool_input.file_path' | xargs npx prettier --write"
}
]
}
]
}
}
Claude Code keeps hooks in its settings file. Codex has hooks too, in hooks.json, and asks you to trust each one before it runs. Both agents also run inside scripts and CI, without a chat window, using codex exec or claude -p.
Mistakes are hard to spot in your own code, because you know what you meant. So ask the agent that didn't write a change to review it.
/review to check your changes, or comment @codex review on a GitHub pull request. There, Codex "flags only P0 and P1 issues," the most serious ones./code-review to check your changes, or /security-review to look for security holes. Team and Enterprise plans can also turn on Code Review for GitHub pull requests.Good to know: Anthropic's Code Review "never approves or blocks the pull request." The agents point out problems; you decide what gets merged.
Here's how the tricks fit together on a normal working day. It's an example, not a recorded session.
@codex review on Claude's pull request and run /code-review on Codex's.That's four roles covered in one day, and you still made every decision.
Esc twice with an empty prompt box, or type /rewind to go back to an earlier point. It can't undo files changed only by terminal commands, so keep saving your work in Git.codex mcp add or claude mcp add./install-github-app once, then mention @claude in an issue or pull request.claude --teleport pulls a Claude Code cloud session into your terminal to finish locally.An agent runs real commands on your computer. So decide how much it may do without asking you first.
/permissions. OpenAI's advice is simple: "For most work, start with Ask for approval." OpenAI describes its Full access mode as "Unrestricted access to the internet and any file on your computer," so keep it for throwaway setups. Network access is off by default.Shift+Tab to switch to Manual mode. The mode that skips every check, bypassPermissions, is meant for "isolated containers and VMs only."/clear between unrelated tasks./init to create a notes file, and add your test command.The main commands from this article in one place.
| Job | Codex | Claude Code |
|---|---|---|
| Create a notes file | /init (writes AGENTS.md) | /init (writes CLAUDE.md) |
| Plan first | /plan | Shift+Tab until plan mode shows, or /plan |
| Work in parallel | Worktrees | claude --worktree <name> |
| Send a task to the cloud | codex cloud exec --env <id> "<task>" | claude --cloud "<task>" |
| Use a skill | $skill-name | /skill-name |
| Review changes | /review, @codex review | /code-review, /security-review |
| Run in scripts and CI | codex exec | claude -p |
| Connect a tool | codex mcp add | claude mcp add |
| Set permissions | /permissions | Shift+Tab (modes), /permissions (rules) |
| Undo an edit | Use Git | Esc twice or /rewind |
And the three prompts to copy:
/plan Explain how an order moves from the cart to payment. Then propose how to add discount codes, and list the files you'd change.
Checkout shows a 500 error when the cart is empty. Error message: [paste]. Write a failing test that shows the bug, fix it, then run all the tests.
Use a subagent to find every place this app sends an email, and list the files.
These tools don't replace a team's judgment. What changes is where your time goes: less typing, more planning and checking.
Use Codex for clear jobs you can hand to the cloud, and Claude Code for work you want to guide closely on your own machine. Then let each review the other. That gives a solo developer what's usually missing: a second pair of eyes on every change.