phpunit-unit-test-team-reviewing
Use this skill when the user asks for a team-based, consensus, multi-reviewer, or red-team review of Shopware PHPUnit tests — trigger phrases like "team review these tests", "consensus review the tests in PR
What this skill does
# Team-Based PHPUnit Unit Test Review
Wave-based orchestration: spawn agents per wave, collect outputs, assemble inputs for the next wave. You (the skill executor) act as team lead.
## Phase 0: Prerequisites Check
Run via Bash:
```bash
printenv CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS
```
If the output is NOT exactly `1`, output the following and **stop immediately**:
```
Agent Teams is not enabled. Team-based review requires the experimental Agent Teams feature.
To enable it, add the following to the "env" section of ~/.claude/settings.json:
"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
Then restart Claude Code and try again.
```
Then ask via `AskUserQuestion`: "Would you like to use the standard single-reviewer instead?"
**Do not proceed to Phase 1.**
## Phase 1: Input Resolution
`Read` references/input-resolution.md first — then follow its resolution strategies to build the file manifest. Do not run any git or file discovery commands before reading it.
Output: `[{path}]` — each entry is a validated test file. Let N = number of files in the manifest.
## Phase 2: Team Setup
1. Calculate reviewer count R:
```
if N == 1: R = 3
else: R = min(5, max(4, ceil(N * 3 / 5)))
```
2. Calculate adversary count A per references/reviewer-allocation.md
3. Compute file assignments for reviewers (round-robin per references/reviewer-allocation.md) and adversaries (partitioning per references/reviewer-allocation.md)
4. Call `TeamCreate(team_name: "test-review", description: "PHPUnit test review — {R} reviewers + {A} adversaries")`
No agents spawned yet. Agents are spawned per wave.
## Phase 3: Wave 0 — Independent Analysis
Spawn R reviewer agents + A adversary agents in a **single message** (parallel).
Agent names include the wave number as suffix (`reviewer-{n}-{wave}`) to avoid collisions within the team. Use the same `reviewer-{n}` identity in output contracts and co-reviewer references across waves.
For each reviewer:
```
Agent(
agent: "test-writing:test-reviewer",
team_name: "test-review",
name: "reviewer-{n}-0",
prompt: "Invoke Skill(test-writing:phpunit-unit-test-reviewing) for each of your assigned files.
Assigned files:
{for each file: - {path} (Category {category}, methods: [{methods}] | full class)}
When a file specifies methods, pass them to the reviewing skill as the methods scope.
When a file says 'full class', invoke the reviewing skill without a methods scope.
After ALL reviews complete, return your combined findings for all files
using this format:
type: findings
reviewer: reviewer-{n}
files:
- path: {path}
category: {category}
scope: {methods list or 'full class'}
findings: [{rule_id, enforce, location, summary, current, suggested}]"
)
```
For each adversary:
```
Agent(
agent: "test-writing:test-adversary",
team_name: "test-review",
name: "adversary-{n}-0",
prompt: "Read your assigned test files and their source classes (from #[CoversClass]).
Form intuitive impressions — what concerns you about these tests?
Assigned files:
{for each file: - {path} (Category {category}, methods: [{methods}] | full class)}
When a file specifies methods, focus your impressions on those methods only.
Ignore concerns outside the scoped methods.
Use these heuristic lenses (do NOT use MCP rule tools):
- Absence detection: what's NOT tested that you'd expect?
- Consequence weighting: which gaps would cause the most production damage?
- Dependency fan-out: which shared assumptions could mask bugs?
- Pattern anomalies: inconsistencies in style, mocking, assertions?
- The 'surprised?' test: if the test passed but behavior was broken, would you be surprised?
Return your impressions per file:
impressions:
- file_path: {path}
scope: {methods list or 'full class'}
concerns:
- area: 'description'
severity: high | medium | low"
)
```
Wait for all agents to complete. Collect findings and impressions.
## Phase 4: Wave 1 — Debate
For each reviewer, assemble:
- Own findings (from that reviewer's Wave 0 output)
- Peer findings (from co-reviewers' Wave 0 outputs for shared files)
- Co-reviewer names and shared files
Spawn R reviewer agents in a **single message** (parallel):
```
Agent(
agent: "test-writing:test-reviewer",
team_name: "test-review",
name: "reviewer-{n}-1",
prompt: "Invoke Skill(test-writing:phpunit-unit-test-debating) with this input.
Own findings:
[reviewer's Wave 0 findings]
Peer findings:
[per co-reviewer, their findings on shared files]
Co-reviewers (use these names for SendMessage):
[list of {name: reviewer-{m}-1, shared_files}]
Scope per file:
[per file: {path} → methods: [{methods}] | full class]
Only debate findings within the scoped methods for each file.
Discard any peer findings outside this scope.
Debate with your co-reviewers via SendMessage, then return your final stance."
)
```
Wait for all agents to complete. Collect final stances.
## Phase 5: Red Team Skip Evaluation
Evaluate skip conditions per references/red-team-context.md using Wave 1 final stances:
1. **Zero findings** — all reviewers reported 0 findings across all files. Skip to Phase 8.
2. **Substantive debate** — team lead judges from Wave 1 debate that challenges outnumbered concessions. Skip conditions apply per references/red-team-context.md.
If skipped, proceed directly to Phase 8. Use Wave 1 final stances as binding input.
## Phase 6: Wave 2 — Red Team
1. For each file, merge Wave 1 final stances into a preliminary consensus (same logic as Phase 8 merge, but intermediate)
2. Assemble context package for each adversary per references/red-team-context.md — consensus findings, withdrawn findings with reasons, and debate evidence per file
3. Spawn A adversary agents:
```
Agent(
agent: "test-writing:test-adversary",
team_name: "test-review",
name: "adversary-{n}-2",
prompt: "Invoke Skill(test-writing:phpunit-unit-test-adversarial-reviewing) with this input.
Consensus package:
[per-file context package as YAML]
Impressions from Wave 0:
[this adversary's Wave 0 impressions]
Scope per file:
[per file: {path} → methods: [{methods}] | full class]
Limit your challenges to findings within the scoped methods for each file.
Return your challenges."
)
```
Wait. Collect challenges.
## Phase 7: Wave 3 — Defense
For each reviewer with files that received adversary challenges, assemble:
- Own final stance (from Wave 1)
- Adversary challenges for their files (from Wave 2)
Spawn R reviewer agents:
```
Agent(
agent: "test-writing:test-reviewer",
team_name: "test-review",
name: "reviewer-{n}-3",
prompt: "Invoke Skill(test-writing:phpunit-unit-test-defending) with this input.
Own final stance:
[reviewer's Wave 1 final stance]
Adversary challenges:
[adversary challenges for this reviewer's files]
Scope per file:
[per file: {path} → methods: [{methods}] | full class]
Only defend findings within the scoped methods for each file.
Dismiss adversary challenges targeting out-of-scope code.
Return your defense stance."
)
```
Wait. Collect defense stances.
## Phase 8: Verdicts & Report
If the red team round ran (Phases 6-7), use Wave 3 defense stances as input. If skipped, use Wave 1 final stances.
### Per-File Consensus Merge
For each file, extract the 3 binding stances from its assigned reviewers. For each unique `(rule_id,Related in Code Review
gstack
IncludedFast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)
startup-due-diligence
IncludedLegal due diligence review for seed-stage and Series A startups (US, Delaware C-Corp focus). Supports both investor and founder perspectives. Capabilities include: (1) Interactive document review and issue spotting; (2) Document request list generation; (3) Cap table and SAFE/convertible note analysis; (4) Red flag identification with severity ratings; (5) Diligence report generation. TRIGGERS: due diligence, DD, startup investment, cap table review, Series A, seed round, investor diligence, legal review startup, SAFE analysis, convertible note, 409A, founder vesting.
interview-master
IncludedThis skill should be used when the user asks to "generate interview questions", "prepare for interview", "optimize resume", "conduct mock interview", "analyze git commits for resume", "generate resume from code", "review my resume", or mentions interview preparation, career assistance, or extracting project experience from git history. Provides comprehensive interview and career development guidance for both job seekers and interviewers.
fix-issue
IncludedFixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to avoid recurrence. Use when debugging errors, resolving regressions, fixing bugs, or triaging issues.
sf-apex
IncludedGenerates and reviews Salesforce Apex code with 150-point scoring. TRIGGER when: user writes, reviews, or fixes Apex classes, triggers, test classes, batch/queueable/schedulable jobs, or touches .cls/.trigger files. DO NOT TRIGGER when: LWC JavaScript (use sf-lwc), Flow XML (use sf-flow), SOQL-only queries (use sf-soql), or non-Salesforce code.
swift-development
IncludedComprehensive Swift development for building, testing, and deploying iOS/macOS applications. Use when Claude needs to: (1) Build Swift packages or Xcode projects from command line, (2) Run tests with XCTest or Swift Testing framework, (3) Manage iOS simulators with simctl, (4) Handle code signing, provisioning profiles, and app distribution, (5) Format or lint Swift code with SwiftFormat/SwiftLint, (6) Work with Swift Package Manager (SPM), (7) Implement Swift 6 concurrency patterns (async/await, actors, Sendable), (8) Create SwiftUI views with MVVM architecture, (9) Set up Core Data or SwiftData persistence, or any other Swift/iOS/macOS development tasks.