Update a pull request or merge request body to reflect the current state of changes. Use when a PR/MR has evolved through additional commits and the body needs to reflect what will be merged.
Scanned 2/12/2026
Install via CLI
openskills install bendrucker/claude---
name: update
description: |
Update a pull request or merge request body to reflect the current state of changes.
Use when a PR/MR has evolved through additional commits and the body needs to reflect what will be merged.
allowed-tools: Bash(bun:${CLAUDE_PLUGIN_ROOT}/scripts/*), Bash(${CLAUDE_PLUGIN_ROOT}/scripts/worktree/*), Bash(gh:*), Bash(git:*), Bash(glab:*), mcp__github
---
# Update Pull Request
The PR body documents what will happen when merged, not the journey. Don't echo review feedback. Only mention changes if the ultimate result is user-facing.
## Context
- Provider: !`bun "${CLAUDE_PLUGIN_ROOT}/scripts/detect-provider.ts"`
- Branch: !`"${CLAUDE_PLUGIN_ROOT}/scripts/worktree/git.sh" "$0" branch --show-current`
- PR: !`bun "${CLAUDE_PLUGIN_ROOT}/scripts/pr-context.ts" "$0" "${CLAUDE_PLUGIN_ROOT}/skills/update/assets/pr-context.graphql" 2>/dev/null || echo "No PR found for current branch"`
- Diff (GitHub): !`[ "$(bun "${CLAUDE_PLUGIN_ROOT}/scripts/detect-provider.ts")" = github ] && "${CLAUDE_PLUGIN_ROOT}/scripts/worktree/gh.sh" "$0" pr diff 2>/dev/null || true`
- Diff (GitLab): !`[ "$(bun "${CLAUDE_PLUGIN_ROOT}/scripts/detect-provider.ts")" = gitlab ] && "${CLAUDE_PLUGIN_ROOT}/scripts/worktree/glab.sh" "$0" mr diff 2>/dev/null || true`
## Workflow
1. **Branch validation**: If on a default branch (main/master) and no `$0` argument was provided, stop and tell the user to specify the target branch: `/pull-request:update <branch>`. When a branch argument is provided, all git/gh commands must run in that branch's worktree using the wrapper scripts.
## Analysis
1. Filter commits after `lastEditedAt` to identify new work since the body was last written. If `lastEditedAt` is `null` (never edited), treat all commits as new work.
2. Analyze the changes introduced by those commits.
## Writing
1. Rewrite the PR body following the same title and body rules as the create skill. See [`sections.md`](sections.md) for section guidance.
2. Write the updated body to a temp file (e.g., `tmp/pr-body-<branch>.md`) and apply:
- **GitHub**: `gh pr edit --body-file tmp/pr-body-<branch>.md`
- **GitLab**: `glab mr update --description "$(cat tmp/pr-body-<branch>.md)"`
## GitLab Notes
For advanced GitLab features (stacking, username lookup), load `gitlab:merge-request`.
No comments yet. Be the first to comment!