From trogonstack-gh
Enrich GitHub PR descriptions with root-cause context, related issues/PRs, and CC mentions. Use when creating or editing a PR, when a PR has an empty or sparse description, or when the user asks to improve a PR description.
How this skill is triggered — by the user, by Claude, or both
Slash command
/trogonstack-gh:gh-enrich-pr-descriptionThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Analyze branch changes and git history to build a rich PR description with three sections: a contextual summary, related issues/PRs, and people to CC.
Analyze branch changes and git history to build a rich PR description with three sections: a contextual summary, related issues/PRs, and people to CC.
gh pr create)Run these in parallel to understand the full picture:
# Current branch and diff against base
git log --oneline main..HEAD
git diff main...HEAD
# PR if it already exists
gh pr view --json number,title,body,url,baseRefName,headRefName 2>/dev/null
For each changed file, dig into the history to understand the origin of the problem:
# Blame the changed lines on the base branch to find who introduced them
git blame main -- <file> | sed -n '<start>,<end>p'
# Show the originating commit
git log -1 --format='%H %an <%ae> %s' <commit-sha>
# Find the PR that introduced the commit
gh pr list --search "<commit-sha-prefix> OR <ticket-id>" --state merged --json number,title,author,url
Key questions to answer:
Search for related work using ticket IDs, keywords, and function names:
# By ticket ID from branch name or commit messages
gh pr list --search "<TICKET-ID>" --state all --json number,title,author,url,state
# By keywords from the change
gh pr list --search "<keyword>" --state all --limit 10 --json number,title,author,url,state
Classify each related PR/issue:
From git blame and related PRs, collect GitHub usernames of people who:
git blame)Extract GitHub usernames from PR data:
gh pr view <number> --json author --jq '.author.login'
Use this structure:
## Summary
[2-4 sentences explaining WHAT changed and WHY. Focus on the root cause
and why the previous behavior was wrong. Include the mechanism of failure.]
> [!NOTE]
> [Optional callout for additional context, such as a sibling function
> that handles the same case correctly, or a related convention.]
## Related
- #<number> -- <relationship>: <brief description>
- #<number> -- <relationship>: <brief description>
CC @<username> @<username>
For an existing PR:
gh pr edit <number> --body "$(cat <<'EOF'
<composed description>
EOF
)"
For a new PR, pass it to gh pr create --body.
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub trogonstack/agentskills --plugin trogonstack-gh