Skip to main content
command CX Codex

code-review-swarm — Claude Code command: what it does, how to install

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.

no license ★ 850 updated 2026-10-26

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/commands/code-review-swarm.md
Open on GitHub

What code-review-swarm 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.

What it helps with

  • 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 for the agent

  • /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

How to install code-review-swarm

Manually: put the files in place

.claude/commands/code-review-swarm.md

Call it with /code-review-swarm. For all projects use ~/.claude/commands/

Questions about code-review-swarm

How do I install code-review-swarm in Claude Code?

Place the command file in your repo at .claude/commands/code-review-swarm.md. It then appears among the project's slash commands.

What does code-review-swarm do?

It walks an agent swarm through a pull request: security, performance, style, architecture and accessibility passes. Findings go back to the PR as a comment or review via gh.

What does it need in order to run?

An authenticated gh, since the PR is read and the result written with it. The agents themselves run through npx ruv-swarm.

Similar slash commands

All slash commands for Code review and refactoring →

From the same set76

The whole set →
sync-coordinator sync-coordinator aligns versions, dependencies, and docs across linked repositories. It orchestrates agent swarms using GitHub CLI and MCP tools. CX Codex +1 ★ 850repo stars architecture architecture designs system structure from specifications and pseudocode, covering components, interfaces, technology choices, and deployment. CX Codex ★ 850repo stars repo-architect repo-architect optimizes repository layouts and synchronizes files across projects using agent swarms. Helpful when setting up standard templates and multi-repo workflows. CX Codex +1 ★ 850repo stars swarm-pr swarm-pr coordinates agents working on a GitHub pull request, from diff analysis and review to reporting results back to the PR. CX Codex ★ 850repo stars swarm-issue swarm-issue is a Claude Code command that connects GitHub Issues to swarm work by splitting tasks into subtasks, suggesting agents, and tracking progress. It supports workflows managed through GitHub Issues. CX Codex +1 ★ 850repo stars project-board-sync project-board-sync keeps a GitHub Projects board in step with a claude-flow agent swarm: cards, statuses, sprint metrics. Useful when several agents touch one repo. CX Codex ★ 850repo stars release-manager release-manager coordinates release pipelines using an agent swarm. It synchronizes versions across packages, executes tests, and opens a GitHub pull request. CX Codex +1 ★ 850repo stars adaptive-learner adaptive-learner — a subagent that pulls similar past cases from ReasoningBank before it starts and files the outcome afterwards, so later runs lean on what already happened. CX Codex ★ 850repo stars

Project sponsors

Companies that keep this analytics open