Automated summary
Reviews code changes (PRs, staged/unstaged diffs) for quality, security, and consistency, using automated scanners and contextual analysis.
Strengths
- Auto-detects the tech stack (Node.js, Python, Docker, Terraform, etc.)
- Runs security scanners (gitleaks, trufflehog) and stack-specific tools
- Checks codebase consistency and best practices
- Phased process with user confirmation to prevent errors
Limitations
- Requires user interaction to determine scope and confirm intent
- Depends on installed tools (gitleaks, trufflehog, etc.)
- Cannot replace in-depth human review for complex issues
Use this skill when you need to review a PR, diff, or any code changes before merging or committing.
Avoid using it for trivial or single-line changes, or when you need an immediate merge without interactive review.
Security analysis
SafeThe skill only runs local, read-only analysis and scanning tools (gitleaks, trufflehog, trivy, etc.) within allowed parameters, with no destructive or exfiltrating actions. Commands are standard and safe.
No concerns found
How this analysis is madeExamples
Review my staged changes before commit.Check the diff between my current branch and main for security issues.Review all uncommitted changes (staged and unstaged) for quality and security.name: pr-review description: 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. allowed-tools: Read Glob Grep Bash(git diff:) Bash(git status:) Bash(git log:) Bash(git show:) Bash(git branch:) Bash(gitleaks:) Bash(trufflehog:) Bash(trivy:) Bash(shellcheck:) Bash(npm audit:) Bash(yarn audit:) Bash(pip-audit:) Bash(safety:) Bash(tfsec:) Bash(checkov:) Bash(hadolint:) AskUserQuestion
PR Review Skill
Reviews code changes with focus on quality, security, and consistency.
Default Assumption: Public Repository
Unless explicitly stated otherwise, assume the repository is publicly available. This means:
- Any secret, credential, or API key pushed is considered compromised
- Internal URLs, IPs, hostnames should not be exposed
- Comments with sensitive internal context should be flagged
- Error messages should not leak internal architecture
- Be extra cautious with .env files, config files, CI/CD configs
Phase 1: Determine Scope
STOP. Use AskUserQuestion before anything else.
Ask user to choose review scope:
- Staged files only
- Unstaged changes (working directory)
- All uncommitted (staged + unstaged)
- Current branch vs main (PR-style)
- Specific commit or range
- Other (specify)
Do NOT run any git commands or tools until user responds.
After selection, get the diff:
- Staged:
git diff --cached - Unstaged:
git diff - All uncommitted:
git diff HEAD - Branch vs main:
git diff main...HEAD - Commit:
git show <hash> - Range:
git diff <from>..<to>
Also get changed files list: git diff --name-only <appropriate args>
Phase 2: Understand the Problem
STOP. Use AskUserQuestion to confirm before proceeding.
Infer intent from:
- Branch name:
git branch --show-current - Commit messages:
git 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.
Phase 3: Auto-Detect Stack
Check for presence of:
package.json/yarn.lock→ Node.jsrequirements.txt/pyproject.toml→ Pythongo.mod→ GoCargo.toml→ RustDockerfile→ Docker*.tf→ Terraform*.yamlin k8s patterns → Kubernetes.github/workflows/→ GitHub Actions
Note detected stack for context-aware analysis.
Phase 4: Run Scanners
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> |
Phase 5: Code Review
Analyze the diff for all categories. Be pragmatic—flag likely issues, skip obvious false positives.
5.1 Code Quality
- Best practices for detected stack
- Readability and maintainability
- Error handling appropriateness
- Test coverage (if tests exist)
- Idiomatic patterns
- Type safety issues
5.2 Codebase Consistency
- Match existing patterns in the repo
- Naming conventions alignment
- File organization consistency
- Don't introduce a 10th way of doing something
5.3 Security
Manual checks:
- Hardcoded secrets, API keys, passwords, connection strings
- SQL injection, XSS, command injection vectors
- Path traversal risks
- Auth/authz bypasses
- Insecure defaults (http vs https, weak crypto)
- Sensitive data in logs/errors/URLs
- Container: running as root, privileged mode, unverified base images
5.4 Bug Detection
- Logic errors, off-by-one
- Null/undefined handling
- Race conditions
- Resource leaks (unclosed handles, connections)
- Breaking changes to existing APIs
5.5 Dependencies
- Known vulnerable package versions
- Outdated dependencies with security patches
- Unpinned versions
- Suspicious or typosquatted package names
5.6 Performance
- N+1 query patterns
- Sync operations in async contexts
- Unbounded loops/recursion
- Memory leaks
- Missing pagination
- Blocking I/O in hot paths
5.7 Deprecations & Drift
- Deprecated APIs, functions, patterns
- Breaking changes in dependencies
- Hardcoded values that should be variables
- Environment-specific configs in shared code
- Configuration diverging from IaC patterns
Phase 6: Report
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 | ... |
Rating Scale
| 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 |
Style Guidelines
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.emailaccessed without null check - crashes if user not found"
Don't write a 50-page report. Focus on what matters.
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/pr-review-mmh8qqcu/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/pr-review-mmh8qqcu' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/pr-review-mmh8qqcu/download' --output '.skill-downloads/pr-review-mmh8qqcu/SKILL.md.part' && mv '.skill-downloads/pr-review-mmh8qqcu/SKILL.md.part' '.skill-downloads/pr-review-mmh8qqcu/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
Tools declared by the author (check availability in your agent): Read Glob Grep Bash(git diff:*) Bash(git status:*) Bash(git log:*) Bash(git show:*) Bash(git branch:*) Bash(gitleaks:*) Bash(trufflehog:*) Bash(trivy:*) Bash(shellcheck:*) Bash(npm audit:*) Bash(yarn audit:*) Bash(pip-audit:*) Bash(safety:*) Bash(tfsec:*) Bash(checkov:*) Bash(hadolint:*) AskUserQuestion
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/pr-review-mmh8qqcu/SKILL.md' && test -s '.skill-downloads/pr-review-mmh8qqcu/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/pr-review' && cp -R '.skill-downloads/pr-review-mmh8qqcu' '.claude/skills/pr-review'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/pr-review-mmh8qqcu'openskills read 'pr-review-mmh8qqcu'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/pr-review-mmh8qqcu/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
React Hook Form Best Practices
Development
Master React Hook Form: avoid anti-patterns, manage subscriptions, and handle reset, dirty state, and controlled inputs correctly.
Emotion to Mantine Migration
Development
Migrate Emotion styled-components to Mantine components with style props and CSS modules. Use when converting .styled.tsx files or removing @emotion imports.
Scope Creep Detector
Development
Analyzes git diffs against a stated intent to detect scope creep, unrelated files, broad PRs, and oversized changes, then suggests keep, split, or justify actions.