Generate a comprehensive PR description using the pr-description-writer Skill.
/plugin marketplace add DiversioTeam/agent-skills-marketplace/plugin install pr-description-writer@diversiotechUse your pr-description-writer Skill to create or update a PR description.
Follow this sequence to gather context and generate the description:
# Check if current branch has a PR
gh pr view --json number,title,url,baseRefName 2>/dev/null
0: PR exists → you'll update it# Priority order for detecting base branch:
# 1. If PR exists, use its base
gh pr view --json baseRefName --jq '.baseRefName' 2>/dev/null
# 2. Get repo's default branch via GitHub API
gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name'
# 3. Check git remote HEAD
git remote show origin 2>/dev/null | grep "HEAD branch" | cut -d: -f2 | xargs
# 4. Check for common branches (main, master, release, develop)
git branch -r | grep -E "origin/(main|master|release|develop)$" | head -1
Important: Don't assume release or main - always detect!
CRITICAL: Include everything that will be in the PR:
BASE="origin/release" # adjust based on step 2
# All commits in the branch
git log ${BASE}..HEAD --oneline
# Full diff (committed changes)
git diff ${BASE}...HEAD --stat
# Any uncommitted changes
git status --short
git diff --stat # unstaged
git diff --cached --stat # staged
gh pr view --json body,commits,files
Using the Skill's PR description structure:
# Update existing PR
gh pr edit --body "$(cat <<'EOF'
## Summary
...
EOF
)"
# Or create new PR
gh pr create --title "Title" --body "..." --base release
<pr-number> (optional): Specific PR to update. If omitted, uses current
branch's PR or prepares description for a new PR.--update: Automatically update the PR without confirmation.--create: Create a new PR with the generated description.# Auto-detect PR status and generate description
/pr-description-writer:write-pr
# Update existing PR #1234
/pr-description-writer:write-pr 1234
# Update PR automatically without confirmation
/pr-description-writer:write-pr --update
# Create new PR with generated description
/pr-description-writer:write-pr --create
Always analyze ALL changes in the branch, not just the latest commit:
git log origin/release..HEAD for commit historygit diff origin/release...HEAD for full diff