Skill

Run multi-agent code reviews and refactors for Apple platforms

Reviews a git diff via 4 parallel read-only sub-agents (regression, security, reliability, contracts), producing a pure severity-ordered report - never applies

Works with githubxcodetuistswiftpm

42
Spark score
out of 100
Updated 3 months ago
Version 1.0.0

Add to Favorites

Why it matters

Automate comprehensive code review, bug investigation, and refactoring workflows for iOS and macOS projects using coordinated multi-agent swarms that analyze diffs, trace issues, and execute dependency-aware improvements across Swift, SwiftUI, and React codebases.

Outcomes

What it gets done

01

Run four-agent diff reviews that flag behavioral regressions, security risks, performance issues, and test gaps

02

Execute parallel bug hunts that reproduce issues, trace code paths, identify regressors, and rank root causes

03

Orchestrate large-scale refactors with dependency-aware work packets and parallel implementation

04

Audit SwiftUI and React performance by detecting re-render churn, layout thrash, and concurrency violations

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/ag-review-swarm | bash

Overview

Review Swarm

This skill reviews a git diff via four parallel read-only sub-agents (intent/regression, security/privacy, performance/reliability, contracts/coverage), aggregates and severity-orders the findings, and recommends a fix-now/fix-soon/optional path forward - it never applies fixes itself. Use it for a pure risk review of a diff (regressions, security, reliability, contract/coverage gaps) before merge. For a workflow that also applies safe fixes, use the companion review-and-simplify-changes skill instead.

What it does

Reviews a diff with four read-only sub-agents in parallel to find behavioral regressions, security or privacy risks, performance or reliability issues, and contract or test coverage gaps - purely a review skill, distinct from a companion simplify-and-fix skill: sub-agents never edit files and the main agent never applies fixes as part of this workflow. Step 1 determines scope in priority order (explicitly named files, current git changes, an explicit branch/commit/PR diff, or - only as a fallback for a review request with no clearer diff - the most recently modified tracked files), picks the smallest correct diff command for the repo state, reads local instructions (AGENTS.md, workflow docs, module architecture/contract docs) for the touched area, and builds a short intent packet for the reviewers covering what behavior is meant to change, what should stay unchanged, and any compatibility/rollout/security/migration constraints - inferring intent from the diff and flagging the inference as possibly incomplete if the user didn't state it. Step 2 launches four parallel read-only reviewers (or reviews locally for a tiny diff), each given the same scope and intent packet, forbidden from editing, patching, staging, or committing, and instructed to skip nits and speculative concerns without concrete impact. Sub-agent 1 (Intent and Regression) checks for unintended behavior drift outside the stated scope, broken edge cases or fallback paths, contract drift between callers and callees, and missing updates to adjacent flows that should change together. Sub-agent 2 (Security and Privacy) checks for missing or weakened authn/authz, unsafe input handling or injection risk, secret/token/sensitive-data exposure, and risky defaults or trust of unverified data. Sub-agent 3 (Performance and Reliability) checks for duplicate work or redundant I/O, new work added to hot paths, leaks or missing cleanup or retry storms, and ordering/race/failure-handling problems that make the change brittle. Sub-agent 4 (Contracts and Coverage) checks for API/schema/type/config/flag mismatches, migration or backward-compatibility fallout, missing or weak tests for the changed behavior, and missing logs/metrics/assertions that would make a regression harder to detect - all four reporting only issues that materially affect correctness, security, privacy, reliability, compatibility, or confidence, explicitly preferring to miss a nit over burying the user in low-value noise. Step 3 has the main agent aggregate and filter aggressively - dropping duplicates, weak/speculative claims, issues conflicting with the stated intent, and minor style comments unless they hide a real bug - normalizing survivors into file/line, category, severity (high/medium/low), why it matters, recommended follow-up, and confidence, converting ambiguous-intent findings into open questions rather than firm findings. Step 4 orders the output high-severity-high-confidence first, then medium-severity issues likely worth fixing before merge, then lower-severity follow-ups that can wait - stating plainly if nothing material was found rather than manufacturing feedback. Step 5 closes with a clear path forward grouped into fix now, fix soon, and optional follow-up, without implementing any of it.

When to use - and when NOT to

Use it when someone asks for a review swarm, parallel review, or diff review to find behavioral regressions, security/privacy risks, performance/reliability issues, or contract/coverage gaps. It never applies fixes - for a workflow that also applies safe, high-confidence fixes after review, use the companion review-and-simplify-changes skill instead.

Inputs and outputs

Input is an explicit file scope or a git diff (staged, unstaged, or an explicit comparison) plus an intent - stated or inferred from the diff. Output is a severity-ordered, evidence-backed findings report (file/line, category, severity, why it matters, recommended follow-up, confidence) and a fix-now/fix-soon/optional-follow-up recommendation - no edits applied.

Integrations

Uses four parallel read-only sub-agents (reviewer role) for the four review lenses, and reads local AGENTS.md/workflow/contract docs to build the intent packet reviewers work from.

Who it's for

Developers and reviewers who want a fast, multi-lens (regression/security/reliability/contracts) risk assessment of a diff before merging, prioritized by severity and confidence, without the tool making any changes itself.

Source README

Review Swarm

When to Use

Use this skill when you need parallel read-only multi-agent review of a current git diff or explicit file scope to find behavioral regressions, security or privacy risks, performance or reliability issues, and contract or test coverage gaps. Use when the user asks for a review swarm, parallel review, diff review,...

Review a diff with four read-only sub-agents in parallel, then have the main agent filter, order, and summarize only the issues that matter. This skill is review-only: sub-agents do not edit files, and the main agent does not apply fixes as part of this workflow.

Step 1: Determine Scope and Intent

Prefer this scope order:

  1. Files or paths explicitly named by the user
  2. Current git changes
  3. An explicit branch, commit, or PR diff requested by the user
  4. Most recently modified tracked files, only if the user asked for a review and there is no clearer diff

If there is no clear review scope, stop and say so briefly.

When using git changes, choose the smallest correct diff command:

  • unstaged work: git diff
  • staged work: git diff --cached
  • mixed staged and unstaged work: review both
  • explicit branch or commit comparison: use exactly what the user requested

Before launching reviewers, read the closest local instructions and any relevant project docs for the touched area, such as:

  • AGENTS.md
  • repo workflow docs
  • architecture or contract docs for the touched module

Build a short intent packet for the reviewers:

  1. What behavior is meant to change
  2. What behavior should remain unchanged
  3. Any stated or inferred constraints, such as compatibility, rollout, security, or migration expectations

If the user did not state the intent clearly, infer it from the diff and say that the inference may be incomplete.

Step 2: Launch Four Read-Only Reviewers in Parallel

Launch four sub-agents when the scope is large enough for parallel review to help. For a tiny diff or one very small file, it is acceptable to review locally instead.

For every sub-agent:

  • give the same scope and the same intent packet
  • state that the sub-agent is read-only
  • do not let the sub-agent edit files, run apply_patch, stage changes, commit, or perform any other state-mutating action
  • ask for concise findings only
  • ask for: file and line or symbol, issue, why it matters, recommended follow-up, and confidence
  • tell the sub-agent to avoid nits, style preferences, and speculative concerns without concrete impact
  • tell the sub-agent to send findings back to the main agent only

Use these four review roles.

Sub-Agent 1: Intent and Regression Review

Review whether the diff matches the intended behavior change without introducing extra behavior drift.

Check for:

  1. Unintended behavior changes outside the stated scope
  2. Broken edge cases or fallback paths
  3. Contract drift between callers and callees
  4. Missing updates to adjacent flows that should change together

This sub-agent is read-only. It must not edit files, apply patches, or make any other workspace changes.

Recommended sub-agent role: reviewer

Sub-Agent 2: Security and Privacy Review

Review the diff for security regressions, privacy risks, and trust-boundary mistakes.

Check for:

  1. Missing or weakened authn or authz checks
  2. Unsafe input handling, injection risks, or validation gaps
  3. Secret, token, or sensitive data exposure
  4. Risky defaults, permission expansion, or trust of unverified data

This sub-agent is read-only. It must not edit files, apply patches, or make any other workspace changes.

Recommended sub-agent role: reviewer

Sub-Agent 3: Performance and Reliability Review

Review the diff for new cost, fragility, or operational risk.

Check for:

  1. Duplicate work, redundant I/O, or unnecessary recomputation
  2. Added work on startup, render, request, or other hot paths
  3. Leaks, missing cleanup, retry storms, or subscription drift
  4. Ordering, race, or failure-handling problems that make the change brittle

This sub-agent is read-only. It must not edit files, apply patches, or make any other workspace changes.

Recommended sub-agent role: reviewer

Sub-Agent 4: Contracts and Coverage Review

Review the diff for compatibility gaps and missing safety nets.

Check for:

  1. API, schema, type, config, or feature-flag mismatches
  2. Migration or backward-compatibility fallout
  3. Missing or weak tests for the changed behavior
  4. Missing logs, metrics, assertions, or error paths that make regressions harder to detect

This sub-agent is read-only. It must not edit files, apply patches, or make any other workspace changes.

Recommended sub-agent role: reviewer

Report only issues that materially affect correctness, security, privacy, reliability, compatibility, or confidence in the change. It is better to miss a nit than to bury the user in low-value noise.

Step 3: Aggregate and Filter Findings

The main agent owns synthesis. Treat sub-agent output as raw review input, not final output.

Merge findings across all four reviewers and filter aggressively:

  • drop duplicates
  • drop weak or speculative claims
  • drop issues that conflict with the stated intent
  • drop minor style or readability comments unless they hide a real bug or maintenance risk

Normalize surviving findings into this shape:

  1. File and line or nearest symbol
  2. Category: regression, security, reliability, or contracts
  3. Severity: high, medium, or low
  4. Why it matters
  5. Recommended fix or follow-up
  6. Confidence: high, medium, or low

If a reviewer may be correct but the intent is unclear, turn it into an open question instead of a finding.

Step 4: Order the Output

Present findings in this order:

  1. High-severity, high-confidence issues
  2. Medium-severity issues that are likely worth fixing before merge
  3. Lower-severity issues or follow-ups that can wait

Keep the review concise. Findings should be actionable and evidence-backed.

If there are no material issues, say that directly instead of manufacturing feedback.

Step 5: Recommend a Clear Path Forward

After the findings, give the user a short path forward:

  • what to fix before merge
  • what to improve if time permits
  • what can safely be left alone

When helpful, group the path forward into:

  • fix now
  • fix soon
  • optional follow-up

Do not implement fixes as part of this skill. The output is a read-only review plus a prioritized recommendation.

Limitations

  • Use this skill only when the task clearly matches its upstream source and local project context.
  • Verify commands, generated code, dependencies, credentials, and external service behavior before applying changes.
  • Do not treat examples as a substitute for environment-specific tests, security review, or user approval for destructive or costly actions.

FAQ

Common questions

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.