codex/skills/update-pr/SKILL.md
Update an existing GitHub pull request's title and description to reflect the current state of the branch. Use when the user asks to "update the PR", "update PR description", "update PR title", "refresh PR description", or "sync PR with changes".
npx skillsauth add tobihagemann/turbo update-prInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Read the current PR title and body, analyze what changed in the session, and draft an updated title and description that preserves the original writing style.
Fetch the current PR details:
gh pr view [PR_NUMBER] --json number,title,body,baseRefName,headRefName,updatedAt,commits
Omit PR_NUMBER to auto-detect from current branch.
Before drafting, study the current title and body to identify:
feat:, fix:), capitalizationUse the PR's updatedAt field and commit timestamps to determine whether new commits were added since the body was last edited.
If commits_since_body_change is empty, the description is already up to date — say so and stop.
If there are commits since the last body change, check the incremental diff to assess significance:
git diff origin/<base>...HEAD --diff-filter=d --stat -- $(git diff --name-only --since="<body_last_changed>" origin/<base>..HEAD)
Skip the update if the incremental changes are trivial (formatting, typos, config-only). Proceed if they add, remove, or modify meaningful behavior.
Derive the PR description from the full diff, not from individual commits. The description should reflect the net change — what the code looks like now vs. the base — not the development journey. Intermediate bug fixes, reverted approaches, and implementation pivots that happened during development are not relevant to the reader.
git diff origin/<base>...HEAD for the full scope of changes — this is the primary source of truthRun $github-voice to load writing style rules before drafting.
Write an updated title and body that:
Output the drafted title and description as text, alongside the original for comparison. Then use request_user_input for confirmation.
After confirmation, write the drafted body to .turbo/pr/<PR_NUMBER>-body.md with apply_patch, then update the PR:
gh pr edit <PR_NUMBER> --title "<TITLE>" --body-file .turbo/pr/<PR_NUMBER>-body.md
GitHub renders Mermaid natively in PR descriptions via ```mermaid code blocks. Include diagrams only when they add clarity a text description can't.
Include when the changes introduce or modify a clear runtime flow: API endpoints, event handlers, pipelines, multi-service interactions, webhook flows.
```mermaid
sequenceDiagram
Client->>API: POST /payments
API->>PaymentService: processPayment()
PaymentService->>StripeClient: charge()
StripeClient-->>PaymentService: confirmation
PaymentService->>DB: save()
```
Include when the changes add or modify entity states, status enums, workflow transitions, or lifecycle hooks.
```mermaid
stateDiagram-v2
[*] --> Draft
Draft --> Pending: submit()
Pending --> Approved: approve()
Pending --> Rejected: reject()
Approved --> [*]
```
## Flow or ## State Machine heading.turbo/ content (filenames, requirement IDs, shell references, headings) in the title or body. .turbo/ is gitignored, so these references would be opaque to anyone reading without local copies.tools
Teach the user to deeply understand a change through interactive tutoring: restating understanding, drilling into why/what/how, and quizzing until mastery. The active counterpart to a one-shot explanation. Use when the user asks to "understand this change", "teach me this change", "help me understand what changed", "walk me through this change", "make sure I understand this", "quiz me on this", or "teach me what we did".
tools
Teach the user to deeply understand a change through interactive tutoring: restating understanding, drilling into why/what/how, and quizzing until mastery. The active counterpart to a one-shot explanation. Use when the user asks to "understand this change", "teach me this change", "help me understand what changed", "walk me through this change", "make sure I understand this", "quiz me on this", or "teach me what we did".
tools
Execute an approved split plan by creating separate branches, commits, and PRs for each change group. Use when the user asks to "split and ship", "ship the split plan", "create separate PRs", or "split changes into branches".
tools
Commit, push, and optionally create or update a PR for the current staged changes. Use when the user asks to "ship", "ship it", "ship changes", "commit push and PR", or "ship this".