Community编程与开发github.com

codex-pr-body

更新一个或多个拉取请求的标题和正文内容。

codex-pr-body 是什么?

该技能用于自动化更新 GitHub 拉取请求(PR)的标题和正文。它能够智能推断当前分支或提交对应的 PR(结合 git branch 和 gh pr view 命令),并利用 gh 命令行工具进行编辑。技能强调在更新正文时,必须保留已有的关键信息(如图片),避免删除作者无法恢复的内容。正文结构要求先解释变更的“原因”(动机),再说明“变更了什么”,并聚焦于净变更,避免提及开发过程中的中间尝试。同时,要使用 Markdown 格式化正文,适当引用相关代码、PR 或 Issue,但无需自引用。对于栈式提交或 Sapling 工具的场景,技能会调整内容范围,确保只讨论栈的整体净变更或相对于栈基底的变更。支持 Codex 平台,适用于需要规范撰写 PR 描述的场景。

兼容平台~Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/openai/codex/tree/main/.codex/skills/codex-pr-body

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

确定 PR

当调用此技能时,可以显式指定要更新的 PR。但在常见情况下,将根据用户当前所在的分支/提交来推断 PR。对于普通的 Git 使用(即下面讨论的 Sapling 以外的场景),您可能需要结合使用 git branch 和 gh pr view <branch> --repo openai/codex --json number --jq '.number' 来确定当前分支/提交对应的 PR。

PR 正文内容

调用时,请使用 gh 编辑 PR 正文和标题,使其反映指定 PR 的内容。务必检查现有的 PR 正文,确保保留关键信息。例如,切勿删除现有 PR 正文中的图片,因为作者可能无法恢复您删除的内容。

解释变更的原因至关重要。如果当前调用此技能的对话中已经讨论了动机,请务必在 PR 正文中体现。

正文还应说明变更了什么,但这部分应置于“原因”之后。

讨论应仅限于提交的净变更。通常不建议在 PR 正文中讨论开发过程中尝试但后来撤销的变更。在重写 PR 正文时,您可能需要删除这些细节(当它们不再合适或对未来读者无用时)。

避免引用本地磁盘的绝对路径。当谈论仓库内的路径时,请直接使用相对于仓库的路径。

避免提及机密信息,包括但不限于代号或 OpenAI 内部 URL。

通常,讨论如何验证变更是有帮助的。但无需提及 CI 自动检查的内容,例如,不要将“运行 just fmt”作为测试计划的一部分。不过,指出为验证 PR 引入的新行为而特意编写的新测试通常是合适的。

使用 Markdown 专业地格式化 PR 正文。确保在行内引用“代码相关事物”时使用反引号。在引用代码或展示 shell 输出时,使用围栏代码块。此外,在引用与变更相关的现有代码时,请使用 GitHub 永久链接。

确保引用任何相关的 PR 或 Issue,但无需在自身的 PR 正文中引用该 PR。

如果此次变更需要更新 https://developers.openai.com/codex 上的文档,请在 PR 正文末尾附近添加一个单独的部分进行说明。如果无需更新文档,则省略此部分。

处理栈式提交

有时一个 PR 由一系列相互依赖的提交组成。在这种情况下,PR 正文应反映整个栈的净变更,而不是组成栈的单个提交。

同样,有时用户可能使用 Sapling 等工具来处理栈式 PR,这时 PR 的 base 可能是栈中另一个 PR 的 head 分支,而不是 main。在这种情况下,请务必只讨论 PR 的 base 和 head 之间的净变更(相对于该栈式基底),而不是相对于 main 的变更。

Sapling

如果 .git/sl/store 存在,则此 Git 仓库由 Sapling SCM (https://sapling-scm.com) 管理。

在 Sapling 中,运行以下命令查看当前修订是否有对应的 GitHub PR:

sl log --template '{github_pull_request_url}' -r .

或者,可以运行 sl sl 查看当前开发分支以及当前提交是否有对应的 GitHub PR。例如,如果输出如下:

  @  cb032b31cf  72 minutes ago  mbolin  #11412
╭─╯  tui: show non-file layer content in /debug-config
│
o  fdd0cd1de9  Today at 20:09  origin/main
│
~
  • @ 表示当前提交是 cb032b31cf
  • 它是一个开发分支,包含一个从 origin/main 分出的单个提交
  • 它与 GitHub PR #11412 关联

Individual skills in this repo

This repo contains 19 individual skills — each has its own dedicated page.

babysit-pr

Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep watching open PRs so fresh review feedback is surfaced promptly. Use when the user asks Codex to monitor a PR, watch CI, handle review comments, or keep an eye on failures and feedback on an open PR.

code-review

Run a final code review on a pull request

code-review-change-size

Change size guidance (800 lines)

code-review-context

Model visible context

code-review-testing

Test authoring guidance

codex-bug

Diagnose GitHub bug reports in openai/codex. Use when given a GitHub issue URL from openai/codex and asked to decide next steps such as verifying against the repo, requesting more info, or explaining why it is not a bug; follow any additional user-provided instructions.

codex-issue-digest

Run a GitHub issue digest for openai/codex by feature-area labels, all areas, and configurable time windows. Use when asked to summarize recent Codex bug reports or enhancement requests, especially for owner-specific labels such as tui, exec, app, or similar areas.

imagegen

Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output should be a bitmap asset rather than repo-native code or vector. Do not use when the task is better handled by editing existing SVG/vector/code-native assets, extending an established icon or logo system, or building the visual directly in HTML/CSS/canvas.

openai/babysit-pr

Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep watching open PRs so fresh review feedback is surfaced promptly. Use when the user asks Codex to monitor a PR, watch CI, handle review comments, or keep an eye on failures and feedback on an open PR.

openai-docs

Use when the user asks how to build with OpenAI products or APIs, asks about Codex itself or choosing Codex surfaces, needs up-to-date official documentation with citations, help choosing the latest model for a use case, or model upgrade and prompt-upgrade guidance; use OpenAI docs MCP tools for non-Codex docs questions, use the Codex manual helper first for broad Codex self-knowledge, and restrict fallback browsing to official OpenAI domains.

openai/test-tui

Guide for testing Codex TUI interactively

path-types

Choose Rust types for operating system paths across the Codex repository. Use when defining new path-bearing types or explicitly migrating existing ones.

plugin-creator

Create and scaffold plugin directories for Codex with a required `.codex-plugin/plugin.json`, optional plugin folders/files, valid manifest defaults, and personal-marketplace entries by default. Use when Codex needs to create a new personal plugin, add optional plugin structure, generate or update marketplace entries for plugin ordering and availability metadata, or update an existing local plugin during development with the CLI-driven cachebuster and reinstall flow.

pushing-ci-changes

Pushing GitHub Actions changes, resolving push rejection, requesting upload exceptions.

remote-tests

Testing against remote executors in integration tests.

skill-creator

Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Codex's capabilities with specialized knowledge, workflows, or tool integrations.

skill-installer

Install Codex skills into $CODEX_HOME/skills from a curated list or a GitHub repo path. Use when a user asks to list installable skills, install a curated skill, or install a skill from another repo (including private repos).

test-tui

Guide for testing Codex TUI interactively

update-v8-version

Update Codex's pinned `v8` / `rusty_v8` versions, validate the release-candidate path, and investigate failed V8 canary or artifact builds. Use when asked to bump V8, update `rusty_v8` artifacts, prepare or validate a V8 release candidate, check `v8-canary`, or diagnose why a V8 version update no longer builds.

相关技能