返回 Skill 列表
extension
分类: 开发与工程无需 API Key

codex-qa

使用OpenAI Codex CLI来回答关于代码的问题、分析文件或进行只读代码库探索。当用户要求使用Codex,希望从另一个AI代理那里获得第二意见,或者想要比较Claude的答案与Codex的响应时,调用此技能。

person作者: jakexiaohubgithub

Codex Q&A

Use OpenAI's Codex CLI to answer questions about the codebase.

Prerequisites

Codex CLI must be installed and configured:

npm install -g @openai/codex
# or
brew install --cask codex

An OpenAI API key must be configured (OPENAI_API_KEY environment variable or via codex initial setup).

Usage

Spawn the codex-qa subagent to handle the question:

Use the Task tool to spawn the codex-qa agent with the user's question.

The subagent will:

  1. Formulate a clear prompt for Codex
  2. Run codex exec "question" in read-only mode
  3. Return Codex's response

Direct Usage (without subagent)

If you prefer to run Codex directly:

codex exec "your question here"

Command Options

  • Basic query: codex exec "question"
  • With image: codex -i image.png exec "question about image"
  • JSON output: codex exec --json "question"
  • Longer timeout: codex exec --timeout 300000 "complex question"

Common Use Cases

  • Code explanation: "What does this function do?"
  • Architecture questions: "How is the database layer structured?"
  • Finding patterns: "Where is error handling implemented?"
  • Code review: "Review this file for potential issues"
  • Comparison: Get a second opinion on a code question

Notes

  • Codex exec runs in read-only mode by default - it cannot modify files
  • Activity streams to stderr, final answer goes to stdout
  • For complex questions, use the subagent for better context isolation