Install
$ agentstack add skill-pproenca-dot-skills-bug-review ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Bug Review v2
Multi-pass PR review agent with 5 parallel review passes, majority voting, independent Opus validation, and resolution rate learning. Posts inline PR comments and optionally generates autofix commits. Tracks whether findings get resolved at merge time and uses that signal to improve future reviews.
When to Apply
- User asks to review a pull request for bugs or correctness issues
- User runs
/bug-review - User runs
/bug-review:resolveto classify resolutions after merge - User runs
/bug-review:reportfor resolution rate statistics - User asks for code review focused on logic errors, edge cases, or security
- User wants to find bugs in a diff or set of changes
Setup
On first run, verify:
ghCLI is installed and authenticated (gh auth status)- Current directory is a git repo with a GitHub remote
jqis installed (for JSON processing)bcis installed (for resolution rate calculations; pre-installed on most systems)
Read [config.json](config.json) for configuration (passes, vote threshold, models, category weights).
Workflow Overview
/bug-review
|
v
Fetch PR context + gather-context.sh
|
v
5 parallel passes (shuffled diffs, Sonnet) --> Aggregate & vote (3/5 majority)
|
v
Independent Opus validator --> Dedup --> Present findings --> Post + store
|
(later, after merge)
v
/bug-review:resolve --> Classify resolutions --> Update category weights
Command: /bug-review
Step 1: Parse Input & Fetch Context
- Parse the PR identifier (number, URL, or branch name)
- Check cache: Look for
${CLAUDE_PLUGIN_DATA}/bug-review/cache/pr-{N}/— if cache exists for the same head commit, offer to resume from the last checkpoint - Run
scripts/fetch-pr.shto get PR diff + metadata as JSON - Save the diff to a temp file for shuffling
- Run
scripts/gather-context.shto get prioritized context (callers, types, tests, repo rules) - Read
.bug-review.mdfrom repo root if it exists - Save checkpoint: Write context to
${CLAUDE_PLUGIN_DATA}/bug-review/cache/pr-{N}/context.json
Step 2: Run 5 Parallel Review Passes
For each pass (1-5), prepare a shuffled diff:
scripts/shuffle-diff.sh pass-.diff
Launch 5 Agent subprocesses in parallel. Read [review-passes.md](references/review-passes.md) for the exact prompt for each pass.
- Pass 1: Logic & Edge Cases (seed 1)
- Pass 2: Security & Data Integrity (seed 2)
- Pass 3: Error Handling & API Contracts (seed 3)
- Pass 4: Concurrency & State (seed 4)
- Pass 5: Data Flow & Contracts (seed 5)
Use model from config.json agent_model (default: "sonnet").
Each agent returns a JSON array of findings.
Save checkpoint: Write all pass results to ${CLAUDE_PLUGIN_DATA}/bug-review/cache/pr-{N}/pass-results.json
Step 3: Aggregate & Vote
- Collect findings from all 5 passes
- Group findings by similarity: same file + line within +/-5 + same or related category
- Count votes per group
- Keep only findings with 3+ votes (majority of 5, configurable via
vote_threshold) - Apply category weights from config.json:
final_score = votes × severity_weight × category_weight - Categories with weight
to get existing[bug-review]` comments.
Match by location proximity (file + line within +/-10) and category — not text similarity.
Step 6: Present Findings to User
Display a table:
| # | Severity | Confidence | File | Line | Title | Votes | |---|----------|------------|------|------|-------|-------|
For each finding, show full description, trigger scenario, suggested fix, and validator reasoning.
Ask the user (using AskUserQuestion with multiSelect):
- Which findings to post as PR comments (default: all)
- Which findings to autofix (default: none)
If no findings survived voting + validation: "No bugs found across 5 review passes. The changes look clean."
Step 7a: Post PR Review
Write approved findings to a temporary JSON file, then run:
scripts/post-review.sh
Then persist findings for resolution tracking:
scripts/store-findings.sh
Step 7b: Autofix (User-Selected Findings)
For each finding selected for autofix:
- Read the file and understand surrounding context
- Generate a minimal fix (smallest possible change)
- Apply the fix using the Edit tool
- Scope check: Run
git diff --stat— verify only the finding's file was modified and diff is under 20 lines. If exceeded, revert and warn. - Run existing tests if available (
npm test,go test ./...,pytest, etc.) - If tests pass: commit with
fix: {title} [bug-review] - If tests fail: revert the fix (
git checkout --) and report to user - After all fixes: push to the PR branch
Safety: one commit per fix, run tests between fixes, never force-push, scope-validate every fix.
Command: /bug-review:resolve
Run after a PR is merged to classify whether findings were resolved.
- Run
scripts/classify-resolutions.sh
- Loads stored findings from
${CLAUDE_PLUGIN_DATA}/bug-review/findings/pr-{N}.json - Checks if PR is merged
- For each finding: diffs code between review commit and merge commit
- Classifies each as RESOLVED, UNRESOLVED, or INCONCLUSIVE
- Updates the stored findings file with resolution data
- Display resolution summary to user
- If enough data accumulated (10+ findings, 3+ PRs): run
scripts/update-weights.shto adjust category weights
Command: /bug-review:report
Display resolution rate statistics across all tracked PRs.
Run scripts/resolution-report.sh which outputs:
- Overall resolution rate
- Resolution rate by severity
- Resolution rate by category (sorted worst-first to highlight noisy categories)
- Suppressed categories (weight < 0.1)
Repo-Specific Rules (.bug-review.md)
Teams can create .bug-review.md at their repo root:
## Focus Areas
- Pay special attention to authentication flows
- Check all database queries for SQL injection
## Ignore
- Don't flag issues in generated files (*.generated.ts)
- Ignore style-only concerns
## Invariants
- All API endpoints must check req.user before accessing user data
- Database migrations must be reversible
## Severity Overrides
- Treat any auth bypass as CRITICAL regardless of category default
How to Use
Read [workflow.md](references/workflow.md) for detailed step-by-step with error handling. Read [review-passes.md](references/review-passes.md) for all 5 review pass prompts and the validator. Read [categories.md](references/categories.md) for bug categories and learned weights.
Related Skills
- Consider creating a Runbook skill for investigating bugs found by this review
- Consider creating a CI/CD skill to run this review automatically on PR open
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: pproenca
- Source: pproenca/dot-skills
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.