explain-pr — Claude Code skill: what it does, how to install
Summarizes any pull request by fetching its diff and description through GitHub CLI, explaining the core problem and the proposed fix.
npx skills add dyoshikawa/rulesync --skill explain-pr -a claude-codeWhat explain-pr does
This skill explains GitHub pull requests without manual context gathering. If you do not pass a PR number, the agent targets the PR for your active git branch. Information retrieval runs in parallel using gh pr view and gh pr diff.
The resulting summary focuses on two points: the motivation behind the change and the technical solution. Explanations match the language of your current conversation. The tool relies on a working gh binary, so unauthenticated environments will fail immediately.
What it helps with
- understand the motivation behind a pull request quickly
- summarize technical decisions from a large diff
- review the current branch PR without leaving the editor
Example prompts for the agent
- Explain PR #142
- Summarize the pull request for this branch
- What problem does PR 45 solve?
How to install explain-pr
1Skills CLI (Vercel)
npx skills add dyoshikawa/rulesync --skill explain-pr -a claude-code2Manually: put the files in place
~/.claude/skills/explain-pr/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/explain-pr/
1Skills CLI (Vercel)
npx skills add dyoshikawa/rulesync --skill explain-pr -a codex2Manually: put the files in place
.agents/skills/explain-pr/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add dyoshikawa/rulesync --skill explain-pr -a cursor2Manually: put the files in place
.cursor/skills/explain-pr/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install dyoshikawa/rulesync explain-pr2Manually: put the files in place
.github/skills/explain-pr/SKILL.md1Skills CLI (Vercel)
npx skills add dyoshikawa/rulesync --skill explain-pr -a gemini-cli2Platform CLI
gemini skills install https://github.com/dyoshikawa/rulesync --path .rulesync/skills/explain-prManually: put the files in place
.devin/skills/explain-pr/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add dyoshikawa/rulesync --skill explain-pr -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about explain-pr
How to install explain-pr in Claude Code?
Run npx skills add dyoshikawa/rulesync --skill explain-pr -a claude-code. The skill file is placed into ~/.claude/skills/explain-pr/SKILL.md.
What does the explain-pr skill do?
It inspects PR metadata and diffs via GitHub CLI, then outlines the original issue and the chosen implementation approach.
What prerequisites are required for explain-pr?
You need the GitHub CLI (gh) installed and logged in to query repository pull requests and diffs.
Source text
SKILL.md · MIT
--- name: explain-pr description: "Explain a PR: the background problem and the proposed solution" targets: - "*" --- target_pr = the user's request If target_pr is not provided, use the PR of the current branch. ## Step 1: Gather PR Information Run the following in parallel: - Get the PR description and metadata: `gh pr view <pr_number>` - Get the PR diff: `gh pr diff <pr_number>` ## Step 2: Analyze and Explain Based on the PR content, explain the following two aspects: 1. **Background (Problem/Motivation):** What issue or limitation existed before this PR? Why was this change needed? 2. **Solution:** What approach does this PR take to address the problem? Summarize the key changes and design decisions. Keep the explanation concise and focused. Use the language of the current conversation (follow the user's language).
© dyoshikawa · MIT · dyoshikawa/rulesync