review-pr · dyoshikawa — Claude Code skill: what it does, how to install
Audits pull requests for code quality and security without switching your local branch. Runs parallel code and security checks, then diagnoses failed GitHub Actions workflows.
npx skills add dyoshikawa/rulesync --skill review-pr -a claude-codeWhat review-pr does
The skill inspects pull requests without touching your local git state. Commands like git checkout, git switch, and gh pr checkout are strictly forbidden. The working tree stays clean. Changes are read remotely using gh pr view, gh pr diff, or dedicated git fetch references. When no PR argument is given, it targets the pull request for the active branch.
Two subagents execute in parallel. The code-reviewer agent examines structure and quality, while security-reviewer flags security flaws. Each identified finding receives a sequential number and a severity grade from low to critical.
After diff evaluation, the skill checks GitHub Actions via gh pr checks. If a run fails, it extracts failure causes from logs and suggests direct fixes. GitHub CLI (gh) must be installed and authenticated for the workflow to run.
What it helps with
- review pull request changes without checking out the branch locally
- audit PR diffs for security vulnerabilities
- categorize review findings with severity ratings from low to critical
- diagnose failed GitHub Actions workflow runs and suggest fixes
Example prompts for the agent
- review PR #124
- check this PR for code quality and security issues
- audit the PR for the current branch and check Actions status
How to install review-pr
1Skills CLI (Vercel)
npx skills add dyoshikawa/rulesync --skill review-pr -a claude-code2Manually: put the files in place
~/.claude/skills/review-pr/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/review-pr/
1Skills CLI (Vercel)
npx skills add dyoshikawa/rulesync --skill review-pr -a codex2Manually: put the files in place
.agents/skills/review-pr/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add dyoshikawa/rulesync --skill review-pr -a cursor2Manually: put the files in place
.cursor/skills/review-pr/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install dyoshikawa/rulesync review-pr2Manually: put the files in place
.github/skills/review-pr/SKILL.md1Skills CLI (Vercel)
npx skills add dyoshikawa/rulesync --skill review-pr -a gemini-cli2Platform CLI
gemini skills install https://github.com/dyoshikawa/rulesync --path .rulesync/skills/review-prManually: put the files in place
.devin/skills/review-pr/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add dyoshikawa/rulesync --skill review-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 review-pr
How to install review-pr in Claude Code?
Run npx skills add dyoshikawa/rulesync --skill review-pr -a claude-code in your terminal or place the file into ~/.claude/skills/review-pr/SKILL.md.
What does review-pr do?
It orchestrates parallel code and security evaluations across PR changes, assigns severity levels to issues, and inspects GitHub Actions run logs.
Why does review-pr forbid switching local branches?
It prevents disrupting uncommitted changes and active local work. All PR diffs and metadata are retrieved remotely through read-only gh and git commands.
Source text
SKILL.md · MIT
--- name: review-pr description: >- Review a pull request for code quality and security issues. Use when the user wants to review a PR, check PR code changes, or audit a pull request. Triggers on: "review PR", "review pull request", "check this PR", "the `review-pr` skill". targets: - "*" --- target_pr = the user's request If target_pr is not provided, use the PR of the current branch. ## Important: Do Not Switch the Local Branch - Do NOT check out, switch, or otherwise move the local branch (e.g., `git checkout`, `git switch`, `gh pr checkout`). - To inspect the PR's changes, use `git` and `gh` commands that read remote state without moving the working tree. For example: - `gh pr view $target_pr` to read PR metadata and description. - `gh pr diff $target_pr` to read the diff. - `gh pr view $target_pr --json files` or `gh api` to list changed files. - `git fetch origin pull/<PR_NUMBER>/head:refs/remotes/origin/pr-<PR_NUMBER>` and `git diff origin/main...origin/pr-<PR_NUMBER>` if a local read-only ref is needed. - When invoking subagents, explicitly instruct them that switching the local branch is forbidden and that they must inspect changes via `git`/`gh` commands only. Execute the following in parallel: - Call code-reviewer subagent to review the code changes in $target_pr. Pass along the rule that the local branch must not be switched and that diffs must be obtained via `git`/`gh` commands. - Call security-reviewer subagent to review the security issues in $target_pr. Pass along the rule that the local branch must not be switched and that diffs must be obtained via `git`/`gh` commands. Integrate and report the execution results from each subagent. Additionaly, please output PR number in the result so that the user can easily find the PR. ## Reporting Rules - Assign a severity level to each finding: low, mid, high, or critical. - Assign a sequential number to each finding (e.g., #1, #2, #3, ...). ## After the Review: Check GitHub Actions Workflows After completing the content review, check the status of the GitHub Actions workflows for $target_pr (for example, using `gh pr checks` or `gh run list`). - Report the status of every workflow run to the user, including runs that are still in progress. - For each failing workflow, also report: - The likely cause of the failure (based on the relevant logs or job output). - Candidate solutions or next steps to resolve it.
© dyoshikawa · MIT · dyoshikawa/rulesync
Similar skills
All skills for Code review and refactoring →review-pr by other authors comes first.