skills/council-review/SKILL.md
Multi-agent code review council. A parallel team of specialized read-only reviewers (architect, correctness, security, compliance, silent-failures, type/comment, simplification) audits a diff, a synthesis agent consolidates findings, and a debate-consensus pass resolves conflicts into a single ranked verdict. Use this skill when reviewing a PR, branch, or diff before merge — standalone, or as the review primitive invoked by swarm-protocol's review-repair phase. Triggers on: (1) `/council-review <PR URL | branch | diff>`, (2) `/council-review` (no args) to review current uncommitted changes, (3) requests to review code with multiple specialized lenses or to gate a merge.
npx skillsauth add co8/cc-plugins council-reviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
A council reviews; it does not mutate. This skill runs a parallel team of specialized reviewers over a diff, consolidates their findings through a synthesis agent, resolves disagreements in a debate-to-consensus pass, and emits one ranked CODE_REVIEW.md verdict. It stops at the verdict. Execution, repair, and migrations are handed off to swarm-protocol.
This is the shared review primitive. swarm-protocol's review-repair phase invokes it instead of inlining its own dispatch list — one source of truth for what "reviewed" means across every project.
| Command | Purpose |
| ---------------------------------------- | -------------------------------------------------------------- |
| /council-review <PR URL> | Review a pull request (pulls diff if source control connected) |
| /council-review <branch> | Review a branch diff against its base |
| /council-review | Review current uncommitted changes (git diff HEAD) |
| /council-review --paste | Review a pasted diff or file |
If no target is provided and there are no uncommitted changes, ask what to review.
┌──────────────────────────────────────────────────────────────────┐
│ COUNCIL REVIEW │
├──────────────────────────────────────────────────────────────────┤
│ 1. SCOPE Resolve target → unified diff + changed-file map │
│ │
│ 2. COUNCIL 7 read-only reviewers, ALL in parallel: │
│ (parallel) ├─ architect ├─ silent-failures │
│ ├─ correctness ├─ types + comments │
│ ├─ security ├─ simplification │
│ └─ compliance (HIPAA/EU — conditional) │
│ │
│ 3. SYNTHESIS 1 agent dedupes, normalizes severity, clusters │
│ (sequential) overlapping findings, attributes each to source │
│ │
│ 4. DEBATE Resolve conflicts (reviewer A says fix, B says │
│ (sequential) leave). Produce consensus + dissent notes. │
│ │
│ 5. VERDICT CODE_REVIEW.md — ranked issues + recommendation │
│ → Approve / Request Changes / Needs Discussion │
│ │
│ ────────────── council stops here. mutation is swarm's job. ──── │
└──────────────────────────────────────────────────────────────────┘
Resolve the review target into a unified diff and a changed-file map.
git diff $(git merge-base HEAD <base>)..HEAD (default base: main).git diff HEAD (uncommitted) and staged changes.--paste → use the provided diff/file directly.Build a changed-file map and classify the change surface. The classification drives conditional reviewer activation in Step 2:
| Signal in diff | Activates | |---|---| | Paths touching PHI, audit trails, patient data, auth on health data | Compliance reviewer (HIPAA/EU) | | New/changed migrations, schema, RLS policies | Security reviewer escalated focus + flag for swarm handoff | | New public types, exported interfaces | Type design reviewer escalated focus | | Net-new modules, cross-cutting refactors | Architect escalated focus |
Write the diff + map to CODE_REVIEW.md header before dispatching, so the council shares one canonical view of the change.
Dispatch all active reviewers as read-only subagents in one message with multiple Agent tool calls. Council agents MUST NOT write to the working tree — they return findings only.
| # | Agent | Subagent Type | Lens |
|---|-------|--------------|------|
| C.1 | Architect | feature-dev:code-architect | Boundaries, coupling, abstraction fit, does this belong here, will it scale |
| C.2 | Correctness | feature-dev:code-reviewer | Logic errors, edge cases (null/empty/overflow), race conditions, off-by-one |
| C.3 | Security | feature-dev:code-reviewer (security prompt) | OWASP top 10, injection, authz flaws, secrets in code, SSRF, path traversal |
| C.4 | Silent Failures | pr-review-toolkit:silent-failure-hunter | Swallowed errors, bad fallbacks, inadequate error propagation |
| C.5 | Types + Comments | pr-review-toolkit:type-design-analyzer | Type encapsulation, invariant expression; stale/misleading comments |
| C.6 | Simplification | pr-review-toolkit:code-simplifier | Unnecessary complexity, redundancy, clarity, dead code |
| C.7 | Compliance | feature-dev:code-reviewer (compliance prompt) | Conditional. HIPAA/EU (GDPR) exposure, audit-trail integrity, consent, PHI handling. See masking rules below. |
C.5 merges the napkin's separate type and comment lenses —
type-design-analyzercovers both encapsulation and the comment-accuracy check, and one agent over a shared diff avoids a redundant pass. If a diff is comment-heavy (docs refactor), split C.5 into a dedicatedpr-review-toolkit:comment-analyzeragent.
Each reviewer returns a structured finding list: {severity, file, line, lens, issue, suggested_fix, confidence}. Severity is one of Critical / High / Medium / Low / Nit. Reviewers do not rank across lenses — that is synthesis's job.
When the compliance reviewer cites a finding, it MUST mask any PHI, secrets, tokens, or identifiable patient data in its output — reference the location and the class of data, never the value. A finding reads auth/session.ts:42 — PHI (patient DOB) logged in plaintext, never the DOB itself. This mirrors the scoda secrets-broker fail-closed posture: a review artifact is a shared document and must never become a new leak surface.
One synthesis agent (general-purpose) consolidates the raw council output:
simplification "Critical" is not a security "Critical"; re-rank against a shared rubric (see references/severity-rubric.md).Output: a single ranked findings table written to CODE_REVIEW.md.
Reviewers disagree. The architect may want a refactor the simplifier calls over-engineering; security may demand a check correctness considers unreachable. Resolve before issuing a verdict.
Protocol:
This is the genuinely novel layer neither code-review nor swarm-protocol had: the output is reconciled, not a pile of contradictory opinions. It also enforces your house rule — every issue ends with options + a recommendation + why.
Emit CODE_REVIEW.md and a terminal summary. Structure:
## Council Review: <target>
### TL;DR
<3 lines: overall quality, blocker count, the one thing that matters most>
### Verdict
Approve | Request Changes | Needs Discussion
### Findings (ranked)
| # | Severity | File:Line | Lens(es) | Issue | Recommendation |
|---|----------|-----------|----------|-------|----------------|
### Conflicts Resolved
| Conflict | Position A | Position B | Resolution | Why |
### Dissent (unresolved — human call)
- <finding> — <competing views>
### What Looks Good
- <positive observations — real ones, not filler>
### Handoff
- Repairs for swarm-protocol: <count by severity>
- Migrations / schema changes flagged for swarm Supabase workflow: <list or none>
The verdict is the terminal artifact. Council does not fix anything. If repairs are wanted, hand CODE_REVIEW.md to swarm-protocol --review-only's repair conductor (see Handoff below).
| Flag | Purpose |
| ------------------- | ----------------------------------------------------------------------- |
| --paste | Review a pasted diff/file instead of resolving a git/PR target |
| --base=<ref> | Set the merge-base for branch diffs (default: main) |
| --lenses=<list> | Run only named lenses, e.g. --lenses=security,correctness |
| --no-compliance | Force-skip the compliance reviewer even if PHI signals are detected |
| --compliance | Force-enable the compliance reviewer regardless of detected signals |
| --quick | Skip debate pass; emit synthesized findings without conflict resolution |
| --max-agents=N | Cap concurrent reviewers (default: all active lenses) |
| --json | Emit findings as JSON alongside CODE_REVIEW.md (for ScopeTUI / CI) |
Council is the review half of a two-skill contract:
council-review owns review → produces CODE_REVIEW.md (read-only, no mutation).swarm-protocol owns repair + verify + Supabase deployment → consumes CODE_REVIEW.md.swarm-protocol's review-repair phase should invoke this skill for the review step, then run its existing repair conductor over the verdict. The two skills share the CODE_REVIEW.md schema as their contract surface — see references/code-review-schema.md.
One-line change in swarm-protocol (SKILL.md, "Phase Review & Repair"): replace the inline 5-agent dispatch table with → invoke council-review skill, then run Repair over its CODE_REVIEW.md. Council adds the architect + compliance lenses swarm lacked, so swarm inherits them for free.
feature-dev:code-reviewer agent; the council is a merge gate, not a linter./swarm-protocol --review-only for review-then-repair in one pass.Resolve scope precisely → activate compliance for any PHI surface → launch the whole council in one message → never let council agents write code → synthesize before verdict → resolve conflicts explicitly with rationale → mask PHI/secrets in every finding → hand repairs to swarm, don't fix in place → keep the TL;DR to three lines.
| File | Load When |
| ------------------------------------- | ------------------------------------------ |
| references/reviewer-prompts.md | Always (per-lens dispatch prompts) |
| references/severity-rubric.md | Synthesis step (cross-lens severity scale) |
| references/code-review-schema.md | Always (CODE_REVIEW.md contract w/ swarm) |
| references/compliance-masking.md | PHI / HIPAA / EU signals present |
development
Multi-agent development orchestration for complex projects. Use this skill when orchestrating parallel development workstreams, coordinating multiple agent tasks, managing project documentation structure, or executing `/swarm-protocol` commands. Triggers on: (1) `/swarm-protocol <project-name>` to initialize new projects with full planning, (2) `/swarm-protocol` (no args) to continue existing or start new project, (3) requests involving parallel agent coordination, milestone commits, or multi-phase development workflows.
tools
Development best practices and project patterns. Use when starting projects, setting up CLAUDE.md, coding TypeScript/Next.js/React/Supabase, implementing AI flows, data fetching, testing, deployment, git workflows, browser automation, centralized configuration, or Tailwind CSS v4.
tools
Manage which Vercel plugin skills are enabled or disabled. Use when the user wants to disable noisy Vercel skills, enable previously disabled skills, or see which skills are active. Invoked via /manage-vercel-skills.
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.