Reads the current branch diff and commit messages to generate a structured GitHub PR description (summary, changes, testing) and optionally create or update the PR via the gh CLI.
How this skill is triggered — by the user, by Claude, or both
Slash command
/opendirectory-gtm-skills:pr-description-writerThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Read the current branch diff and write a complete GitHub pull request description. Create or update the PR with one command.
Read the current branch diff and write a complete GitHub pull request description. Create or update the PR with one command.
Apply to all generated PR descriptions:
Confirm gh is authenticated:
gh auth status
If not authenticated: gh auth login and follow the prompts.
Confirm the current directory is a git repo with an active branch:
git branch --show-current
If detached HEAD or no branch, stop and ask the user which branch they want to describe.
Run all three commands to build context:
File summary (what changed):
git diff main...HEAD --stat
Commit messages (why it changed):
git log main...HEAD --oneline
Full diff (how it changed):
Use origin/main first (always up to date), fall back to local main, then master:
if git rev-parse origin/main &>/dev/null 2>&1; then
BASE=origin/main
elif git rev-parse main &>/dev/null 2>&1; then
BASE=main
else
BASE=master
fi
git diff $BASE...HEAD
If the diff is very large (over 500 lines), read the --stat summary and the commit messages only. Also read the first 200 lines of the diff to understand the primary changes without processing the entire output.
Also check for an existing PR and read its current title/body:
gh pr view --json title,body,baseRefName 2>/dev/null
Read references/pr-format-guide.md in full before writing anything. Internalize:
Write the PR description using the format from references/pr-format-guide.md.
Rules:
QA checkpoint: Before presenting, verify:
Present the description to the user and ask: "Ready to create the PR, update the existing one, or output only?"
Create a new PR:
Pass the body via stdin to handle backticks, quotes, and newlines safely:
gh pr create --title "TITLE_HERE" --body-file - << 'EOF'
BODY_HERE
EOF
Suggest a title based on the commit messages and diff summary. The title should be imperative mood, under 72 characters: "Add Redis caching for user session lookups" not "Added caching".
Update an existing PR:
gh pr edit --body-file - << 'EOF'
BODY_HERE
EOF
Output only: Present the title and body in a code block for manual copy-paste.
After creating or updating, confirm: "PR description updated. View it at: [URL]"
npx claudepluginhub varnan-tech/opendirectory --plugin opendirectory-gtm-skillsCreates GitHub pull requests following Sentry's engineering practices using GitHub CLI. Generates structured descriptions from branch diffs explaining what changed, why, and reviewer context. Use before opening PRs from committed branches.
Generates a PR description from conversation context and git diff, then opens PR creation in browser. Useful for automating the PR drafting workflow.
Generates structured PR descriptions from a git diff, commit list, or change summary. Covers what changed, why, and how to test.