Create pull requests following good conventions. Use when opening PRs, writing PR descriptions, or preparing changes for review. Emphasizes concise, helpful descriptions that respect reviewers' time.
/plugin marketplace add sontek/agent-skills/plugin install agent-skills@agent-skills-localThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Create pull requests that are easy to review and understand.
Requires: GitHub CLI (gh) authenticated and available.
Before creating the PR, check if the repository has a PR template:
# Check for PR template files
ls -la .github/pull_request_template.md
ls -la .github/PULL_REQUEST_TEMPLATE.md
ls -la .github/PULL_REQUEST_TEMPLATE/*.md
ls -la docs/pull_request_template.md
If a template exists:
If no template exists:
# Check current branch and status
git status
# See what commits will be in the PR
git log main..HEAD --oneline
# Verify branch is pushed
git push -u origin HEAD
Ensure:
<type>/<short-description> (e.g., feat/add-oauth, fix/null-pointer). See create-branch skill for details.Review the PR diff before creating it:
# See all commits that will be in the PR
git log main..HEAD
# See the full diff
git diff main...HEAD
Self-review checklist:
Writing principles:
Description structure:
<Brief 1-2 sentence summary of what this PR does>
<Why these changes are being made - the motivation and context>
<Any important details reviewers should know>
<Issue references>
Do include:
Do NOT include:
# Create PR with title and body
gh pr create --title "<type>(<scope>): <description>" --body "$(cat <<'EOF'
<description body here>
EOF
)"
Title format follows commit conventions:
feat(scope): Add new featurefix(scope): Fix the bugref: Refactor something# Request review from specific people
gh pr edit --add-reviewer username1,username2
# Or request from a team
gh pr edit --add-reviewer @team-name
# Add labels if applicable
gh pr edit --add-label bug,needs-review
Reviewer guidelines:
Add Slack thread replies for alert notifications
When an alert is updated or resolved, post a reply to the original Slack thread
instead of creating a new message. This keeps related notifications grouped and
reduces channel noise.
Previously considered editing the original message, but threading better
preserves event timeline and works beyond Slack's edit window.
Refs ENG-1234
Handle null response in user API endpoint
The user endpoint returns null for soft-deleted accounts, causing dashboard
crashes when accessing user.profile. Add null check and return proper 404
response instead.
Fixes ENG-5678
Extract validation logic to shared module
Move duplicate validation from alerts, issues, and projects endpoints into
shared validator class. No behavior change.
This prepares for adding new validation rules (ENG-9999) without duplicating
logic across endpoints.
Refs ENG-9999
Short PR (1-10 files, single commit):
Medium PR (10-50 files, multiple related commits):
Large PR (50+ files or architectural change):
Rule of thumb: If your description is longer than 200 words, it's probably too verbose or the PR is too large.
| Mistake | Bad Example | Good Example |
|---|---|---|
| Too verbose | Long narrative, file lists | 2-4 concise sentences with context |
| Too vague | "Update user code" | "Add profile editing and fix null bug" |
| Redundant info | Listing changed files | Context not obvious from diff |
| Missing context | "Refactored to be better" | Explain why and what changes |
When a repository has a PR template, respect its structure:
# If template has optional sections you don't need:
## Description
Add caching for search results
## Breaking Changes
None
## Testing
~~- [ ] Manual testing performed~~ # Remove if not applicable ~~- [ ] Added unit
tests~~ # Remove if not applicable
Better: Just omit optional sections entirely if they don't apply.
Use draft PRs when:
gh pr create --draft --title "WIP: Feature name"
Convert to ready when complete:
gh pr ready
When pushing new commits after review:
# Add comment about updates
gh pr comment --body "Updated based on review feedback:
- Changed validation approach per @reviewer
- Added test case for edge case
- Fixed typo in documentation"
Reference issues in the PR body:
| Syntax | Effect |
|---|---|
Fixes #1234 | Closes GitHub issue on merge |
Closes #1234 | Same as Fixes |
Fixes ENG-1234 | Closes Jira ticket |
Refs GH-1234 | Links without closing |
Refs LINEAR-ABC-123 | Links Linear issue |
Multiple issues:
Fixes ENG-1234 Refs ENG-5678, ENG-9012
gh pr create to create PRs from command linegh pr view to view PR detailsgh pr edit to modify title, body, reviewers, labelsgh pr comment to add comments when pushing updatesgh pr ready to convert draft to ready for reviewgit diff main...HEAD to see full PR diff before creating