home/claude/skills/pr-update/SKILL.md
Update the title and body of an existing pull request
npx skillsauth add lambdalisue/dotfiles pr-updateInstall 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.
!git branch --show-current
!gh pr view --json number,title,body,baseRefName,headRefName --jq '"\(.number) \(.headRefName) -> \(.baseRefName)\nTitle: \(.title)\nBody:\n\(.body)"' 2>/dev/null || echo "No PR found for current branch"
Target PR:
gh pr viewLanguage: Match the language of the existing PR title and body. Default to English if unclear.
Scope: Use only origin/<base>..HEAD diff for analysis.
Title: Concise summary of all changes (imperative mood)
Body: Explain WHY these changes were made, not just WHAT changed. Preserve existing structure if the body already follows a consistent format.
Identify PR - Determine target PR number:
gh pr view --json number --jq '.number' to get PR for current branchFetch Current PR - Get current title, body, and base branch:
gh pr view <number> --json title,body,baseRefName,headRefName
Analyze Changes - Review commits and diffs from base branch:
git log --oneline origin/<base>..HEAD
git diff --stat origin/<base>..HEAD
Detect Language - Check the language of the existing PR title/body
Draft Update - Create updated title and body, displayed in a fenced code block:
Title: <concise summary>
## Summary
- <bullet points of changes>
## Why
<explanation of WHY these changes were made>
## Test Plan
- [ ] <test items>
Show Diff - Clearly show what changed from the current PR:
STOP - Wait for user approval before updating (use AskUserQuestion)
Update - Only after user confirms, execute:
gh pr edit <number> --title "<title>" --body "<body>"
### Current
Title: Add new feature
### Proposed
Title: Add OAuth2 support for GitHub login
## Summary
- Add GitHub OAuth2 authentication flow
- Store tokens securely with encryption
## Why
Users requested GitHub login to avoid creating separate accounts.
OAuth2 chosen over OAuth1 for simpler flow and short-lived tokens.
## Test Plan
- [ ] Test login flow with valid GitHub account
- [ ] Verify token refresh works correctly
Identify the target PR (from argument or current branch), fetch current title and body, analyze commits, and draft updated content for user approval.
IMPORTANT:
gh pr edit to preserve formattingtools
Update the title and body of an existing pull request WITHOUT asking for approval
tools
Create a pull request with title and body based on commits WITHOUT asking for approval
tools
Create a Conventional Commit from already staged changes WITHOUT asking for approval
tools
Map staged changes to existing commits and create fixup commits for autosquash WITHOUT asking for approval