From flowstate
Use when performing multi-agent code review after implementing features, before merging, or when reviewing PRs. Runs 5 core review agents in parallel plus a learnings researcher. Produces prioritized findings (P1/P2/P3) with todo files for tracking and resolution. Triggers: "review", "code review", "check before merge", "review PR", "run reviewers", "catch issues".
npx claudepluginhub c-reichert/flowstate --plugin flowstateThis skill uses the workspace's default tool permissions.
Run 5 specialized review agents in parallel plus the learnings researcher to catch issues before they ship. Each agent brings a different lens — security, performance, simplicity, architecture, and patterns. Findings are synthesized, deduplicated, prioritized, and tracked as todo files.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Guides TDD-style skill creation: pressure scenarios as tests, baseline agent failures, write docs to enforce compliance, verify with RED-GREEN-REFACTOR.
Run 5 specialized review agents in parallel plus the learnings researcher to catch issues before they ship. Each agent brings a different lens — security, performance, simplicity, architecture, and patterns. Findings are synthesized, deduplicated, prioritized, and tracked as todo files.
Determine what to review from the provided argument (PR number, branch name, or file paths).
If no argument was provided, auto-detect:
# Check if we're on a feature branch with changes
current_branch=$(git branch --show-current)
default_branch=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@')
if [ -z "$default_branch" ]; then
default_branch=$(git rev-parse --verify origin/main >/dev/null 2>&1 && echo "main" || echo "master")
fi
# Get the diff
git diff $default_branch...$current_branch --stat
If there are changes, ask: "Review changes on [branch] against [default_branch]?"
If no changes found, ask: "What should I review? Provide a PR number, branch, or file paths."
Launch all 6 agents simultaneously. Each reviewer receives:
Spawn in parallel:
├── Task security-reviewer(diff, file_context, conventions)
│ Model: Opus
│ Focus: OWASP top 10, injection attacks, authentication flaws,
│ authorization bypasses, secrets in code, sensitive data exposure,
│ CSRF/XSS/SSRF vectors, insecure deserialization, cryptographic
│ weaknesses, SQL injection, command injection
│ Output: Executive Summary, Detailed Findings (file:line), Risk Matrix,
│ Remediation guidance with code examples
│
├── Task performance-reviewer(diff, file_context, conventions)
│ Model: Opus
│ Focus: Algorithmic complexity (Big O), N+1 queries, missing indexes,
│ caching opportunities, memory usage patterns, unnecessary
│ allocations, network call optimization, lazy loading opportunities,
│ database query analysis, connection pooling
│ Output: Performance Summary, Critical Issues, Optimization Opportunities
│ with expected impact estimates
│
├── Task simplicity-reviewer(diff, file_context, conventions)
│ Model: Sonnet
│ Focus: YAGNI violations, unnecessary abstractions, over-engineering,
│ readability issues, unnecessary complexity, dead code, commented-out
│ code, premature optimization, abstract classes with one subclass,
│ factory patterns for one type, interfaces implemented once
│ CRITICAL: Never flag docs/plans/ or docs/solutions/ for removal
│ Output: Unnecessary Complexity Found, Code to Remove, YAGNI Violations,
│ Simplification suggestions with before/after examples
│
├── Task architecture-reviewer(diff, file_context, conventions)
│ Model: Opus
│ Focus: Component boundaries, dependency direction (no upward deps),
│ circular dependencies, abstraction levels, API contract stability,
│ separation of concerns, layer violations, coupling analysis,
│ cohesion assessment, design pattern consistency
│ Output: Architecture Overview, Change Assessment, Compliance Check,
│ Risk Analysis, dependency graph concerns
│
├── Task pattern-reviewer(diff, file_context, conventions)
│ Model: Sonnet
│ Focus: Anti-patterns (God objects, circular deps, primitive obsession),
│ naming convention consistency, code duplication (3+ occurrences),
│ design pattern misuse, inconsistent error handling, mixed
│ abstraction levels within functions, convention violations
│ Output: Pattern Usage Report, Anti-Pattern Locations, Naming Analysis,
│ Duplication Metrics
│
└── Task learnings-researcher(diff_summary, file_context)
Model: Haiku
Focus: Search docs/solutions/ for relevant past solutions that apply
to this code change. Surface known patterns, past mistakes,
and documented best practices.
Always check: docs/solutions/patterns/critical-patterns.md
Output: Relevant learnings with file paths and key insights,
flagged as "Known Pattern" when applicable
Collect all agent outputs. For each finding:
| Priority | Criteria | Action |
|---|---|---|
| P1 CRITICAL | Blocks merge. Security vulnerability, data loss risk, correctness bug, breaking change. | Must fix before merge |
| P2 IMPORTANT | Should fix. Performance issue, maintainability concern, missing error handling, incomplete edge case. | Should fix — triage with user |
| P3 NICE-TO-HAVE | Could improve. Style suggestion, minor optimization, readability tweak, documentation gap. | Optional — address if time permits |
**Known Pattern:** See docs/solutions/[path] — [one-line summary]
For each finding, estimate fix effort:
For each finding, create a tracking file:
mkdir -p todos/
Filename format: {id}-pending-{priority}-{description}.md
Examples:
001-pending-p1-sql-injection-user-input.md002-pending-p2-missing-index-orders-table.md003-pending-p3-rename-helper-method.mdTodo file structure:
---
status: pending
priority: p1|p2|p3
issue_id: NNN
tags: [code-review, security|performance|simplicity|architecture|patterns]
reviewer: [which agent(s) flagged this]
effort: small|medium|large
---
## Problem Statement
[Clear description of the issue]
## Findings
[Detailed evidence with file:line references]
### Evidence
- `file.py:42` — [specific issue observed]
- `file.py:78` — [related issue]
### Impact
[What happens if this isn't fixed]
## Proposed Solutions
### Option A: [Preferred approach]
- Pros: [advantages]
- Cons: [disadvantages]
- Effort: [estimate]
### Option B: [Alternative approach]
- Pros: [advantages]
- Cons: [disadvantages]
- Effort: [estimate]
## Acceptance Criteria
- [ ] [Specific verifiable criterion]
- [ ] [Test that proves the fix works]
## Known Patterns
[If learnings-researcher found related docs/solutions/ entries, reference them here]
## Code Review Complete
**Branch:** [branch name]
**Reviewers:** 5 core agents + learnings researcher
**Files reviewed:** [count]
### Findings Summary
| Priority | Count | Description |
|----------|-------|-------------|
| P1 CRITICAL | [count] | [brief list] |
| P2 IMPORTANT | [count] | [brief list] |
| P3 NICE-TO-HAVE | [count] | [brief list] |
| **Total** | **[total]** | |
### Created Todo Files
**P1 (must fix):**
- `todos/001-pending-p1-[description].md`
**P2 (should fix):**
- `todos/002-pending-p2-[description].md`
**P3 (nice to have):**
- `todos/003-pending-p3-[description].md`
### Known Patterns from Past Work
- [Learning title] (docs/solutions/[path]) — [applies to finding #N]
### Next Steps
1. **Address P1 findings** (MUST fix before merge)
2. **Triage P2/P3 findings** with reviewer
3. **Run `/workflow:compound`** to capture any new learnings
P1 findings block merge. Fix them now:
status: pending to status: resolvedpending to resolvedPresent P2 and P3 findings. For each, the user decides:
status: wont-fix with reasonAfter fixing P1s (and any P2/P3 the user chose to fix):
When applying findings from the review agents, use the receiving-code-review skill for the full protocol:
When structuring what reviewers need, see the requesting-code-review skill for:
receiving-code-review skill)receiving-code-review skill)