# code-review-swarm

code-review-swarm sends a pull request through several review agents at once: security, performance, style, architecture. Handy when a plain diff and a linter no longer catch the trouble.

- command · `type=command` · Claude Code, Codex, GitHub Copilot, Gemini CLI · ★ 850 repo stars
- Author: ruvnet
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/ruvnet/agentic-flow/tree/HEAD/.claude/commands/github/code-review-swarm.md
- Updated: 2026-10-26
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/commands/code-review-swarm

## What it does

The command file maps out a review flow that runs on `gh` and `npx ruv-swarm`. It pulls PR metadata plus the diff, starts a swarm with named agents (`security`, `performance`, `style`, `architecture`, `accessibility`), then writes the findings back to the pull request as a comment or a review.

Behaviour lives in `.github/review-swarm.yml`. You choose required and optional agents, map each to a threshold (security blocks, performance warns, style suggests), and add rules such as no `eval` or no secrets hardcoded in source. Path triggers route `**/auth/**` to the security and architecture agents, while `**/api/**` pulls in performance checks.

Nothing runs until `gh` is authenticated, because every step calls `gh pr view` or `gh pr review`. The sample GitHub Actions job logs in with `GITHUB_TOKEN` through `gh auth login --with-token`.

## Requirements
- Works with: GitHub

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/commands/code-review-swarm.md` — Call it with /code-review-swarm. For all projects use ~/.claude/commands/

### Codex

**Manually: put the files in place**
- File: `~/.codex/prompts/code-review-swarm.md` — Call it with /prompts:code-review-swarm. Codex marks this format deprecated in favour of skills

### GitHub Copilot

**Manually: put the files in place**
- File: `.github/prompts/code-review-swarm.prompt.md`

### Gemini CLI

**Manually: put the files in place**
- File: `.gemini/commands/code-review-swarm.toml` — Gemini stores commands as TOML: the prompt text goes into the prompt field

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/ruvnet/agentic-flow/tree/HEAD/.claude/commands/github/code-review-swarm.md

## When to use it
- get a security agent over a pull request before merge
- spot leaked secrets and weak auth checks in the diff
- compare the change against `main` for load impact
- sort findings by threshold so security blocks and performance only warns
- wire automatic review to the `pull_request` event in GitHub Actions

## Example prompts
- /code-review-swarm run the security and performance agents over PR 123
- /code-review-swarm check this diff for leaked secrets and N+1 queries
- /code-review-swarm set the style threshold to suggest in `.github/review-swarm.yml`

## Similar
- [gitnexus-pr-swarm-review](https://affpapa.org/en/nevibecode/skills/gitnexus-pr-swarm-review.md) — skill · 438 installs
- [swarm-pr-feedback](https://affpapa.org/en/nevibecode/skills/swarm-pr-feedback-2.md) — skill · ★ 539 repo stars
- [code-review](https://affpapa.org/en/nevibecode/commands/code-review.md) — command · 5537 installs
- [make-pr-easy-to-review](https://affpapa.org/en/nevibecode/skills/make-pr-easy-to-review.md) — skill · 3400 installs
- [dyad:multi-pr-review](https://affpapa.org/en/nevibecode/skills/dyadmulti-pr-review.md) — skill · ★ 22348 repo stars
- [github-code-review](https://affpapa.org/en/nevibecode/skills/github-code-review.md) — skill · 1300 installs

From the same set: [ruvnet/agentic-flow](https://affpapa.org/en/nevibecode/by/ruvnet/agentic-flow.md) — 76 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
