Imported from jimmypaolini/codebase (
.agents/skills/update-pull-request/SKILL.md). Install upstream withnpx skills add jimmypaolini/codebase --skill update-pull-request. Copyright stays with the author (MIT).
Update Pull Request
This skill teaches how to update an existing pull request's title and description so they accurately reflect the implemented changes.
When to Use This Skill
- A PR description is outdated or no longer matches the implementation
- You want to sync the PR title and description with the latest changes on the branch
- Addressing reviewer feedback about unclear PR descriptions
- After significant changes to the branch that alter the scope or intent
PR Conventions
All PR title rules, validation requirements, and description templates follow the same conventions as creating PRs. See create-pull-request skill for complete details.
Title Format
<type>(<scope>): <gitmoji> <subject>
- Format:
<type>(<scope>): <gitmoji> <subject>(max 128 chars) - Subject: Imperative mood, lowercase after gitmoji, no period
- Gitmoji: Must match the type (โจ feat, ๐ fix, ๐ docs, โป๏ธ refactor, ๐ง chore, โฌ๏ธ dependencies, etc.)
Description Template
## ๐ฐ Summary
<!-- Brief description of what this PR does (1-2 sentences) -->
## ๐ Details
- <!-- List of specific changes made -->
## ๐งช Testing
1. <!-- How to manually verify these changes work correctly -->
## ๐ Related
- <!-- Link any relevant documentation or related resources like internal documentation, GitHub issues/pull requests -->
Workflow
Step 1 โ Identify the Active Pull Request
Determine the current branch and locate its open PR:
git rev-parse --abbrev-ref HEAD
gh pr view --json number,title,body,baseRefName
If no PR exists, inform the user and suggest using the create-pull-request skill instead.
Step 2 โ Gather the Full Diff
Get the complete set of changes between the base branch and HEAD:
git log origin/main..HEAD --oneline
git diff origin/main..HEAD --stat
git diff origin/main..HEAD
For large diffs, also review individual commits to understand intent:
git log origin/main..HEAD --format="%h %s"
Step 3 โ Analyze Changes
From the diff, determine:
- Primary type โ What kind of change is this? (
feat,fix,refactor,docs,chore, etc.) - Scope โ Which project(s) or category is affected?
- Gitmoji โ Which emoji matches the type?
- Summary โ A 1-2 sentence description of the overall purpose
- Detailed changes โ A complete bulleted list of every meaningful modification
- Testing strategy โ Relevant
nxcommands and manual verification steps - Affected projects โ Which Nx projects are touched (for testing commands)
Step 4 โ Discover Related Issues and Documentation
Search for issues and documentation that may be related to this PR:
- Parse the branch name for issue numbers (e.g.,
feat/lexico-fix-123โ#123) - Scan commit messages for issue references
- Search for open issues matching keywords:
gh issue list --search "<keywords>" - Look for relevant documentation links: AGENTS.md, SKILL.md, planning files, or external library docs referenced in the changes
Use appropriate linking keywords:
| Keyword | Effect |
|---|---|
Closes #N |
Closes issue when PR merges |
Fixes #N |
Closes issue when PR merges |
Resolves #N |
Closes issue when PR merges |
Related to #N |
Links without closing |
If no related issues or documentation are found, omit the Related section content.
Step 5 โ Generate Updated Title
Compose a new title following <type>(<scope>): <gitmoji> <subject>:
- Keep the subject concise (aim for < 50 chars after emoji)
- Use imperative mood ("add", "fix", "update", not "added", "fixes", "updates")
- Lowercase after gitmoji, no trailing period
- Total length must not exceed 128 characters
Step 6 โ Generate Updated Description
Write the description using only facts derived from the diff. Do not speculate or include aspirational content.
Use the PR template as the structure:
## ๐ฐ Summary
<!-- Brief description of what this PR does (1-2 sentences) -->
## ๐ Details
- <!-- List of specific changes made -->
## ๐งช Testing
1. <!-- How to manually verify these changes work correctly -->
## ๐ Related
- <!-- Link any relevant documentation or related resources like internal documentation, GitHub issues/pull requests -->
Fill each section based on only facts derived from the diff:
- Summary: Synthesize the overall purpose from the actual changes
- Details: One bullet per meaningful change, present tense, specific file/component names
- Testing: Include
nx run <project>:<target>commands for affected projects, plus manual steps - Related: Include discovered issue links and relevant documentation links, or omit section if none found
Step 7 โ Update the Pull Request
Use the gh CLI to apply the changes:
gh pr edit <PR_NUMBER> \
--title "<type>(<scope>): <gitmoji> <subject>" \
--body "<generated description>"
Step 8 โ Verify
After updating, confirm the PR was updated successfully:
gh pr view <PR_NUMBER>
Report the updated title and a brief confirmation to the user.
Quality Checklist
Before submitting the update, verify:
- Title follows
<type>(<scope>): <gitmoji> <subject>format (max 128 chars) - Subject uses imperative mood and lowercase after gitmoji
- Summary accurately reflects the diff (no speculative content)
- Details list covers all meaningful changes from the diff
- Testing section includes relevant
nxcommands for affected projects - Related issues use correct linking keywords and documentation links are included where relevant
- Description uses present tense ("Add", "Update", "Remove")
Error Recovery
If the PR update fails:
# Check GitHub CLI auth
gh auth status
# Retry the update
gh pr edit <PR_NUMBER> \
--title "<type>(<scope>): <gitmoji> <subject>" \
--body "<generated description>"
Resources
- create-pull-request skill โ Full PR conventions and creation workflow
- commit-code skill โ Types, scopes, and gitmoji reference