/codex:design-challenge [path | <pr-number> | blank for working tree] [--base <ref>] [hypothesis / focus text ...]from codex
Runs an adversarial design review via codex exec, challenging the approach (not correctness) of code changes. Accepts path, PR number, or working tree scope.
Ships in codex. Installing the plugin adds it to Claude Code.
/design-challengeRun an adversarial design review through one read-only codex exec run, via the codex-run wrapper. Distinct from /codex-review — this command challenges the approach, not the correctness of the code.
Raw slash-command arguments:
$ARGUMENTS
codex-run, and return Codex's output verbatim.Identical to /codex-review. Parse $ARGUMENTS in this order — first match wins:
123) or matches ^#\d+$ or is a full GitHub PR URL.
gh pr view "$ARG" --json number,title,baseRefName,headRefName -q '.'.gh pr diff "$PR_NUM" --patch > /tmp/codex-design-challenge.patch.gh is missing or no GitHub remote, stop with: "PR mode requires gh and a GitHub remote."git status --short -- <path> non-empty), use git diff HEAD -- <path>; otherwise read the file(s) at their current state and review the design they embody.--base <ref> is present.
git diff "$BASE"...HEAD > /tmp/codex-design-challenge.patch.--base.
/codex-review).Free-form text after the positional arg / --base <ref> is treated as the DESIGN HYPOTHESIS / FOCUS — the author's stated approach and reasoning. Preserve verbatim. This text is the most important input to a design challenge — without it, Codex must infer the hypothesis from the diff (and will say so).
If the scoped review is empty, stop with: "Nothing to review."
Use the prompt template from the codex:design-challenge skill. The skill is the source of truth — fill its slots:
CONTEXT — derive from PR title/body in PR mode; in local modes, prompt the user for one short sentence if the focus text doesn't already cover it (one AskUserQuestion round, then proceed).DESIGN HYPOTHESIS — the user's free-form text. If empty, write <not stated — Codex must infer from SCOPE>.SCOPE — paste the captured diff/file content inline. If it exceeds ~600 lines, list paths and let Codex read within cwd.PROJECT CONVENTIONS — read root CLAUDE.md and any nested CLAUDE.md files; include the "hard rules" / non-obvious sections verbatim. If none, write <none documented>. Also include relevant docs/adr/*.md filenames so Codex knows prior decisions exist.FOCUS — any free-form text that wasn't absorbed by the hypothesis slot.Keep the CHALLENGE DISCIPLINE block and OUTPUT FORMAT block (Assumptions / Failure modes / Alternatives / Recommendation) exactly as written in the skill. Do not insert severity labels or merge verdicts — they belong to /codex-review, not here.
Run exactly one challenge, as described in the codex:design-challenge skill's Invocation section:
D=$(mktemp -d "${TMPDIR:-/tmp}/codex-challenge.XXXXXX")$D/prompt.md with the Write tool.codex-run --start <absolute cwd> "$D/prompt.md" "$D" — returns at once; the run is detached.timeout: 600000): codex-run --wait "$D". Exit 75 = still running → call it again until another exit code. Never run_in_background.0 → the critique is everything after the ----- line. Anything else → see Output handling.codex-run is read-only with no write mode. A design challenge that lets Codex write contradicts the whole framing.
codex-run exits non-zero (Codex errors, timeout, crash), print its output and stop. Do not generate a substitute critique.--wait / --background flags on this command — the run is always detached and polled with codex-run --wait./codex-review's job.What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
npx claudepluginhub davie521/claude-skills --plugin codex