Community程式設計與開發github.com

codex-pr-body

更新一個或多個 Pull Request 的標題與內容主體。

codex-pr-body 是什麼?

此技能可讓 AI 助理自動更新 GitHub Pull Request 的標題與內容主體。它會自動辨識目前分支或提交關聯的 PR,並利用 `gh` CLI 工具進行編輯。技能特別強調保留既有 PR 內容中的重要資訊(如圖片),並根據對話脈絡說明變更的「原因」與「內容」,同時避免提及本機絕對路徑或機密資訊。此外,它也支援堆疊式 PR(stacked PR)與 Sapling SCM 工作流程,能正確計算堆疊中 base 與 head 之間的淨變更。此技能適用於 Claude Code、Coder、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 可以明確指定,但一般情況下,會根據使用者目前正在處理的分支/提交來推斷。對於一般的 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 永久連結。

務必引用任何相關的 Pull Request 或 Issue,不過在自己的 PR 主體中不需要引用該 PR 本身。

如果此變更需要更新 https://developers.openai.com/codex 上的文件,請在 PR 主體末尾附近用一個單獨的章節說明。如果不需要更新文件,則省略此章節。

處理堆疊

有時一個 Pull Request 由一疊疊加的提交組成(stack of commits)。在這種情況下,PR 主體應反映整個堆疊的淨變更,而不是組成堆疊的各個提交。

同樣地,使用者可能會使用像 Sapling 這樣的工具來利用堆疊式 Pull Request,此時 PR 的 base 可能是堆疊中另一個 PR 的 head 分支,而不是 main。在這種情況下,請確保只討論該 PR 在該堆疊 base 與 head 之間的淨變更,而不是相對於 main 的變更。

Sapling

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

在 Sapling 中,執行以下指令可查看目前修訂版本是否關聯了 GitHub Pull Request:

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

或者,您可以執行 sl sl 來查看目前的開發分支以及當前提交是否關聯了 GitHub Pull Request。例如,如果輸出是:

  @  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 Pull Request #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.

相關技能