SkillAgentSearch skills...

review-areas

Fan-out review of the current branch, an external PR, or a branch in another clone — runs each per-area reviewer over the files it owns and aggregates findings. With --iterate, alternates review/fix passes until two consecutive clean reviews or the iteration cap is reached.

Install / Use

npx skills add mongodb/mongo-csharp-driver

Installs into whichever agent you are using.

About this skill

Claude Commands

Claude Code slash commands

Quality Score

70/100

Supported Platforms

Claude Code

description: Fan-out review of the current branch, an external PR, or a branch in another clone — runs each per-area reviewer over the files it owns and aggregates findings. With --iterate, alternates review/fix passes until two consecutive clean reviews or the iteration cap is reached. Requires the superpowers plugin (errors out if it is not available). argument-hint: "[--all] [--model opus|sonnet|haiku] [--iterate [--max-iterations N]] [<PR#> | <clone-path> [<base-ref> [<head-ref>]] | <base-ref> [<head-ref>]]" allowed-tools: Bash, Read, Glob, Grep, Write, Agent, Skill

/review-areas

Run the per-area reviewer sub-agents (.claude/agents/*-reviewer.md) over a diff range in parallel and produce one consolidated report. Three modes:

  • Local range mode — diff the current repo's branch.
  • External PR mode — fetch a GitHub PR and diff against its base.
  • External clone mode — diff a branch in a different clone of this repo, while running with the current clone's reviewer briefs and AGENTS.md files. Useful when the branch being reviewed lacks the latest agent/architecture updates that live in the current clone.

User args: $ARGUMENTS

Step 0 — Require the superpowers plugin (hard gate)

This skill depends on the superpowers plugin and will not run without it. Before doing anything else:

  1. Check the session's available-skills list (the <system-reminder> skill listing) for entries whose names start with superpowers:. At minimum, confirm all of these are present: superpowers:requesting-code-review, superpowers:receiving-code-review, superpowers:test-driven-development, superpowers:systematic-debugging, superpowers:verification-before-completion, and superpowers:brainstorming.
  2. If any of those are missing, stop immediately. Do not parse args, diff, or dispatch reviewers. Emit exactly one error message to the user naming which superpowers skills were not found and saying that /review-areas requires the superpowers plugin to be installed and enabled. Then end the response.
  3. If all are present, invoke superpowers:requesting-code-review now to frame the entire run — this review is the code-review request it describes — then continue to Step 1. The superpowers skills are woven into the workflow at the points called out below (fixer pass, convergence gate); honor them there.

Step 1 — Determine scope

Parse $ARGUMENTS:

  • If --all is present, queue every reviewer in the tables below regardless of diff. Skip step 2's filtering.

  • If --model <name> is present, capture <name> (must be one of opus, sonnet, haiku) and pass it on every Agent dispatch in step 3. If absent, omit the model parameter so each reviewer falls back to its frontmatter setting (currently inherit for all of them, which means the parent session's model).

  • If --iterate is present, enable the iteration loop described in Step 5. It is only valid in local range mode and external clone mode; if combined with external PR mode (a <PR#> token), stop immediately and tell the user that --iterate cannot be used with external PRs (we don't push fixes back to PR branches). If --max-iterations <N> is also present, capture <N> as the cap (must be a positive integer, ≤ 26 because file letters run az); default to 10 if absent. --max-iterations without --iterate is an error — tell the user and stop.

  • Examine the remaining non-flag tokens in priority order: first try external PR mode, then external clone mode, then local range mode.

    External PR mode — if the first non-flag token looks like a PR number (a bare integer such as 1234, or a #-prefixed integer such as #1234), treat this as an external PR review:

    1. Run gh pr view <PR#> --json number,title,url,baseRefName,headRefOid and capture the JSON.
    2. Parse <owner>/<repo> from the PR URL (e.g. https://github.com/mongodb/mongo-csharp-driver/pull/1991mongodb/mongo-csharp-driver).
    3. Run git remote -v and find the remote whose fetch URL contains <owner>/<repo> (case-insensitive; works for both HTTPS and SSH URLs). If multiple remotes match, pick the first. If none match, fall back to trying upstream then origin.
    4. Run git fetch <remote> refs/pull/<PR#>/head to bring the PR's head commit into FETCH_HEAD.
    5. Capture the head SHA: git rev-parse FETCH_HEAD.
    6. Ensure the base branch is locally available: git fetch <remote> <baseRefName> (safe even if already present). The tracking ref will be <remote>/<baseRefName>.
    7. Set base ref = <remote>/<baseRefName> and head ref = the SHA from step 5.
    8. Set diff-repo = the absolute path of the current repo (git rev-parse --show-toplevel).
    9. Record the PR metadata (number, title, URL) and the remote name for display in the step 4 report header.

    External clone mode — otherwise, if the first non-flag token resolves to an existing directory (test -d "<token>"), treat it as the path to another clone of this repo and review the branch checked out there:

    1. Capture an absolute path: <clone> = $(cd "<token>" && pwd) (or realpath). All subsequent git commands and file paths must use this absolute form.
    2. Confirm it's a git repo by running git -C "<clone>" rev-parse --show-toplevel. If that fails, stop and tell the user that <clone> is not a git checkout.
    3. Capture a head label for display and filename use: git -C "<clone>" rev-parse --abbrev-ref HEAD. If it returns the literal HEAD (detached), fall back to git -C "<clone>" rev-parse --short HEAD.
    4. Collect the remaining non-flag tokens (after the path) in order:
      • First → base ref (default: main)
      • Second → head ref (default: HEAD)
    5. Set diff-repo = <clone>. Every git command in the rest of this skill must be run with git -C "<diff-repo>" …, and every file path passed to reviewers must be absolute (<diff-repo>/<repo-relative-path>). The parent agent's own working directory stays in the current clone so that AGENTS.md files and reviewer briefs continue to load from there — that's the point of this mode.

    Local range mode — otherwise, the remaining non-flag tokens are refs in the current repo. Collect them in order:

    • First token → base ref (default: main)
    • Second token → head ref (default: HEAD)
    • Set diff-repo = the absolute path of the current repo (git rev-parse --show-toplevel).

Use <base>...<head> as the diff range throughout (three-dot syntax finds the merge base). Examples:

  • /review-areasmain...HEAD in the current repo
  • /review-areas 1234 → external PR #1234 (fetches and diffs against its base branch)
  • /review-areas #1234 → same as above
  • /review-areas HEAD~3HEAD~3...HEAD in the current repo (last 3 commits only)
  • /review-areas abc123 def456abc123...def456 in the current repo (arbitrary commit range)
  • /review-areas --all HEAD~5 HEAD~2 → all reviewers, commits HEAD~5 through HEAD~2 in the current repo
  • /review-areas ~/code/csharp-driver-pr → review the current branch of the clone at ~/code/csharp-driver-pr against its main
  • /review-areas ~/code/csharp-driver-pr release/3.0 → review that clone's HEAD against its release/3.0
  • /review-areas ~/code/csharp-driver-pr origin/main feature-x → review feature-x in that clone against origin/main
  • /review-areas --iterate ~/code/csharp-driver-pr → review the clone's branch, then loop review → fix → review until two consecutive clean passes (or 10 iterations)
  • /review-areas --iterate --max-iterations 5 ~/code/csharp-driver-pr → same but cap at 5 iterations
  • /review-areas --iterate → iterate on the current repo's branch against main

If --all was not passed, run git -C "<diff-repo>" diff --name-only <base>...<head>. If the result is empty, stop and tell the user the range has no changes — do not dispatch reviewers. In iterate mode this end-of-range check is performed at the start of every iteration; a mid-loop empty range means the latest fixer commit reverted all changes (unusual — flag it to the user and stop).

Step 2 — Map changed files → reviewers

Match each changed file against the table. A file may match more than one reviewer; queue all matches. Track files that match nothing — they go in an "Unmapped changes" section of the final report so coverage gaps are visible.

| Reviewer | Path patterns | |---|---| | bson-reviewer | src/MongoDB.Bson/**; tests/MongoDB.Bson.Tests/**; any file elsewhere implementing IBsonSerializer<T> (grep for it if you suspect one) | | transport-reviewer | src/MongoDB.Driver/Core/{Clusters,Servers,Connections,ConnectionPools,WireProtocol,Compression,Configuration,Misc}/**; tests/MongoDB.Driver.Tests/Core/{Clusters,Servers,Connections,ConnectionPools,WireProtocol,Compression,Configuration,Misc}/** | | operations-reviewer | src/MongoDB.Driver/Core/Operations/**; src/MongoDB.Driver/Core/Bindings/** (incl. CoreSession*.cs, CoreTransaction*.cs); src/MongoDB.Driver/ClientSession*.cs; tests/MongoDB.Driver.Tests/Core/Operations/**; tests/MongoDB.Driver.Tests/Core/Bindings/** | | auth-reviewer | src/MongoDB.Driver/Authentication/**; src/MongoDB.Driver.Authentication.AWS/**; src/MongoDB.Driver/MongoCredential.cs; src/MongoDB.Driver/Core/Connections/ConnectionInitializer.cs; tests/MongoDB.Driver.Tests/Authentication/**; tests/MongoDB.Driver.Tests/Communication/Security/** | | client-api-reviewer | src/MongoDB.Driver/{MongoClient,MongoDatabase,MongoClientSettings,MongoCredential,IMongoClient,IMongoDatabase,IMongoCollection}.cs; src/MongoDB.Driver/MongoCollectionImpl*.cs; src/MongoDB.Driver/MongoUrl*.cs; src/MongoDB.Driver/ServerApi*.cs; tests/MongoDB.Driver.Tests/MongoClient*.cs; tests/MongoDB.Driver.Tests/MongoDatabase*.cs; tests/MongoDB.Driver.Tests/MongoCollection*.cs; tests/MongoDB.Driver.Tests/IMongoClient*.cs; tests/MongoDB.Driver.Tests/IMongoDatabase*.cs; tests/MongoDB.Driver.Tests/IMongoCollection*.cs; tests/MongoDB.Driver.Tests/MongoUrl*.cs; tests/MongoDB.Driver.Tests/MongoCredential*.cs; tests/MongoDB.Driver.Tests/MongoIndex*.cs | | builders-reviewer | src/MongoDB.Driver/Builders.cs; src/MongoDB.Driver/{FilterDefinition,UpdateDefinition,ProjectionDefinition,SortDefinition,IndexKeysDefinition,ArrayFilterDefinition,PipelineDefinition,PipelineStageDefinition,FieldDefinition,SetFieldDefinitions}*.cs; tests/MongoDB.Driver.Tests/{FilterDefinition,UpdateDefinition,ProjectionDefinition,SortDefinition,IndexKeysDefinition,PipelineDefinition,PipelineStageDefinition,PipelineUpdateDefinition,RenderDollarForm,FindFluent,IFindFluent}*.cs | | aggregation-reviewer | src/MongoDB.Driver/{Aggregate,AggregateFluent,IAggregateFluent,ChangeStream,AggregateHelper,ChangeStreamHelper,AggregateExpressionDefinition}*.cs; src/MongoDB.Driver/Core/Operations/{AggregateOperation,AggregateToCollectionOperation,ChangeStreamOperation,ChangeStreamCursor}*.cs; tests/MongoDB.Driver.Tests/{Aggregate,AggregateFluent,IAggregateFluentExtensions,ChangeStream,NoPipelineInput}*.cs | | linq-reviewer | src/MongoDB.Driver/Linq/**; tests/MongoDB.Driver.Tests/Linq/** | | gridfs-reviewer | src/MongoDB.Driver/GridFS/**; tests/MongoDB.Driver.Tests/GridFS/** | | search-reviewer | src/MongoDB.Driver/Search/**; src/MongoDB.Driver/{QueryVector,VectorSearchOptions,BinaryVectorExtensions,SearchIndexType,CreateSearchIndexModel,CreateVectorSearchIndexModel*,CreateAutoEmbeddingVectorSearchIndexModel}*.cs; tests/MongoDB.Driver.Tests/Search/**; tests/MongoDB.Driver.Tests/{QueryVector,Rerank}*.cs | | encryption-reviewer | src/MongoDB.Driver.Encryption/**; src/MongoDB.Driver/Encryption/**; tests/MongoDB.Driver.Encryption.Tests/**; tests/MongoDB.Driver.Tests/Encryption/** | | diagnostics-reviewer | src/MongoDB.Driver/Core/Events/**; src/MongoDB.Driver/Core/Logging/**; `tests/MongoDB.Driver.Tests/Core/

Truncated for display — read the full file on GitHub.

Related Skills

View on GitHub
GitHub Stars0
CategoryDevelopment
Updated18h ago
Forks0

Security Score

80/100

Audited on Aug 24, 2026

1 medium1 low