ask-codex

ask-codex is a skill for Claude Code from xdg/xdg-claude. It costs 84 tokens per session (1,612 once invoked), scanned B, original, Apache-2.0.

A set of instructions for asking OpenAI Codex, a separate coding AI, to review something and then comparing its findings with the current agent's view.

In plain words
What is it for?
Use it when the user asks Codex to review a design document, specification, plan, product requirements document, pull request, diff, or code.
Why use it?
It provides an independent opinion that can expose shared assumptions or missed problems. It is intended for requests that explicitly mention Codex.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads ~/.codex paths; runs codex exec; mentions Codex.

Part of the ask-codex plugin — 1 skill shipped together

Good fit Use it when the user asks Codex to review a design document, specification, plan, product requirements document, pull request, diff, or code.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xdg/xdg-claude/ask-codex
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add xdg/xdg-claude --skill ask-codex
Clone the repo
git clone --depth 1 https://github.com/xdg/xdg-claude

Made for: Claude Code.

Or install ask-codex, the plugin that ships this one along with the rest of its 1 skill.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ask-codex

README.md
[![agentmods](https://agentmods.dev/badge/skills/xdg/xdg-claude/ask-codex/github.svg)](https://agentmods.dev/skills/xdg/xdg-claude/ask-codex)
Your own site
<a href="https://agentmods.dev/skills/xdg/xdg-claude/ask-codex"><img src="https://agentmods.dev/badge/skills/xdg/xdg-claude/ask-codex/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ask-codex

Your own site · 80×15
<a href="https://agentmods.dev/skills/xdg/xdg-claude/ask-codex"><img src="https://agentmods.dev/badge/skills/xdg/xdg-claude/ask-codex.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 84 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,612 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00084 $0.01612
Opus 5.5 $0.00034 $0.00645
Sonnet 5.5 $0.00017 $0.00322
Haiku 4.5 $0.00008 $0.00161

Measured 6d ago against content hash 6416690a82d6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

ask-codex scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/ask-codex.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

`high`) override the user's codex config (`~/.codex/config.toml`). Omit
ask-codex/skills/ask-codex/SKILL.md · 143 lines

How it starts

The opening of the file, as written. The whole thing — 143 lines — stays where its author put it; the contents beside it link to each section on 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 exec reads 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 FILE to 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-only so a reviewer can read the repo but cannot modify it, and --ephemeral so no session file is left behind.
  • No timeout on macOS. The script bounds the run with perl 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.

Read the full file on GitHub · 143 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 143 lines · 84 tokens per session scan B 6416690a82d6

Subscribe to this mod's changes

ask-codex is a skill published in the GitHub repository xdg/xdg-claude (20 stars, last pushed 6d ago), licensed Apache-2.0. It adds 84 tokens to every session and 1,612 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-01.

Related

ask-codex compared with skills from other repositories

ask-codex next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ask-codexxdg/xdg-claudeSkill206d agoApache-2.0B84Claude Code
autoreviewopenclaw/clawhubSkill9.5kyesterdayMITA17Claude Code, Codex
agent-teams-simplify-and-hardenLeoYeAI/openclaw-master-skillsSkill2.2k6d agoMITA115Claude Code, Codex
omh-code-reviewrlaope/oh-my-hermesSkill5.2kyesterdayMITA48Claude Code, Codex
revdiff-planumputun/revdiffSkill945yesterdayMITA84Claude Code
explore-unknownsdzhng/skillsSkill1.4k2d agoMITA162Claude Code, Codex
re0-mergeLilMGenius/paperthinSkill1.4k4d agoMITA70Claude Code