.claude/skills/pr-review/SKILL.md
Perform a thorough pre-push / pre-PR code review covering correctness, security, test coverage, IaC safety, and code quality across all languages in the repo. Use this skill whenever the user says "review my PR", "review before push", "pre-push review", "check my changes", "review this branch", "/pr-review", or asks Claude to gate a git push. Also trigger when Superpowers TDD discipline checks are appropriate (verifying tests exist and pass before merge). Covers Rust, Python, Bash, PowerShell, Ansible, and Terraform. This skill augments Superpowers by acting as a final integration gate — apply it even when individual language skills have already been used during development.
npx skillsauth add brujack/dotfiles 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.
A structured pre-push / pre-PR review gate. Produces a PASS / HOLD verdict with itemised findings before any code leaves the local branch.
When triggered, run this workflow in order:
# Identify the base branch (try common names)
BASE=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's|.*/||' \
|| echo "main")
# Full diff stat + diff
git diff "$BASE"...HEAD --stat
git diff "$BASE"...HEAD
Also run:
git log "$BASE"...HEAD --oneline # commits in this PR
git status # any unstaged changes to flag
Identify which of these are present in the diff:
.rs).py).sh, shebangs).ps1, .psm1).yml/.yaml under roles/, playbooks/, tasks/, or containing hosts: / - name:).tf, .tfvars)Read only the reference files relevant to what you found in Step 1. Do not load all of them — keep context lean.
| Language / Tool | Reference file |
| --------------- | -------------------------- |
| Rust | references/rust.md |
| Python | references/python.md |
| Bash / Shell | references/bash.md |
| PowerShell | references/powershell.md |
| Ansible | references/ansible.md |
| Terraform | references/terraform.md |
Work through all phases regardless of language. Language-specific checks come from the reference files; the phases below are universal.
Critical — any finding here is an automatic HOLD.
.env, *.pem, *.key, id_rsa) added or modifiedsubprocess, os.system, unquoted variables)Superpowers integration point — verify TDD discipline was maintained.
# Check for test files in the diff
git diff "$BASE"...HEAD --name-only | grep -E '(test_|_test\.|spec\.|\.test\.)'
# Run the test suite
# Rust:
cargo test 2>&1 | tail -20
# Python:
python -m pytest --tb=short 2>&1 | tail -30
# Ansible:
# (molecule test if configured, else ansible-lint)
# Terraform:
# (terratest or terraform validate + plan)
except: or unwrap()).env.example, README, or skill notes)requirements.txt, Cargo.toml, etc.Only run if Ansible or Terraform are in scope. This phase is treated with the same severity as Security — findings here are automatic HOLDs.
See references/ansible.md and references/terraform.md for full checklists.
Summary of critical checks:
terraform plan output showing unexpected destroys on production resourcesignore_errors: true masking real failures in AnsibleOutput the report in this exact format:
══════════════════════════════════════════════
PR REVIEW REPORT
Branch: <branch-name>
Base: <base-branch>
Commits: <N>
Files: <N changed>
Languages: <detected list>
══════════════════════════════════════════════
VERDICT: PASS ✅ | HOLD 🛑
─── FINDINGS ──────────────────────────────────
[CRITICAL 🔴] <phase> <file:line if known>
→ <description>
→ Suggested fix: <specific action>
[WARNING 🟡] <phase> <file:line if known>
→ <description>
→ Suggested fix: <specific action>
[INFO 🔵] <phase>
→ <observation — not blocking>
─── TEST SUMMARY ───────────────────────────────
Tests run: <N>
Passed: <N>
Failed: <N>
Missing coverage: <list areas if any>
─── SIGN-OFF ───────────────────────────────────
PASS → Safe to push. Run: git push origin <branch>
HOLD → Fix CRITICAL items above before pushing.
══════════════════════════════════════════════
PASS = zero CRITICAL findings. HOLD = one or more CRITICAL findings (security, test failures, IaC destroys). WARNING and INFO items are advisory — do not block but should be addressed.
To use this as a Claude Code slash command, create:
.claude/commands/pr-review.md
Run a full pre-push PR review using the pr-review skill.
Steps:
1. Read /path/to/skills/pr-review/SKILL.md
2. Follow the workflow exactly
3. Emit the structured report with PASS/HOLD verdict
This skill sits above individual Superpowers language skills in the review hierarchy. The relationship is:
Development phase → Superpowers language skill (Rust/Python/Bash/etc.)
- TDD red/green/refactor
- Style enforcement
- Per-file quality
PR gate phase → This skill (pr-review)
- Cross-cutting security sweep
- Verifies TDD was actually followed
- IaC safety (Ansible + Terraform)
- Integration-level logic review
- Final sign-off before push
If a Superpowers language skill was used during development, the PR review still runs — it verifies the outcome, not just the process.
development
Modify Cursor/VSCode user settings in settings.json. Use when you want to change editor settings, preferences, configuration, themes, font size, tab size, format on save, auto save, keybindings, or any settings.json values.
tools
View and modify Cursor CLI configuration settings in ~/.cursor/cli-config.json. Use when the user wants to change CLI settings, configure permissions, switch approval mode, enable vim mode, toggle display options, configure sandbox, or manage any CLI preferences.
tools
Configure a custom status line in the CLI. Use when the user mentions status line, statusline, statusLine, CLI status bar, prompt footer customization, or wants to add session context above the prompt.
testing
Runs the rest of a /shell request as a literal shell command. Use only when the user explicitly invokes /shell and wants the following text executed directly in the terminal.