Skip to main content
skill CX Codex

ask-codex — Claude Code skill: query GPT-5, how to install

ask-codex is a Claude Code skill that sends a question about the current repo to OpenAI Codex (GPT-5) and returns the answer without a subagent. For one-off questions, a second opinion, and bug searches.

MIT ★ 195 updated 2026-08-10

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add Sateezg/codex-bridge
/plugin install codex-bridge@codex-bridge
Open on GitHub

What ask-codex does

The skill calls codex-run, which sends a question to Codex, reads the repo, and returns the final answer on stdout. Codex runs in read-only mode by default and cannot modify files.

Each question must be self-contained: Codex has no knowledge of the current conversation. Name the files or directories to look at, state what you already tried, specify the answer format (yes/no, line number, brief cause). Example: `codex-run -C /path/to/repo "In src/auth/session.ts, refreshToken() occasionally returns a token that fails validation immediately. I suspect a clock-skew issue in the exp comparison. Read that file plus src/auth/jwt.ts and tell me the single most likely root cause and the exact line. Be concise."`

Pass -s workspace-write to let Codex modify files, -r to continue the previous session for a follow-up question, --timeout 1800 to raise the wait limit for large repos. Each call spends the user's ChatGPT plan quota: one question, one call. Codex may cite files or lines that do not exist: verify any specific claim before acting on it.

What it helps with

  • get a second opinion on an architectural decision
  • find the root cause of a bug in an unfamiliar part of the codebase
  • ask GPT-5 a one-off question about the repo without starting a subagent

Example prompts for the agent

  • Ask Codex why refreshToken() returns an invalid token
  • Ask GPT which file handles session caching
  • Get a second opinion on the auth module design

How to install ask-codex

1Plugin marketplace

/plugin marketplace add Sateezg/codex-bridge
/plugin install codex-bridge@codex-bridge

This installs the whole codex-bridge plugin with all its skills

2Manually: put the files in place

~/.claude/skills/ask-codex/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/ask-codex/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about ask-codex

How to install ask-codex in Claude Code?

Run /plugin marketplace add Sateezg/codex-bridge, then /plugin install codex-bridge@codex-bridge. For Codex, use npx skills add Sateezg/codex-bridge --skill ask-codex -a codex.

What does ask-codex do?

The skill sends a question to OpenAI Codex (GPT-5) about the current repo and returns the answer without creating a subagent. Codex reads code by default but does not modify it.

Can I ask multiple questions in a row?

Yes, use the -r flag to continue the previous session: codex-run -C /path/to/repo -r "Now show me the minimal patch". This keeps Codex's context and avoids re-reading the repo.

Source text

SKILL.md · MIT
---
description: Ask OpenAI Codex (GPT-5) a one-off question about the current repo and get its answer back, without spinning up a subagent. Use when the user says "ask codex", "what does GPT think", "get a second opinion on this", or when you want an independent read on a design call, a tricky bug, or an unfamiliar area of the codebase.
---

# Ask Codex a question

For a single question with a single answer. Anything multi-step or long-running
belongs to a subagent (`codex-second-opinion`, `codex-reviewer`, `codex-debugger`).

```bash
codex-run -C <repo-dir> "<self-contained question>"
```

`codex-run` prints **only Codex's final answer** on stdout (it captures the final
message via `codex exec -o` rather than dumping the whole event log). It defaults
to a read-only sandbox, so Codex can read the repo but cannot change anything.

## Writing the question

Codex has zero knowledge of this conversation. Every question must stand alone:

- Name the files or directories it should look at.
- State what you already know or already tried.
- Say what shape of answer you want ("name the single most likely cause and the
  line to look at", "answer yes/no then justify in three sentences").

```bash
codex-run -C /path/to/repo \
  "In src/auth/session.ts, refreshToken() occasionally returns a token that fails validation immediately. I suspect a clock-skew issue in the exp comparison. Read that file plus src/auth/jwt.ts and tell me the single most likely root cause and the exact line. Be concise."
```

## Useful options

```
-s workspace-write   let Codex modify files (only when the user asked for that)
-m gpt-5-codex       model override
-r                   continue the previous codex session (follow-up question)
--timeout 1800       raise the 900s default for a big repo sweep
--raw                also print Codex's full event log to stderr, for debugging
```

Use `-r` for a genuine follow-up — it keeps Codex's own context and avoids paying
to re-read the repo:

```bash
codex-run -C /path/to/repo -r "Now show me the minimal patch for that."
```

## Rules

1. **Bash timeout ≥ 600000 ms** (10 min) — Codex explores the repo before answering.
2. **Report its answer as Codex's**, not as your own conclusion. Quote it, then add
   your own take separately if you disagree — the value here is having two
   independent opinions, and blending them destroys that.
3. **Sanity-check it.** Codex can confidently cite files or lines that don't exist.
   Verify any specific claim against the repo before acting on it.
4. **Read-only unless told otherwise.** Don't pass `-s workspace-write` on your own
   initiative.
5. Each call spends the user's ChatGPT plan quota. One question, one call.

© Sateezg · MIT · Sateezg/codex-bridge

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set12

The whole set →
codex-second-opinion codex-second-opinion is a Claude Code subagent that asks OpenAI Codex for an independent assessment. It runs when someone asks to consult Codex or check Claude’s work. CX Codex ★ 195repo stars codex-reviewer codex-reviewer is a Claude Code subagent that independently reviews diffs with OpenAI Codex and verifies each finding against the actual files. CX Codex ★ 195repo stars codex-review codex-review is a Claude Code skill that asks OpenAI Codex to review code changes independently. It runs on requests to inspect a PR, branch, or module, and before a substantial commit or merge. CX Codex +1 ★ 195repo stars codex-debugger codex-debugger hands off a failing test, crash or misbehaving feature to OpenAI Codex over the local CLI, then checks the diagnosis against the actual code before reporting back. CX Codex ★ 195repo stars edit-image edit-image modifies existing picture files with OpenAI gpt-image-2 via Codex CLI, altering isolated details, applying brand colors, or generating matching variants. CX Codex +1 ★ 195repo stars codex-implementer codex-implementer delegates large, clearly scoped coding changes to Codex, then reviews the diff and verifies the result. Useful for repetitive edits across files and bulk generation. CX Codex ★ 195repo stars codex-artist codex-artist is a Claude Code subagent that generates and edits image files through the local Codex CLI. It handles icons, logos, banners, mockups, photos, and asset sets. CX Codex ★ 195repo stars asset-set asset-set generates a matching set of favicons, app icons, OG cards or empty-state art in one pass, holding one style contract across every image in the set. CX Codex +1 ★ 195repo stars

Project sponsors

Companies that keep this analytics open