output_skills/ai/claude-code/launching-agent-teams/SKILL.md
Launches agent teams with structured roles and task decomposition. Use when asked to create a team, spawn teammates, or coordinate multiple agents in parallel.
npx skillsauth add lexler/skill-factory launching-agent-teamsInstall 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.
STARTER_CHARACTER = 🚀👥
Update reference docs to get the latest from Anthropic:
python ${CLAUDE_SKILL_DIR}/scripts/update-docs.py
Agent teams are experimental. The user must have this in their settings (~/.claude/settings.json or .claude/settings.json):
{
"env": {
"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
}
}
If the flag isn't set, tell the user and offer to add it before proceeding.
Before launching a team, confirm it's the right approach:
Use agent teams when:
Use subagents instead when:
Use git worktrees when:
If the task fits subagents better, say so and offer that instead.
Before spawning anything, understand:
Each teammate should own a distinct, non-overlapping area. Overlap causes file conflicts and wasted tokens.
Aim for 3-5 teammates. More than that creates coordination overhead that rarely pays off. Each teammate should have 5-6 tasks to stay productive.
Anti-patterns:
Teammates do NOT inherit the lead's conversation history. They only get:
Include in each spawn prompt:
in-process (default): all teammates in one terminal, cycle with Shift+Downtmux/auto: split panes, each teammate visible (requires tmux or iTerm2)For monitoring multiple teammates, split panes are better. Suggest tmux if available.
Present the proposed team structure to the user for approval before spawning. The structure should cover:
TeammateIdle (exit code 2 sends feedback, keeps teammate working) and TaskCompleted (exit code 2 prevents completion).From large-scale multi-agent projects:
Always clean up through the lead:
Clean up the team
Shut down teammates first, then clean up. If orphaned tmux sessions persist:
tmux ls
tmux kill-session -t <session-name>
development
Test-driven development (TDD) process used when writing code. Use whenever you are adding any new code, unless the user explicitly asks to skip TDD or the code is exploratory/spike.
development
Writes tests without mocks using Nullables. Use when writing tests, especially testing code with external I/O (HTTP, files, databases, clocks, random numbers), designing infrastructure wrappers or replacing mocking libraries.
testing
Scannable BDD tests written in domain language. Use when doing BDD.
development
Writes approval tests (snapshot/golden master testing) for Python, JavaScript/TypeScript, or Java. Use when verifying complex output, characterization testing legacy code, testing combinations, or working with .approved/.received files.