explain-this-pr
Takes a GitHub PR URL or the current branch and writes a plain-English explanation of what it does and why, then posts it as a PR comment. Use when asked to explain a PR, summarize a pull request, write a plain-English description of a PR, add a summary comment to a PR, or understand what a PR changes. Trigger when a user says "explain this PR", "summarize this pull request", "what does this PR do", "add a comment explaining the PR", or shares a GitHub PR URL and asks what it does.
npx skills add Varnan-Tech/opendirectory --skill explain-this-pr --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Explain This PR Read a GitHub pull request, understand what it changes, and write a plain-English explanation. Post it as a PR comment so reviewers have instant context. --- ## Step 1: Check Setup Confirm `gh` is authenticated: ```bash gh auth status ``` If not authenticated: `gh auth login` and follow the prompts. Confirm input. The user must provide one of: - A GitHub PR URL (e.g. `https://github.com/owner/repo/pull/123`) - A PR number in the current repo (e.g. `#123`) - The keyword "current" to use the PR for the current branch If no input, ask: "Which PR should I explain? Share the URL, PR number, or say 'current' for the active branch." --- ## Step 2: Fetch PR Context **Get PR metadata:** ```bash gh pr view PR_URL_OR_NUMBER --json number,url,title,body,author,baseRefName,headRefName,additions,deletions,changedFiles,commits,labels,state,isDraft ``` If `isDraft` is `true`, note this to the user: "This PR is still in draft. The explanation is based on its current state." **Get the diff:** ```bash gh pr diff PR_URL_OR_NUMBER ``` If the diff is over 400 lines, read the `--stat` summary and the first 200 lines of the diff: ```bash gh pr view PR_URL_OR_NUMBER --json files gh pr dif
- Step 1: Check Setup
- Step 2: Fetch PR Context
- Step 3: Write the Explanation
- Step 4: Self-QA
- Step 5: Post as PR Comment
gh auth status gh pr view PR_URL_OR_NUMBER --json number,url,title,body,author,baseRefName,headRefName,additions,deletions,changedFiles,commits,labels,state,isDraft gh pr diff PR_URL_OR_NUMBER gh pr view PR_URL_OR_NUMBER --json files gh pr diff PR_URL_OR_NUMBER | head -200 gh pr view PR_URL_OR_NUMBER --json comments --jq '.comments[].body' 2>/dev/null | head -20 gh pr comment PR_URL_OR_NUMBER --body-file - << 'EOF'
What does the explain-this-pr skill do?
Takes a GitHub PR URL or the current branch and writes a plain-English explanation of what it does and why, then posts it as a PR comment. Use when asked to explain a PR, summarize a pull request, write a plain-English description of a PR, add a summary comment to a PR, or understand what a PR changes. Trigger when a user says "explain this PR", "summarize this pull request", "what does this PR do", "add a comment explaining the PR", or shares a GitHub PR URL and asks what it does.
How do I install it?
Run `npx skills add Varnan-Tech/opendirectory --skill explain-this-pr --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From Varnan-Tech/opendirectory, a repository with 571 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
