Skip to main content
command CX Codex

parallel-analyze — Claude Code command: audit code from four angles

parallel-analyze starts four subagents at once: architecture, security, performance, testing. Their findings land in one report, ranked by priority.

MIT ★ 1,424 updated 2026-10-06

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

What parallel-analyze does

The command takes a path and starts four background subagents, each with its own review brief. Results come back on their own, so there is no second step to collect them. Then everything is merged into a single document.

Each brief carries a checklist. The security agent looks at OWASP Top 10 classes, credentials baked into source, injection holes; the performance agent at algorithmic cost and N+1 queries; the test agent at coverage gaps and error paths nobody exercises. Findings get severity labels — Critical/High/Medium/Low for security, High/Medium for performance. A closing section orders the fixes and flags where one problem feeds another.

Dispatching all four task calls together is what buys you the speed. Fire them one at a time and the reports are the same, the wait is not. The target goes in as the argument: a file or a directory, src/api for instance.

What it helps with

  • Review a directory from four angles in one pass
  • Catch input validation gaps before a release
  • List algorithmic bottlenecks with impact levels
  • Spot error paths that no test touches
  • Get an ordered fix list before a refactor

Example prompts for the agent

  • /project-starter:parallel-analyze src/api
  • /project-starter:parallel-analyze src/payments
  • Analyze src/auth from all four angles and merge the reports into one priority list: /project-starter:parallel-analyze src/auth

How to install parallel-analyze

Manually: put the files in place

.claude/commands/parallel-analyze.md

Call it with /parallel-analyze. For all projects use ~/.claude/commands/

Questions about parallel-analyze

How do I install parallel-analyze in Claude Code?

Copy the command file to .claude/commands/parallel-analyze.md in your project. It is then available as a slash command.

What does parallel-analyze do?

It runs four subagents with separate briefs — architecture, security, performance, testing — and merges their output into one report with ranked actions and cross-cutting issues.

Does the analysis really run in parallel?

Only when all four task calls are issued in a single message. Sent one by one, the same reports arrive in sequence.

Source text

parallel-analyze.md · MIT
---
description: Multi-perspective analysis using parallel subagents. Analyzes code from architecture, security, performance, and testing viewpoints simultaneously.
argument-hint: <file or directory to analyze, e.g., "src/api">
---

# Parallel Multi-Perspective Analysis

Analyze `$ARGUMENTS` from multiple perspectives simultaneously using parallel subagents.

## Process

1. **Identify Target**: Parse the file or directory to analyze
2. **Spawn Perspective Agents**: Launch 4 parallel subagents (one per perspective)
3. **Collect Results**: Each subagent returns its analysis automatically on completion
4. **Synthesize**: Merge findings into unified recommendations

## Execution Pattern

**CRITICAL**: Launch ALL Task calls in a SINGLE message for true parallelism.

For the target, spawn 4 perspective-based subagents with `run_in_background: true`:

```
I'm launching 4 parallel analysis agents:

[Task 1]
description: "Architecture analysis"
prompt: "You are a software architect analyzing [target]. Evaluate:
- Component structure and boundaries
- Dependency patterns and coupling
- Design pattern usage
- Layering and separation of concerns
- Scalability considerations
- SOLID principle adherence

Provide findings with file:line references and improvement suggestions."
run_in_background: true

[Task 2]
description: "Security analysis"
prompt: "You are a security auditor analyzing [target]. Check for:
- OWASP Top 10 vulnerabilities
- Input validation gaps
- Authentication/authorization issues
- Hardcoded secrets or credentials
- Injection vulnerabilities (SQL, XSS, command)
- Insecure dependencies

Provide findings with severity levels (Critical/High/Medium/Low)."
run_in_background: true

[Task 3]
description: "Performance analysis"
prompt: "You are a performance engineer analyzing [target]. Look for:
- Algorithmic complexity issues (O(n²), O(n!))
- N+1 query patterns
- Memory leaks or inefficient allocations
- Blocking operations in async contexts
- Missing caching opportunities
- Unnecessary computations

Provide findings with estimated impact levels."
run_in_background: true

[Task 4]
description: "Testing analysis"
prompt: "You are a test architect analyzing [target]. Evaluate:
- Test coverage gaps
- Missing edge case tests
- Untested error paths
- Integration test opportunities
- Test code quality
- Mocking strategy effectiveness

Provide recommendations for improving test coverage."
run_in_background: true
```

Each subagent returns its result automatically when it completes — there is no
separate retrieval step. Read each analysis as it returns.

## Output Format

```markdown
## Multi-Perspective Analysis: [Target]

### Summary

- **Perspectives analyzed**: 4
- **Total findings**: X
- **Critical issues**: Y
- **Execution time**: ~Zs (parallel)

---

### Architecture Perspective

#### Strengths

- [Pattern/decision] - [Why it's good]

#### Concerns

- [Issue] at file:line - [Description]
- [Issue] at file:line - [Description]

#### Recommendations

- [Improvement] - [Rationale]

---

### Security Perspective

#### Critical

- [Vulnerability] at file:line - [Impact]

#### High

- [Issue] at file:line - [Description]

#### Medium/Low

- [Issue] at file:line - [Description]

---

### Performance Perspective

#### High Impact

- [Bottleneck] at file:line - [Complexity/Impact]

#### Medium Impact

- [Issue] at file:line - [Description]

#### Optimization Opportunities

- [Opportunity] at file:line - [Expected improvement]

---

### Testing Perspective

#### Coverage Gaps

- [Untested area] - [Priority]

#### Missing Test Cases

- [Function/path] - [Suggested tests]

#### Quality Improvements

- [Issue in tests] - [Recommendation]

---

### Cross-Perspective Synthesis

#### Priority Actions (Ordered)

1. **[Highest priority]** - [From perspective] - [Why]
2. **[Second priority]** - [From perspective] - [Why]
3. **[Third priority]** - [From perspective] - [Why]

#### Interconnected Issues

- [Issue A] affects [Issue B]: [Explanation]

#### Recommended Approach

1. [First action to take]
2. [Second action to take]
3. [Third action to take]
```

## Example Usage

```
/project-starter:parallel-analyze src/api
```

This spawns 4 parallel analysts (architecture, security, performance, testing), completing in ~1/4 the time of sequential analysis.

## When to Use

- Before major refactoring efforts
- During architecture reviews
- Pre-release quality gates
- Technical debt assessment
- Code audit preparation
- New developer onboarding (understand quality state)

## Perspective Details

| Perspective  | Focus Areas                   | Severity Levels             |
| ------------ | ----------------------------- | --------------------------- |
| Architecture | Structure, patterns, coupling | Concern, Suggestion         |
| Security     | Vulnerabilities, OWASP        | Critical, High, Medium, Low |
| Performance  | Complexity, bottlenecks       | High, Medium, Optimization  |
| Testing      | Coverage, quality             | Gap, Missing, Improvement   |

© CloudAI-X · MIT · CloudAI-X/claude-workflow-v2

Similar slash commands

All slash commands for Code review and refactoring →

From the same set46

The whole set →
refactor-guided refactor-guided guides structural refactoring in small steps and runs tests after each change. It keeps feature work separate from code restructuring. CX Codex +1 ★ 1,424repo stars convex-backend convex-backend is a Claude Code skill that loads Convex guidelines for TypeScript functions, schemas, validators, queries, mutations, actions, subscriptions, and file storage. It supports type-safe backend development. CX Codex +1 ★ 1,424repo stars dependency-upgrade The dependency-upgrade command for Claude Code updates packages one by one, runs tests after each upgrade, and rolls back changes on failures. CX Codex +1 ★ 1,424repo stars designing-apis designing-apis — a Claude Code skill that designs REST and GraphQL APIs: structures endpoints, defines request and response formats, configures error handling and versioning. CX Codex +1 ★ 1,424repo stars managing-git managing-git guides Claude Code through Git workflows, branch naming conventions, Conventional Commits formatting, and pull request review checklists. CX Codex +1 ★ 1,424repo stars code-reviewer code-reviewer — a Claude subagent that reads the changed files first, then reports findings by severity: correctness, security, performance, tests. CX Codex ★ 1,424repo stars designing-architecture designing-architecture — a skill that guides you through selecting an architecture pattern, evaluating project size and team capacity, and structuring your codebase. CX Codex +1 ★ 1,424repo stars optimizing-performance optimizing-performance guides performance profiling and tuning across frontend, backend, and database layers. It enforces measuring baselines before touching code and verifying against latency targets. CX Codex +1 ★ 1,424repo stars

Project sponsors

Companies that keep this analytics open