New advertisers: 50% off your first month with code FIRSTMONTHSee slots
bitwarden avatar

bitwarden-code-review

Bitwarden review plugin pairing an autonomous GitHub review agent with a multi-agent local pipeline.

version
3.1.0
GitHub stars
165
View on GitHub

What it does

  • Adds the bitwarden-code-reviewer agent plus code-review, code-review-local, and performing-multi-agent-code-review skills for PR and local reviews
  • Classifies findings into CRITICAL, IMPORTANT, DEBT, SUGGESTED, and QUESTION tiers, and drops low-confidence findings below a 75 threshold
  • Runs six specialized sub-agents for architecture, quality, bugs, security, validation, and severity audit, writing the report to local files
  • Designed for Bitwarden repositories that want consistent review standards, dependency-change checks, and change-risk ratings

Comprehensive code review system with organization-wide standards.

Add marketplace

/plugin marketplace add bitwarden/ai-plugins

Run it inside Claude Code once, then install the plugin below.

Install

/plugin install bitwarden-code-review@bitwarden-marketplace

Run it inside Claude Code after adding the marketplace.

Files

Discovered from source

Addressing Code Review Comments

You are working alongside the user to address review comments on their pull request. Reviewer feedback flows to you; you present analysis, fixes, and draft replies back to the user. The user decides what gets implemented and what gets posted.

Core principle: Verify before implementing. Surface ambiguity before assuming. Technical correctness over social comfort.

Workflow

For each review:

  1. Read the full set of comments before reacting to any single one.
  2. Restate each comment's technical requirement in your own words.
  3. Verify the claim against the actual codebase.
  4. Evaluate whether it's sound for this codebase, given context the reviewer may lack.
  5. Present your read to the user — fix, pushback, or clarification needed — and ask about anything ambiguous before touching code.
  6. Implement confirmed items one at a time, test each, and report what changed.

If a comment is unclear, stop and ask the user before touching anything. Comments often relate to each other, and partial understanding leads to half-fixes.

Fetching the Full Set of Comments

PR feedback lives across three separate GitHub API endpoints. Call all three:

  • Inline review comments — line-level, attached to a diff hunk: repos/{owner}/{repo}/pulls/{pr}/comments
  • Reviews — the summary message a reviewer leaves when they submit their review: repos/{owner}/{repo}/pulls/{pr}/reviews
  • Conversation comments — top-level PR comments not attached to any line, posted in the main conversation thread: repos/{owner}/{repo}/issues/{pr}/comments (note: issues, not pulls — PRs are issues underneath)

If the user says you missed a comment, check coverage of all three endpoints before re-reading the data you already fetched — the gap may be that you missed an endpoint.

Evaluating a Suggestion

Before recommending the user implement, check:

  • Is it technically correct for this codebase?
  • Does it break existing functionality or tests?
  • Is there a reason the current implementation is the way it is?
  • Does the reviewer have full context, or are they missing something?
  • Does it conflict with prior decisions the user has made? (If so, flag before changing anything.)

If you can't verify, say so: "I can't verify [X] without [Y] — want me to investigate, or handle it yourself?"

YAGNI check: When a reviewer suggests "implementing this properly" (adding scope), grep for actual usage. If nothing calls the affected code, surface that instead — "Nothing calls this. Worth removing instead of expanding it?"

When to Recommend Pushback

Draft a pushback reply for the user when the suggestion breaks things, the reviewer is missing context, it violates YAGNI, it's wrong for this stack, legacy/compat constraints apply, or it conflicts with the user's architecture.

Lead with technical reasoning, reference the specific code or constraint, ask a question if there's genuine ambiguity, and keep it short. Present the draft as plain text the user can paste — don't post it yourself.

If you recommended pushback and then find the reviewer was right, say so plainly and move on. Skip the apology.

When the Reviewer Asks a Tradeoff Question

Some review comments aren't suggestions — they're questions about intent. Phrases like "either could be defensible — what's the intent?" or "should we do X or is the current Y acceptable?" signal a normative tradeoff with no objectively correct answer in the code itself.

When you spot this:

  • Don't pick a side and write up a justification. That gives the user a verdict where they need a decision.
  • Lay out both sides honestly: the cost and benefit of each option.
  • Surface the tradeoff to the user as a decision, not a fact. If you have a strong technical lean, say so — but flag it as your read, not the answer.
  • Ask the user which direction to go before drafting a reply.

You can construct a confident technical answer for almost any tradeoff. Don't. The user is the decider; your job is to make their decision cheap, not to make it for them.

Signals you're in this scenario: the comment ends with "what's the intent?", "thoughts?", "either could be defensible", "is this acceptable", "would love your take", or names two alternatives explicitly. If you find yourself building a case for one side, stop and ask whether the comment is asking which way rather than whether to fix.

Bad — picks a side:

Reviewer: "Should we wrap these in rollback, or rely on retry-on-next-run? Either could be defensible — what's the intent?" "The retry approach is correct because it's idempotent and the framework re-runs migrations naturally. No rollback needed."

Good — surfaces the tradeoff:

Reviewer: "Should we wrap these in rollback, or rely on retry-on-next-run? Either could be defensible — what's the intent?" "This is a real tradeoff, want your call before I reply. Option A: rollback adds atomicity but introduces a new failure surface (the rollback can also fail). Option B: current behavior relies on needsMigration() re-detecting on the next run; both writes are idempotent so retry is safe, but there's a brief stale-state window. My lean is B because the rollback path is fallible against the same subsystem that just failed — but A is defensible if you'd rather guarantee no half-state. Which direction?"

How to Talk to the User

Skip affirmations. You're collaborating, not performing.

Avoid: "You're absolutely right!" / "Great point!" / "Thanks for catching that!" / any gratitude expression / "Let me implement that now" before verification.

Do: State the technical content. Make obvious fixes and report the diff. Ask when something is genuinely ambiguous.

If you catch yourself about to write "Thanks" or "You're right" — delete it.

Examples

Bad — performative:

Reviewer: "Remove legacy code" "You're absolutely right! Removing it now."

Good — verified:

Reviewer: "Remove legacy code" "Checked — build target is 10.15+, but this API needs 13+. The legacy path is load-bearing for backward compat. The current impl does have a wrong bundle ID though. Fix the bundle ID and keep the legacy path, or drop pre-13 support?"

Good — YAGNI:

Reviewer: "Implement proper metrics tracking with database, date filters, CSV export" "Grepped the codebase — nothing calls this endpoint. Remove it instead of expanding it? Or is there usage I'm missing?"

Good — reporting a fix:

"Fixed in auth/session.ts:42 — reviewer was right that the token wasn't being cleared on logout."

Drafting Replies the User Will Post

Drafts are plain text the user can paste. If they want to post via gh, inline thread replies go to repos/{owner}/{repo}/pulls/{pr}/comments/{id}/replies (not the top-level PR comment endpoint) — mention this only if asked.

Bottom Line

Reviewer feedback is suggestions to evaluate with the user, not orders to follow. Verify, surface ambiguity, recommend a direction, implement once confirmed. No performative agreement. Technical rigor always.

Readme

Bitwarden Code Review Plugin

AI-powered code review for Bitwarden — an autonomous review agent for everyday PRs, plus a rigorous multi-agent pipeline for the changes that warrant a deeper look.

Overview

This plugin provides an autonomous code review agent that conducts thorough, professional code reviews following Bitwarden's organizational standards. The agent focuses on security, correctness, and high-value feedback while maintaining a high signal-to-noise ratio.

It offers two complementary lenses. The autonomous bitwarden-code-reviewer agent reviews a pull request the way a human reviewer would and posts inline comments to GitHub. The performing-multi-agent-code-review skill takes a different approach — it has Claude evaluate code as Claude across a pipeline of specialized sub-agents, trading human-style commentary for depth and high-signal findings written to a local report.

Features

  • Autonomous Review Agent: Single agent handles all code review tasks without manual invocation
  • Organizational Standards: Consistent review process, finding classification, and comment formatting across all repositories
  • Thread Detection: Prevents duplicate comments by detecting existing threads before posting
  • Security-First Approach: Prioritizes security vulnerabilities, data exposure, and authentication issues
  • Structured Thinking: Uses explicit reasoning blocks to improve review quality and consistency
  • Confidence Scoring: Pre-filters findings with a 0-100 confidence score (≥75 threshold) before validation to reduce false positives
  • Multi-Agent Review Pipeline: A separate performing-multi-agent-code-review skill runs six specialized sub-agents — architecture compliance, code quality, bug analysis, security & logic, validation, and severity audit — for depth on complex changes, plus two that fire only when the diff calls for them: Claude configuration and skill review

Skills

SkillTriggersPurpose
code-review/bitwarden-code-review:code-reviewReview a GitHub pull request and post findings directly to GitHub
code-review-local/bitwarden-code-review:code-review-localReview a GitHub pull request or local changes and write the review to local files instead of posting
classifying-review-findings"classify finding", "severity"5-tier severity system (CRITICAL / IMPORTANT / DEBT / SUGGESTED / QUESTION) with emoji and label mapping
avoiding-false-positives"validate finding", "verify before posting", "stacked PR"Rejection criteria and verification checks that drop low-confidence findings before they reach a comment, plus the once-per-review gate that decides whether completeness findings apply to a confirmed stack layer
performing-multi-agent-code-review"perform multi-agent code review", "review the last week of commits in this repo"Perform a rigorous, multi-agent code review
posting-bitwarden-review-comments"post inline comment", "post PR comment"Inline finding format per Bitwarden standards (severity emojis, explanation, actionable suggestion); posts to GitHub or writes to the file path the agent passes
posting-review-summary"post summary", "summary comment"Final summary format, including the No Verdict and Not covered forms; posts to GitHub or writes to the file path the agent passes
reviewing-dependency-changes"package.json", "Renovate PR", "dependency manifest"Flags dependency manifest changes for AppSec approval, version-bump significance, and lock-file hygiene
assessing-change-risk"assess the risk of this change", "how much human review does this need"Rates a finished or planned change from low to critical with evidence for every answer, then states the human-review requirement and the areas to look at, as JSON plus a readable summary
addressing-code-review-comments"address review comments", "respond to PR feedback"Guides developers working through review comments locally — verify before implementing, surface ambiguity, no performative agreement

Architecture

Code Review Agent

The plugin provides a single agent (bitwarden-code-reviewer) that follows a linear six-step review process — from context gathering through validation to posting. It is the one place that decides where a review lands: in GitHub Actions the review goes to the pull request; for code-review-local and local mode it writes to ${CLAUDE_PLUGIN_DATA}/code-reviews/, or to --output-dir when given, and never into the repository. See AGENT.md for the full flow and the agent flow diagrams for who calls it and where its output goes.

Finding Classification

See classifying-review-findings for the 5-tier severity system and classification criteria.

Directory Structure

bitwarden-code-review/
├── .claude/
│   └── settings.json                         # Security boundaries
├── .claude-plugin/
│   └── plugin.json                           # Plugin metadata
├── agents/
│   └── bitwarden-code-reviewer/
│       └── AGENT.md                          # Main review agent
├── docs/
│   ├── code-review-agent-flows.md            # Mermaid diagrams of the review agent
│   └── multi-agent-code-review-flows.md      # Mermaid diagrams of the multi-agent review
├── skills/                                   # See Skills table above
├── tests/
│   └── TESTING.md                            # Test plan and validation
└── README.md                                 # This file

Security

Permission Boundaries

The plugin includes a .claude/settings.json file that defines security boundaries by explicitly denying dangerous GitHub operations.

Recommended Project Configuration

When using this plugin in your repositories, copy the security settings to your project's .claude/settings.json. This ensures the code review agent cannot perform destructive operations in your project, following the principle of least privilege.

Usage

Automatic Invocation

The agent is automatically invoked by Claude when:

  • User mentions "review", "PR", or "pull request"
  • User requests code review feedback
  • User analyzes code changes

Manual Invocation

# Invoke the review agent explicitly
Use the bitwarden-code-reviewer agent to review this PR

Multi-agent code review skill

The performing-multi-agent-code-review skill is built for complex changes where one reviewer — human or AI — can't hold every concern in view at once. Instead of a single pass, it puts a team of specialized agents on the same diff, each reviewing from its own perspective — architecture and pattern compliance, code quality, bugs, and security & logic — then validates and severity-audits everything they surface. It started from Anthropic's code-review command and was rebuilt for the control that command lacks: it wires in our own bitwarden-security-engineer plugin, runs on any model you choose, reviews draft or published PRs — plus local changes, branch comparisons, and commit ranges — and writes its report to a local file instead of posting to GitHub.

It's a deliberately different lens from the bitwarden-code-reviewer agent. That agent reviews the way a human reviewer would; this skill has Claude evaluate code as Claude — optimized for signal, not parity. It spotlights blockers, real bugs, and known-bad patterns, and stays out of the nit-picking lane. Each potential finding is scored 0–100, and only those clearing an 80-confidence bar are raised; every one it keeps is cited with file, line, and the agent that caught it. What clears the bar still gets challenged — the validation and severity-audit agents can overturn a finding — but an overturned finding is never dropped: it moves into a collapsed Reviewed and Dismissed section, tagged with its original severity, original confidence, and the reason it was set aside. That section is deliberate — a human sees everything the first pass surfaced and can judge when a dismissal was wrong and the original call was right; without it, that signal is lost.

Agents start cold — a sub-agent inherits none of the main session's context — so the skill briefs every one of them explicitly. Each receives Bitwarden's zero-knowledge invariant and the P01–P06 threat-model directive verbatim, bar the conditional skill-review agent, which returns prose for the orchestrator to classify and never reasons about vault data itself. Feature context — the PR's intent, the ticket, the product framing — is handed out deliberately: the architecture and security agents get the full "why" so they can reason adversarially from intent, while the quality and bug agents see only the diff, so their first read stays unbiased.

For the whole process at a glance, see the review flow diagrams.

The performing-multi-agent-code-review skill slots cleanly into a Claude Code agent-teams loop — run it at the end of a coding session, address what it finds, refactor — or as a depth-of-review gate on a draft PR before you publish.

Examples

Invoke the skill explicitly with the slash command, or with natural language — it triggers on phrasing like "thorough", "deep", "multi-pass", or "multi-agent" review, and on commit-range framing like "review the last week of commits". With no model flags, the review runs on your session's model, with the severity audit defaulting to sonnet.

1. Local changes, all defaults. The simplest run — review your uncommitted work before you commit:

Perform a thorough multi-agent code review of my local changes.

2. A specific pull request. Pass a PR number or URL; it reviews draft and published PRs alike:

/bitwarden-code-review:performing-multi-agent-code-review https://github.com/bitwarden/ios/pull/1234567 --model opus

3. Changes over a period of time. Commit-range mode reviews the cumulative diff across a time window, commit count, or explicit ref pair. Run it from inside the target repo; it confirms the resolved range with you before spending tokens:

Review the last week of commits using /bitwarden-code-review:performing-multi-agent-code-review --model opus

4. Full control, per stage. Tune each stage independently — opus for analysis and validation, opus for security, sonnet for the audit — and send the report to a specific directory:

/bitwarden-code-review:performing-multi-agent-code-review \
  https://github.com/bitwarden/gh-actions/pull/604 \
  --model-analysis opus \
  --model-security opus \
  --model-validation opus \
  --model-audit sonnet \
  --output-dir ./reviews

A security floor keeps --model-security from ever dropping below your global model, so threat-model evaluation never silently degrades. Omit --output-dir and the report lands in ${CLAUDE_PLUGIN_DATA}/code-reviews/, organized across projects and never git-tracked.

In GitHub Actions

See the production implementation: bitwarden/gh-actions _review-code.yml

Installation

Available through Bitwarden's internal Claude Code marketplace:

# Add the Bitwarden marketplace (if not already added)
/plugin marketplace add https://github.com/bitwarden/ai-plugins

# Install the code review plugin
/plugin install bitwarden-code-review@bitwarden-marketplace

# Restart Claude Code

Contributing

See CONTRIBUTING.md for guidelines on updating this plugin.

License

Bitwarden

Maintainers

  • @team-ai-sme

Support

For issues or questions:

Details

Marketplace
bitwarden/ai-plugins
Source
plugins/bitwarden-code-review
Category
Community

More from bitwarden/ai-plugins

All 25

Similar to bitwarden-code-review

More Development Tools