agent-team-execution
Use when executing implementation plans with 3+ independent, file-disjoint tasks that benefit from parallel specialist agents with shared contracts and reviewer-gated completion
Best use case
agent-team-execution is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Use when executing implementation plans with 3+ independent, file-disjoint tasks that benefit from parallel specialist agents with shared contracts and reviewer-gated completion
Teams using agent-team-execution should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/agent-team-execution/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How agent-team-execution Compares
| Feature / Agent | agent-team-execution | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Use when executing implementation plans with 3+ independent, file-disjoint tasks that benefit from parallel specialist agents with shared contracts and reviewer-gated completion
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
SKILL.md Source
# Agent Team Execution
Execute implementation plans using collaborative agent teams. Lead routes coordination through SendMessage, specialists work in parallel on file-disjoint groups, a reviewer gates every task.
**Prerequisite:** A plan at `docs/plans/*.md` with discrete tasks (see writing-plans skill).
## Mode Selection
```dot
digraph mode_selection {
"Read plan" -> "Count file-disjoint groups";
"Count file-disjoint groups" -> "< 3 groups?" [label="analyze"];
"< 3 groups?" -> "subagent-driven-development" [label="yes"];
"< 3 groups?" -> "Heavy file overlap?" [label="no"];
"Heavy file overlap?" -> "subagent-driven-development\n(dependency ordering)" [label="yes"];
"Heavy file overlap?" -> "agent-team-execution" [label="no"];
}
```
## Roles
| Role | Count | Owns | Prompt |
|------|-------|------|--------|
| Lead | 1 | `shared-contracts.md`, TaskList | `./lead-prompt.md` |
| Specialist | 1-N | Assigned files only | `./specialist-prompt.md` |
| Reviewer | 1 | Nothing (read-only) | `./reviewer-prompt.md` |
## Shared Contracts
A single markdown file at workspace root. Specialists read it; only Lead writes it.
**Contains:** Data models/types, API signatures, environment config.
**Template:** `./shared-contracts-template.md`
## Communication
All coordination via SendMessage. No file-based polling or locking. No structured JSON.
- **Contract change:** Specialist requests -> Lead updates file -> Lead notifies affected specialists
- **Completion:** Specialist submits to Reviewer -> Reviewer approves/rejects -> Lead marks done
- **Cross-boundary:** Specialist A requests -> Lead routes to Specialist B -> B confirms -> Lead notifies A
- **Heartbeat:** Specialist signals activity before heavy operations. Lead does not reply.
- **Stall:** Lead pings silent specialist. No response -> reassign.
## Workflow
### Phase 1: Setup (Lead)
1. Read plan, extract tasks with file lists
2. Group tasks into file-disjoint sets
3. Apply mode selection (< 3 groups -> fall back to subagent-driven-development)
4. Create `shared-contracts.md` from `./shared-contracts-template.md`
5. `TeamCreate("{feature-name}-impl")`
6. Spawn specialists with synthesized Mini-Specs (see lead-prompt.md)
7. Spawn one reviewer
8. Create TaskList entries, assign to owning specialists
### Phase 2: Execution
Specialists work in parallel per their prompts. Reviewer processes review requests as they arrive. Lead routes messages and maintains shared state.
### Phase 3: Completion
1. All tasks approved by Reviewer
2. Run full test suite (verification-before-completion)
3. Integration review
4. `shutdown_request` to all agents
5. `TeamDelete`
6. Invoke finishing-a-development-branch
## Deadlock Prevention
| Condition | Detection | Resolution |
|-----------|-----------|------------|
| Specialist stall | No messages or heartbeats | Lead pings: "Status check?" |
| Repeated rejection | Same task rejected 3 times | Lead intervenes directly |
| Cross-boundary blocked | Specialist waiting on another | Lead routes and follows up |
| Crashed specialist | No response to Lead ping | Lead reassigns task |
## Red Flags
- **File-based locking** -- assignment is the only ownership mechanism
- **Polling files for status** -- all status flows through SendMessage
- **Specialists self-marking tasks complete** -- only Lead marks complete after Reviewer approval
- **Skipping the Reviewer** -- every task must be reviewed
- **Lead editing specialist-owned files** -- Lead routes requests only
- **Structured JSON messages** -- plain text via SendMessage only
## Example: Contract Evolution and Cross-Boundary Routing
A plan has 3 file-disjoint groups: model-specialist (Group A), service-specialist (Group B), routes-specialist (Group C).
```
[Parallel start]
model-specialist -> Lead:
"Requesting contract update: Task type needs dueDate: Date | null."
Lead: [validates against plan, edits shared-contracts.md]
Lead -> service-specialist: "Contract updated: Task.dueDate added. Re-read contracts."
Lead -> routes-specialist: "Contract updated: Task.dueDate added. Re-read contracts."
routes-specialist -> Lead:
"Need TaskService.listByPriority() but it doesn't exist in contracts.
service-specialist owns src/services/task.ts."
Lead: [adds listByPriority signature to shared-contracts.md]
Lead -> service-specialist:
"Contract updated: TaskService.listByPriority added.
routes-specialist needs this method. Implement and confirm."
service-specialist -> Lead: "Done. listByPriority implemented and tested."
Lead -> routes-specialist: "Change made. Proceed."
```
## Integration
| Skill | Relationship |
|-------|-------------|
| writing-plans | Creates the plan this skill executes |
| subagent-driven-development | Sequential fallback for < 3 tasks or coupled tasks |
| test-driven-development | Specialists follow TDD discipline |
| finishing-a-development-branch | Invoked by Lead after completion |
| verification-before-completion | Lead runs full test suite before finalizing |Related Skills
agent-team-review
Use when a code change touches 5+ files or modifies auth/secrets/permissions/hooks/CI paths and needs multi-lens parallel review (security, quality, spec, governance) before merge.
unified-context-stack
Tiered context retrieval across External Truth (docs), Internal Truth (dependencies), Historical Truth (memory), and Intent Truth (feature specs) with graceful degradation based on installed tools.
supply-chain-investigation
Use when investigating a published supply-chain attack on a registry package (npm, Maven, PyPI, Go, Gradle) — advisory-driven org-wide audit. Triggers on attack-language ("compromised", "malicious", "hijacked", "backdoored", "typosquatted"). NOT for routine CVE scanning — that routes to security-scanner.
skill-scaffold
Emit repo-native seed files (SKILL.md skeleton, routing entry, test snippets) when creating new skills, commands, or plugins
security-scanner
Use when reviewing code changes for security issues — during REVIEW phase or on explicit security, vulnerability, SAST, or secret-scan requests — running available Semgrep/Opengrep, Trivy, and Gitleaks scanners with a self-healing fix loop
runtime-validation
Use when you need to prove a change actually works through its real interfaces — during REVIEW or on requests like validate the feature, does it work, run e2e, or smoke test — covering browser E2E, API smoke, CLI checks, and a11y audits with graceful tool-degradation
prototype-lab
Produce 3 thin comparable variants of a proposed design with a comparison artifact and mandatory Human Validation Plan
project-verification
Use when you need to run the repo's own declared test/lint/type gate locally and emit pass/fail evidence — during REVIEW, before requesting code review, or on a request to run the tests or verify the build — discovering the gate from CLAUDE.md, Makefile, pyproject, or .verify.yml
product-discovery
Use when starting a new feature or initiative and you need problem context, prior art, and acceptance criteria before design — the DISCOVER phase entry point — pulling Jira/Confluence context and synthesizing a discovery brief to validate problem framing
outcome-review
Use when reviewing a shipped feature's real-world outcome in the LEARN phase — checking adoption, error, or experiment metrics after release, validating ship-time hypotheses, or deciding follow-up work — querying PostHog and creating gated follow-up Jira work
openspec-ship
Use when shipping a completed feature and generating as-built OpenSpec docs before branch finalization
incident-trend-analyzer
On-demand postmortem trend analysis — recurrence grouping, trigger categorization, MTTR/MTTD from canonical docs/postmortems/ corpus