ask-codex
БесплатноЗапускает вложенные скриптыНе проверенConsult OpenAI Codex (headless `codex exec`) for an independent review of a design doc, spec, plan, PRD, decision, diff, or piece of code, then reconcile its…
от xdg★ 20 звёзд на GitHubОб этом скилле
Ask Codex
Ask a different model to critique an artifact, then report where it and you agree, disagree, and what changed your mind. The value is independence: codex has none of this conversation's context, so it catches assumptions you and the user share without noticing.
This skill handles the codex invocation details (closed stdin, read-only sandbox, timeout) that otherwise hang or misbehave.
Do NOT use for generic requests for a second opinion, outside review, sanity check, or another model; handle those yourself or ask which reviewer they want.
Invocation
Always go through the bundled script; never call codex exec directly.
scripts/ask-codex.sh [-m MODEL] [-e EFFORT] [-t SECONDS] [-C DIR] PROMPT_FILE
(scripts/ is relative to this skill's directory.)
The script exists because headless codex has sharp edges:
codex execreads stdin until EOF whenever stdin is not a TTY. From an agent's Bash tool that means it blocks forever. The script redirects</dev/null; codex prints "Reading additional input from stdin...", sees EOF, and proceeds.- stdout mixes the answer with a banner (version, workdir, model). The
script uses
-o FILEto capture only the final message and discards the rest; stderr is shown only on failure. - Codex can run shell commands. The script pins
-s read-onlyso a reviewer can read the repo but cannot modify it, and--ephemeralso no session file is left behind. - No
timeouton macOS. The script bounds the run withperl alarm(default 600s). Set the Bash tool's own timeout at least as high.
Write the prompt to a file in the scratchpad directory and pass the path. A long prompt on the command line is fragile (quoting, ARG_MAX).
-C DIR sets codex's working root; default is the current directory. Codex
resolves relative paths in the prompt against it and can read any file
under it, so point it at the repo root when the artifact references
other files.
-m MODEL and -e EFFORT (reasoning effort, e.g. low, medium,
high) override the user's codex config (~/.codex/config.toml). Omit
both unless the user asks for a specific model or effort; their configured
defaults are deliberate.
Writing the prompt
Codex starts cold. The prompt is the whole briefing. Include:
- Role and stance. "You are an independent reviewer. Be direct and specific; do not soften findings. Skip praise." Without this codex tends toward balanced summaries that add nothing.
- The artifact. Either the repo-relative path(s) to read, or the text
inline for content that is not on disk (a plan from the conversation, a
proposed API). For a diff:
git diff ... > scratch/change.diffand name that file. For code, name the files and the entry points; do not make it guess where to look. - Enough context to judge. The goal the artifact serves, the constraints
that are fixed (language, stack, invariants), and what decisions are
already made and out of scope. Two or three sentences usually suffice;
point to a doc (
docs/PRD.md) rather than paraphrasing a long one. - The specific questions. Generic "review this" gets generic output.
Ask what you actually are unsure about, and for the artifact type:
- Design doc / spec / PRD: missing requirements, internal
contradictions, unstated assumptions, simpler alternatives, failure
modes at scale, what will be hard to change later. Also ask whether
someone who knows the document above it, but not the code, could
follow each decision and judge it right or wrong, and whether its
claims about the existing code are true (run with
-Con the repo). - Plan: wrong ordering, hidden dependencies, steps that will be much bigger than they look, missing verification, claims about existing code that the code contradicts.
- Code / diff: correctness bugs, edge cases, concurrency, security, whether the change matches the stated intent, tests that are missing.
- Design doc / spec / PRD: missing requirements, internal
contradictions, unstated assumptions, simpler alternatives, failure
modes at scale, what will be hard to change later. Also ask whether
someone who knows the document above it, but not the code, could
follow each decision and judge it right or wrong, and whether its
claims about the existing code are true (run with
- Output shape. Ask for a ranked list of findings, each with severity, location (file:line or section heading), the problem, and a concrete suggestion. Ask it to state confidence and to separate "this is wrong" from "I would do it differently". Cap the count (e.g. top 10) so it ranks instead of pads.
Example prompt file:
You are an independent reviewer giving a second opinion. Be direct and
specific. Skip praise and summary; only report problems and alternatives.
Artifact: docs/milestones/05-usage/design.md (read it). Context: docs/PRD.md
sections FR-9 and FR-10 state the requirements. Fixed constraints: Go
backend, MongoDB, single container; per-user visibility is enforced in the
API layer, never in the database. Decided and out of scope: the choice to
store usage records outside the deleteAccountData cascade.
Questions:
1. Does the aggregation design bound memory as the collection grows?
2. Are there race conditions between the background job and
Установить ask-codex в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл ask-codex?
Consult OpenAI Codex (headless `codex exec`) for an independent review of a design doc, spec, plan, PRD, decision, diff, or piece of code, then reconcile its findings with your own view. Use ONLY when the user explicitly names codex (e.g. "ask codex", "what would codex say", "have codex review this").
Как установить скилл ask-codex?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл ask-codex запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic