# Codex

Use the local Codex CLI as an independent second agent.

- Repository: https://github.com/dzhng/skills (1394 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add dzhng/skills --skill codex -g -a claude-code -y`
Codex: `npx skills add dzhng/skills --skill codex -g -a codex -y`
Cursor: `npx skills add dzhng/skills --skill codex -g -a cursor -y`
Gemini CLI: `npx skills add dzhng/skills --skill codex -g -a gemini-cli -y`

## Description

Use the local Codex CLI as an independent second agent. Two branches, (1) proactively run `codex review` for a second opinion after completing a substantive change, before presenting it as done or committing; (2) delegate a well-defined implementation task via `codex exec`, ONLY when the user explicitly asks for Codex to do it. Also covers how to prompt Codex.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Codex

Codex is an independent agent on PATH (`codex`, invoke as `command codex` if
a shell alias shadows it), sharing this working tree and already authenticated. It is a second opinion, not ground truth: verify what it
reports, own what it changes. It reads the same skills your repo carries.

Leave Codex's model at its CLI default unless the user asks for a specific
one. The default follows the current Codex release; do not pin a dated model
ID in this skill. If an explicit override is needed, verify it is current and
pass the requested model with `-m <model>`.

## If `codex` is not installed

When `codex` is missing from PATH, offer to install it, **ask the user for
approval first**, never install on your own initiative. On yes, follow the
current instructions at https://developers.openai.com/codex/cli. First-run
authentication is interactive, hand that step to the user. Verify with
`codex --version` before proceeding.

## Prompting Codex

Prompt Codex like an operator, not a collaborator: compact, block-structured
with XML tags. State the task, what "done" looks like, and the few constraints
that matter. A tighter prompt beats a bigger run, improve the contract before
raising `--effort`.

The rest: https://github.com/dzhng/skills/blob/HEAD/skills/engineering/codex/SKILL.md
