Skip to main content
subagent CX Codex

code-review-swarm — Claude Code subagent: setup and review

code-review-swarm deploys coordinated AI review agents against pull requests via the GitHub CLI. It flags security flaws and architecture drift before merging.

no license ★ 850 updated 2026-10-26

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

What code-review-swarm does

This subagent orchestrates focused review roles across code diffs pulled directly through gh. Instead of relying solely on linters, it triggers npx ruv-swarm to evaluate security risks and code structure. Critical findings can directly block the pull request.

A working GitHub CLI session is mandatory. The pre-hook runs gh auth status and halts immediately if authentication is missing. Under the hood, it runs Bash commands and relies on claude-flow MCP tools to coordinate child agents. Thresholds and required checks are controlled by .github/review-swarm.yml.

What it helps with

  • inspect pull requests for OWASP vulnerabilities and secret exposure
  • detect inefficient database queries and memory allocation issues
  • evaluate SOLID design patterns and module coupling
  • post structured review comments directly to GitHub using gh

Example prompts for the agent

  • Run code-review-swarm on PR 123 and post the findings
  • Perform a security review on PR 42 with suggested fixes
  • Analyze architectural coupling and performance bottlenecks for this pull request

How to install code-review-swarm

Manually: put the files in place

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

For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about code-review-swarm

How to install code-review-swarm in Claude Code?

Save the subagent configuration file directly into .claude/agents/code-review-swarm.md in your project root.

What does code-review-swarm do?

It orchestrates specialized review agents focusing on security, performance, architecture, and styling. Findings are evaluated against quality gates and submitted to GitHub via CLI.

What are the prerequisites for this subagent?

You must authenticate using gh auth login. The subagent pre-hook executes gh auth status and exits with an error if GitHub credentials are missing.

Similar subagents

All subagents for Code review and refactoring →

From the same set76

The whole set →
production-validator production-validator — a subagent that hunts leftover mocks and stubs in your code, then runs the tests against a real database, cache and payment API before you deploy. CX Codex ★ 850repo stars multi-repo-swarm multi-repo-swarm coordinates AI swarms across multiple repositories with the GitHub CLI and ruv-swarm. Useful for cross-project updates. CX Codex +1 ★ 850repo stars coder The coder subagent implements and refactors code, designs APIs, and handles errors. Use it for development tasks that call for tests and follow-up checks. CX Codex ★ 850repo stars repo-architect repo-architect maps how your repositories are laid out and proposes a cleaner shape: a shared project template plus file sync across repos through GitHub MCP. CX Codex ★ 850repo stars supabase-admin supabase-admin — a Claude command that puts the agent in charge of Supabase: Postgres schemas, RLS policies, auth and storage buckets, all through the MCP server rather than the CLI. CX Codex +1 ★ 850repo stars ml-developer ml-developer — a dedicated subagent for training machine learning models, exploring hyperparameter spaces, and editing Jupyter notebooks. CX Codex ★ 850repo stars Load Balancing Coordinator The Load Balancing Coordinator subagent assigns work according to agent load and task priority. Use it to manage queues or move work away from overloaded agents. CX Codex ★ 850repo stars release-swarm release-swarm is a Claude Code command for planning releases from commits and merged pull requests, preparing changelogs, and coordinating publication through GitHub CLI. CX Codex +1 ★ 850repo stars

Project sponsors

Companies that keep this analytics open