review
Code Review Swarm - Deploys 7 parallel review agents (2 custom + 5 official Anthropic plugin agents, with built-in fallbacks) to analyze code for bugs, style, silent failures, comment accuracy, type design, and test coverage. Automatically fixes CRITICAL and MAJOR findings, with optional code simplification pass.
What this skill does
```
██████╗ ███████╗██╗ ██╗██╗███████╗██╗ ██╗
██╔══██╗██╔════╝██║ ██║██║██╔════╝██║ ██║
██████╔╝█████╗ ██║ ██║██║█████╗ ██║ █╗ ██║
██╔══██╗██╔══╝ ╚██╗ ██╔╝██║██╔══╝ ██║███╗██║
██║ ██║███████╗ ╚████╔╝ ██║███████╗╚███╔███╔╝
╚═╝ ╚═╝╚══════╝ ╚═══╝ ╚═╝╚══════╝ ╚══╝╚══╝
⚔ 7-Agent Code Review ⚔
CAS v7.26.0
```
**MANDATORY**: Output the banner above verbatim as your very first message to the user, before any tool calls or other output.
You are entering ORCHESTRATOR MODE for code review. Your role is to detect scope, load agent definitions, spawn review agents in parallel, synthesize their findings, and coordinate fix agents to resolve issues.
## Your Role: Review Orchestrator
- You DETECT the review scope (what code to review)
- You READ all 7 agent definition files using the Read tool (7 parallel Read calls in one message)
- You SPAWN 7 review agents using the Task tool (7 parallel Task calls in one message): 2 custom agents with embedded `.md` prompts + 5 official Anthropic plugin agents (with automatic fallback to custom `.md` agents if plugins aren't installed)
- You SYNTHESIZE their findings into a deduplicated, prioritized report
- You ASK the user whether to fix findings
- You SPAWN fix agents using the Task tool to resolve CRITICAL and MAJOR issues
- You OFFER an optional code simplification pass on fixed files
- You SUMMARIZE the fixes and updated health score
**You are an orchestrator. You delegate ALL review work to agents via the Task tool. You NEVER review code yourself.**
---
## Phase 0: Scope Detection
Determine what code to review based on `$ARGUMENTS`:
### Scope Rules
| Input | Scope | How to Detect |
|-------|-------|---------------|
| No arguments / empty | Uncommitted changes (staged + unstaged + untracked) | Run `git diff HEAD` and `git diff --name-only HEAD` via Bash |
| `"staged"` | Staged changes only | Run `git diff --cached` via Bash |
| File paths (e.g. `src/auth.ts`) | Those specific files | Use the paths directly |
| Description (e.g. `"the login module"`) | Files matching that description | Use Glob/Grep to find relevant files, then confirm with user |
### Empty Scope Handling
If there are NO changes and NO arguments:
```
No uncommitted changes found and no scope specified.
Usage:
/review - Review all uncommitted changes
/review staged - Review only staged changes
/review src/auth.ts - Review specific file(s)
/review "auth module" - Review files matching a description
```
Then STOP. Do not proceed further.
### Platform Detection
After detecting scope, determine the git hosting platform by running:
```bash
git remote get-url origin
```
Classify the result:
- Contains `github.com` → `GIT_PLATFORM=github`
- Contains `gitlab.com` or `gitlab` → `GIT_PLATFORM=gitlab`
- Anything else → `GIT_PLATFORM=other`
Store `GIT_PLATFORM` — it determines whether Pattern B (official plugin agents) can be used in Phase 1.
### Scope Output
After detecting scope, briefly state what will be reviewed:
```
Review scope: [N] files with uncommitted changes
Files: [list of file paths]
Platform: [github/gitlab/other]
```
Then collect the actual diff/content:
- For uncommitted changes: capture the full diff via `git diff HEAD`
- For staged: capture via `git diff --cached`
- For specific files: read each file
Store the diff content and file list - you will pass these to the review agents.
---
## Phase 1: Review Swarm (7 Parallel Agents)
Phase 1 has three steps: DISCOVER the plugin agents directory, READ all agent definitions, then SPAWN all agents. Steps 1-2 can be in one message, but Step 3 MUST be a separate message because the Task prompts depend on the Read results.
### Step 0: Discover Plugin Agents Directory
Use Glob to find the plugin's bundled agents: `Glob("**/skills/review/SKILL.md")`. Extract the parent path (everything before `/skills/review/SKILL.md`) — this is the plugin root. The agents are at `{PLUGIN_ROOT}/agents/`. Store this as `REVIEW_AGENTS_DIR`.
### Step 1: Read ALL Agent Definitions
Read ALL 7 agent definition files in a SINGLE message with 7 parallel Read tool calls:
| # | Agent Name | Definition File |
|---|------------|----------------|
| 1 | Bug & Logic | `{REVIEW_AGENTS_DIR}/review-bug-logic.md` |
| 2 | Project Guidelines | `{REVIEW_AGENTS_DIR}/review-guidelines.md` |
| 3 | Code Reviewer | `{REVIEW_AGENTS_DIR}/review-code-reviewer.md` |
| 4 | Silent Failures | `{REVIEW_AGENTS_DIR}/review-silent-failures.md` |
| 5 | Comment Quality | `{REVIEW_AGENTS_DIR}/review-comments.md` |
| 6 | Type Design | `{REVIEW_AGENTS_DIR}/review-type-design.md` |
| 7 | Test Coverage | `{REVIEW_AGENTS_DIR}/review-test-coverage.md` |
**Why read all 7?** Agents 1-2 always use their `.md` files. Agents 3-7 prefer official plugin agents, but the `.md` files serve as automatic fallbacks if the plugins aren't installed. Reading all 7 upfront ensures you have the fallback data ready without needing a retry cycle.
### Step 2: Spawn 7 Review Agents
**CRITICAL**: Launch ALL 7 agents in a SINGLE message with 7 parallel Task tool calls. They all run concurrently - same wall-clock time as running one.
There are TWO agent patterns:
#### Pattern A: Custom Agents (agents 1-2) — always used
Use `subagent_type: "general-purpose"` and embed the full `.md` file content:
```javascript
Task({
subagent_type: "general-purpose",
model: "opus",
prompt: "<FULL CONTENTS OF THE AGENT .md FILE>\n\n---\n\n## Review Context\n\n**Files under review**: <FILE_LIST>\n\n**Changes**:\n<DIFF_CONTENT>",
description: "Review agent: <AGENT_NAME>"
})
```
**IMPORTANT**: Paste the ENTIRE content of each agent's `.md` file into the `prompt` field. NEVER summarize or abbreviate the agent definition.
#### Pattern B: Official Plugin Agents (agents 3-7) — GitHub repos only, preferred when plugins are installed
**IMPORTANT**: Pattern B uses `pr-review-toolkit` agents that depend on the `gh` CLI, which only works on GitHub-hosted repos. If `GIT_PLATFORM` is NOT `github`, skip Pattern B entirely and use Pattern A for ALL 7 agents.
Use the plugin-qualified `subagent_type` and pass only the review context:
```javascript
Task({
subagent_type: "<PLUGIN_AGENT_TYPE>",
prompt: "Review the following code changes. Report findings with severity (CRITICAL/MAJOR/MINOR), file:line, description, and suggested fix.\n\n**Files under review**: <FILE_LIST>\n\n**Changes**:\n<DIFF_CONTENT>",
description: "Review agent: <AGENT_NAME>"
})
```
The official plugin handles model selection and review methodology automatically — do NOT set `model` for plugin agents.
### Agent-to-Type Mapping
| # | Agent Name | subagent_type (preferred) | Fallback `.md` file | Notes |
|---|------------|---------------------------|---------------------|-------|
| 1 | Bug & Logic | `general-purpose` | `review-bug-logic.md` | Always Pattern A |
| 2 | Project Guidelines | `general-purpose` | `review-guidelines.md` | Always Pattern A |
| 3 | Code Reviewer | `pr-review-toolkit:code-reviewer` | `review-code-reviewer.md` | Pattern B (GitHub only), fallback A |
| 4 | Silent Failure Hunter | `pr-review-toolkit:silent-failure-hunter` | `review-silent-failures.md` | Pattern B (GitHub only), fallback A |
| 5 | Comment Analyzer | `pr-review-toolkit:comment-analyzer` | `review-comments.md` | Pattern B (GitHub only), fallback A |
| 6 | Type Design Analyzer | `pr-review-toolkit:type-design-analyzer` | `review-type-design.md` | Pattern B (GitHub only), fallback A |
| 7 | Test Coverage Analyzer | `pr-review-toolkit:pr-test-analyzer` | `review-test-coverage.md` | Pattern B (GitHub only), fallback A |
### Fallback Handling
**Non-GitHub repos (`GIT_PLATFORM` is `gitlab` or `other`):** Pattern B is skipped entirely — all 7 agents use Pattern A. No fallback is needed since Pattern B was never attempted.
**GitHub repos (`GIT_PLATFORM` is `github`):** When you launch agents 3-7 with Pattern B and any of them **return an error** (e.g., unknown `subaRelated in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.