codex-docs

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Codex Docs

Codex Docs

Local mirror of OpenAI Codex documentation, kept fresh by a 3-hour GitHub Action. The cleaned Markdown lives in
references/
; the auto-generated topic list lives in
references/INDEX.md
; the per-file manifest with upstream URLs lives in
references/docs_manifest.json
.
OpenAI Codex文档的本地镜像,由每3小时执行一次的GitHub Action保持内容更新。清理后的Markdown文件存储于
references/
目录;自动生成的主题列表位于
references/INDEX.md
;包含上游URL的单文件清单存储于
references/docs_manifest.json

Scope

适用范围

Use this skill for Codex-specific product and configuration questions, including CLI behavior,
codex.toml
, slash commands, Codex hooks, skills, MCP, subagents, AGENTS.md, prompts, sandboxing, cloud environments, models, pricing, security, migrations, and use-case recipes. If the question is about Claude Code hooks, Cursor, general OpenAI APIs, ChatGPT, GPT models, or another non-Codex product, this skill does not apply.
本技能适用于Codex专属的产品及配置相关问题,包括CLI行为、
codex.toml
配置、斜杠命令、Codex hooks、skills、MCP、子代理、AGENTS.md、提示词、沙箱机制、云环境、模型、定价、安全、迁移及使用场景示例。如果问题涉及Claude Code hooks、Cursor、通用OpenAI API、ChatGPT、GPT模型或其他非Codex产品,则不适用本技能。

Workflow

工作流程

  1. If the user supplied a topic, normalize it to a slug:
    • lowercase, strip leading
      /codex/
      , strip surrounding slashes
    • join nested segments with
      __
      (e.g.
      cli features
      ->
      cli__features
      ,
      guides agents-md
      ->
      guides__agents-md
      )
  2. If
    references/<slug>.md
    exists, read that file directly. Do NOT grep the whole
    references/
    tree first - the index plus targeted reads is faster and uses less context.
  3. If no exact match, read
    references/INDEX.md
    and pick the closest topic. If still ambiguous, list the candidates and ask.
  4. If the user supplied no topic, read
    references/INDEX.md
    and present the available topics.
  1. 如果用户指定了主题,将其标准化为slug格式:
    • 转为小写,去除开头的
      /codex/
      ,去掉首尾斜杠
    • 嵌套段落用
      __
      连接(例如:
      cli features
      ->
      cli__features
      guides agents-md
      ->
      guides__agents-md
  2. 如果
    references/<slug>.md
    文件存在,直接读取该文件。请勿先遍历整个
    references/
    目录进行搜索——通过索引加定向读取的方式更快,且占用更少上下文资源。
  3. 如果没有精确匹配项,读取
    references/INDEX.md
    并选择最接近的主题。若仍存在歧义,列出候选主题并询问用户。
  4. 如果用户未指定主题,读取
    references/INDEX.md
    并展示可用主题。

Answer format

回答格式

  • Lead with a direct answer to the user's question grounded in the file you read.
  • Quote short snippets (commands, config keys) when they appear verbatim in the doc.
  • End with
    Source: <upstream URL>
    using the
    original_url
    from the file frontmatter or
    references/docs_manifest.json
    .
  • 首先基于读取的文件内容,直接回答用户的问题。
  • 当文档中出现命令、配置键等内容时,引用原文片段。
  • 结尾附上
    来源:<上游URL>
    ,URL来自文件前置元数据或
    references/docs_manifest.json
    中的
    original_url
    字段。

Freshness and fallback

内容时效性与备选方案

The mirror is refreshed every 3 hours by upstream CI. If the local content looks stale, contradicted by the user, or empty:
  1. Suggest the user run
    npx skills update codex-docs
    .
  2. Cross-check the canonical URL via
    original_url
    in
    references/docs_manifest.json
    and offer it as a follow-up source.
  3. If a specific page failed MDX cleaning, the unmodified source is preserved at
    references/_raw/<slug>.md
    -- read that as a fallback.
该镜像由上游CI每3小时更新一次。如果本地内容看起来过时、与用户提供的信息矛盾或为空:
  1. 建议用户执行
    npx skills update codex-docs
    命令。
  2. 通过
    references/docs_manifest.json
    中的
    original_url
    字段交叉检查官方URL,并将其作为后续来源提供给用户。
  3. 如果特定页面MDX清理失败,未修改的原始源文件会保留在
    references/_raw/<slug>.md
    中——可读取该文件作为备选。

Examples

示例

User asksRead
"How do Codex hooks work?"
references/hooks.md
"What CLI features are available?"
references/cli__features.md
"How do cloud environments work?"
references/cloud__environments.md
"How should I write AGENTS.md?"
references/guides__agents-md.md
No topic or unclear topic
references/INDEX.md
用户问题读取文件
"Codex hooks如何工作?"
references/hooks.md
"有哪些CLI功能可用?"
references/cli__features.md
"云环境如何运行?"
references/cloud__environments.md
"我应该如何编写AGENTS.md?"
references/guides__agents-md.md
无主题或主题不明确
references/INDEX.md