codex-pr-body

Updates pull request titles and bodies using the GitHub CLI.

5|1|Updated Jun 26, 2026
One-click install
npx skills add https://github.com/looooonk/better-codex --skill codex-pr-body-looooonk
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: codex-pr-body
Source: https://github.com/looooonk/better-codex/tree/main/.codex/skills/codex-pr-body
Command: npx skills add https://github.com/looooonk/better-codex --skill codex-pr-body-looooonk

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Keeping pull request titles and bodies accurate and informative is tedious, especially when a branch evolves during development or is part of a stacked PR workflow. This Skill rewrites PR titles and bodies via the gh CLI so they clearly explain why the change was made and what the net change is. ## Core Features & Use Cases - PR Discovery: Infers the target pull request from the current branch or commit using git branch and gh pr view, with support for Sapling SCM repositories. - Structured PR Bodies: Writes bodies that lead with the motivation (why), followed by the net change (what), verification notes, and documentation impact, while preserving existing content such as embedded images. - Stacked PR Support: Handles commit stacks and Sapling stacked pull requests by describing only the net change between the PR's base and head rather than relative to main. - Use Case: After finishing a feature branch, invoke this Skill to regenerate the PR body so reviewers see a clean explanation of the motivation, the net diff, and how the change was verified, without stale details from abandoned approaches. ## Quick Start Update the title and body of the pull request for my current branch to explain why this change was made and what it does.

Frequently Asked Questions about codex-pr-body

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I update a pull request body from the command line?▼

Use the GitHub CLI with gh pr edit to modify the title and body of a pull request. This Skill automates that by detecting the PR from your current branch and writing a structured body covering motivation, net change, and verification.

How to find the pull request associated with my current git branch?▼

Run gh pr view <branch> --repo openai/codex --json number --jq '.number' to resolve the PR number for a branch. For Sapling repositories, use sl log --template '{github_pull_request_url}' -r . or sl sl instead.

Does this work with stacked pull requests in Sapling?▼

Yes, it detects Sapling repositories via the .git/sl/store directory and uses sl commands to find associated PRs. For stacked PRs, the body describes only the net change between the PR's base and head, not relative to main.

Will rewriting a PR body remove existing images or content?▼

No, the Skill checks the existing pull request body first and preserves key information. Images are never removed because the author may have no way to recover them once deleted.

What should a good pull request body include?▼

A good PR body explains why the change is being made first, then what the net change is, followed by how it was verified. It should use Markdown formatting, reference related issues or PRs, and avoid local absolute paths or confidential information.