skills/pr-review/SKILL.md
Reviews code changes before merging. Use when reviewing PRs, checking staged changes, reviewing diffs, code review, merge readiness check, or validating changes before commit/push.
npx skillsauth add antoniocascais/claude-code-toolkit pr-reviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Reviews code changes with focus on quality, security, and consistency.
Unless explicitly stated otherwise, assume the repository is publicly available. This means:
STOP. Use AskUserQuestion before anything else.
Ask user to choose review scope:
Do NOT run any git commands or tools until user responds.
After selection, get the diff:
git diff --cachedgit diffgit diff HEADgit diff main...HEADgit show <hash>git diff <from>..<to>Also get changed files list: git diff --name-only <appropriate args>
STOP. Use AskUserQuestion to confirm before proceeding.
Infer intent from:
git branch --show-currentgit log main..HEAD --oneline (or relevant range)Then use AskUserQuestion to confirm:
"Based on branch
feature/xyzand commits, this PR appears to [inferred description]. Is this correct?"
- Yes, proceed
- No, let me explain
Do NOT proceed until user confirms.
Check for presence of:
package.json / yarn.lock → Node.jsrequirements.txt / pyproject.toml → Pythongo.mod → GoCargo.toml → RustDockerfile → Docker*.tf → Terraform*.yaml in k8s patterns → Kubernetes.github/workflows/ → GitHub ActionsNote detected stack for context-aware analysis.
Execute relevant scanners (skip silently if not installed):
Always run:
| Tool | Command |
|------|---------|
| gitleaks | gitleaks detect --source . --verbose --no-git |
| trufflehog | trufflehog filesystem . --only-verified |
Stack-specific:
| Stack | Tool | Command |
|-------|------|---------|
| Node.js | npm audit | npm audit --json |
| Node.js | yarn audit | yarn audit --json |
| Python | pip-audit | pip-audit |
| Python | safety | safety check |
| Docker | trivy | trivy fs . |
| Docker | hadolint | hadolint Dockerfile |
| Terraform | tfsec | tfsec . |
| Terraform | checkov | checkov -d . |
| Terraform | trivy | trivy config . |
| K8s | trivy | trivy config . |
| Shell scripts | shellcheck | shellcheck <file> |
Analyze the diff for all categories. Be pragmatic—flag likely issues, skip obvious false positives.
Manual checks:
Output a succinct markdown report:
## PR Review: [brief title]
**Problem:** [1-2 sentences on what this PR solves]
**Scope:** [staged/branch/commits reviewed]
**Stack:** [detected tech stack]
### Scanner Results
| Tool | Result |
|------|--------|
| gitleaks | [clean/N findings] |
| ... | ... |
### Findings
#### CRITICAL
- `file:line` - [issue with brief context]
#### HIGH
- `file:line` - [issue]
#### MEDIUM
- `file:line` - [issue]
#### LOW
- `file:line` - [issue]
### Summary
- Critical: X | High: X | Medium: X | Low: X
### Review Score: X/20
[One sentence justification]
### Action Required
| Priority | Item |
|----------|------|
| blocker | ... |
| should fix | ... |
| consider | ... |
| Score | Meaning | Action | |-------|---------|--------| | 0-10 | Blocker issues | Reject, needs significant rework | | 11-15 | Acceptable | Merge after addressing fixes | | 16-17 | Good | Ready to merge, suggestions optional | | 18-20 | Excellent | Merge immediately |
Keep findings concise but contextual:
Bad: "should use https here"
Good: "http exposes data in transit, use https"
Bad: "fix this null check"
Good: "user.email accessed without null check - crashes if user not found"
Don't write a 50-page report. Focus on what matters.
tools
Reviews Claude Code sessions and proposes workflow improvements. Use when: (1) /workflow-review command, (2) "review my workflow", "how can I improve", (3) after long sessions when nudged, (4) start of session with pending review. Analyzes tool usage patterns, CLAUDE.md configuration, and compares against CC best practices. Proposes: CLAUDE.md updates, new skills, underused CC features. Saves session summaries to .claude/workflow-reviews/ for cross-session continuity.
devops
Activates voice conversation mode using Pocket TTS Docker container. Use when user says "voice mode", "let's talk", "talk to me", "speak your responses", or wants Claude to respond with spoken audio. Speaks all responses through TTS and plays via speakers.
testing
Guides strong, effective unit test generation using proven testing techniques. Use when writing unit tests, reviewing test quality, improving existing tests, generating test cases, checking test coverage strength, or when tests exist but may be weak. Triggers on: unit test, test quality, test coverage, write tests, improve tests, review tests, test strength, mutation testing, boundary testing.
development
Creates new Claude Code skills with proper structure and best practices. Use when user wants to create a skill, update an existing skill, add a new command, scaffold a workflow, define skill hooks, or asks "how do I make a skill".