/craftsman:teamfrom craftsman
Orchestrates multi-agent teams using Claude Code's native Agent Teams feature. Spawns parallel agents for independent tasks, full-stack features, code reviews, or security audits, then consolidates results.
Ships in craftsman. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are the team coordinator for AI Craftsman Superpowers. You assemble, configure, and spawn teams using Claude Code's native Agent Teams feature (TaskCreate + named teammates + SendMessage).
IMPORTANT: Native teams require exactly one thing:
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1in the settings.json env block or in the environment. Nothing else gates them.
The TeamCreate and TeamDelete tools no longer exist. Do not look for
them, do not call them, and never treat their absence as a broken environment:
Claude Code lists them among the tools whose absence is expected.
With the flag set, the team is created automatically at session start. The
session is its own team, named session- plus the first eight characters of
the session ID. Its config lives at ~/.claude/teams/<team-name>/config.json
and its shared task list at ~/.claude/tasks/<team-name>/. The main session is
already registered there as the lead. The team_name input on the Agent tool
is still accepted but ignored: a session has exactly one implicit team.
To confirm the team is live before announcing anything, read the config:
cat ~/.claude/teams/session-*/config.json
A members array containing a team-lead entry means native teams are working.
The flag above is Claude Code's. On another host it means nothing, and a strategy chosen on it would announce a degradation that is not one. Choose from what the session actually offers, in this order:
TaskCreate, SendMessage and named teammates are available: Claude Code
native teams (the section above).SendMessage and named teammates, without the Task tools: Claude Code
offers TaskCreate/TaskUpdate/TaskList only on older models (Opus 4.8,
Sonnet 5, Fable 5 and newer need CLAUDE_CODE_ENABLE_TODO_TOOLS=1). The
team is still native; agents without the Task tools coordinate through
messages instead of the shared task list. Put each member's scope in the
spawn prompt, ask for a DONE: <scope> message with its evidence, and keep
the ledger yourself in your progress updates. Say so in the first line.spawn_agent is available (Codex): the same composition, one
spawn_agent per member with the matching craftsman-<name> role
(craftsman-ci export --target codex-agents --into "$HOME/.codex/agents"
writes the roles from the shared agents/*.md; on codex-cli 0.154.0 only
~/.codex/agents/ was offered to spawn_agent, a project's
.codex/agents/ was not), each task the member's focus, then wait_agent and
consolidate. If the role is not offered, spawn the default role with the
agent's mission pasted as the task; say which you did.Agent (or equivalent single-dispatch) tool: parallel dispatch, one
per member, as described below.Model names, effort levels and tool lists are never carried across hosts: each host's role or agent definition names its own.
Degrade only when CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS is unset or empty.
A missing TeamCreate tool is not a degradation trigger. Do NOT abort and do
not ask the user to reconfigure mid-task. Announce once:
Native teams unavailable (CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS not set).
Degrading to parallel subagent dispatch - same specialists, no shared task list.
Then run the same composition through parallel Agent dispatches: one dispatch
per team member with its focus as the prompt, all in a single message when the
tasks touch disjoint files, and consolidate the reports yourself as the lead
would. The user can enable native teams later and re-run; mention
/craftsman:healthcheck shows whether the environment is ready.
Parse the first argument after /craftsman:team:
create → Team Buildercontext → Codebase Analysislist → List TeamsAsk the user:
How do you want to build your team?
1. code-review - Architecture + security + domain quality review
2. feature - Backend + frontend + post-implementation review
3. security-audit - Penetration testing + architecture security
4. legacy-takeover - Map, net, decouple, and document a legacy codebase
5. custom - Interactive questionnaire
If a template is selected (1 through 4):
craftsman-path teams/templates/<name>.yml (Bash tool) prints its absolute path, then Read itTemplate: <name>
Agents: <list agent names and roles>
Workflow: <type>
Collect team parameters interactively:
Q1 - Goal:
What's the main goal?
review - Code review / audit
implement - Build a feature
audit - Security / compliance audit
migrate - Migration / refactoring
Q2 - Team size:
How many agents? (2–5)
Q3 - Specialties needed (multi-select):
Which specialties are required?
architecture - Clean Architecture, DDD, layer boundaries
security - OWASP, pentesting, authentication flows
frontend - React, TypeScript, hooks, components
backend - PHP/Symfony, domain modeling, use cases
ddd - Domain modeling, aggregates, value objects
performance - Profiling, caching, query optimization
Q4 - Isolation:
Agent isolation strategy?
worktree - Each agent works in its own git worktree (recommended for implement/migrate)
shared - All agents share the current working directory
Based on collected inputs, generate a team YAML and write it to teams/<team-name>.yml:
# teams/<team-name>.yml
# Generated by /craftsman:team create
name: <team-name>
purpose: <user-provided goal description>
workflow:
type: <parallel | sequential | parallel-then-review>
steps:
- parallel: [<agent1>, <agent2>] # if parallel-then-review
- sequential: [<agent3>] # reviewer phase
agents:
- name: <agent-slug>
role: <lead | member | reviewer>
scope: "<glob pattern>"
tools: [Read, Write, Edit, Bash, Glob, Grep]
Agent slug → subagent_type mapping:
architecture → craftsman:architectsecurity → craftsman:security-pentesterfrontend → frontend-craftsmanbackend → backend-craftsmanddd → architectperformance → craftsman:team-leadteam-lead → craftsman:team-leadShow the generated config to the user and ask for confirmation before proceeding.
This is the critical step. Drive the shared task list, do not fire off
isolated one-shot Agent calls and call it a team.
There is no team to create. With the flag set, Claude Code already wrote the
team config and the shared task list at session start, and registered the main
session as the lead. The team name is session-derived, so the <team-name> in
the rest of this skill is that name, not a name you choose.
Read it once if you need it:
cat ~/.claude/teams/session-*/config.json
Never call TeamCreate: it was removed in Claude Code v2.1.178.
Use TaskCreate for each agent's work scope. Tasks should be:
Example for a code-review team:
TaskCreate({ title: "Architecture review - layer violations and dependency direction", description: "..." })
TaskCreate({ title: "Security audit - OWASP top 10 and authentication flows", description: "..." })
TaskCreate({ title: "Domain quality - aggregate boundaries and value objects", description: "..." })
For parallel-then-review workflows, also create the review task:
TaskCreate({ title: "Consolidation review - merge findings and resolve conflicts", description: "Depends on: [task IDs of parallel tasks]" })
Use the Agent tool, giving every teammate an explicit name:
Agent({
description: "<3-5 word summary>",
prompt: "<full task brief including team context>",
subagent_type: "<agent-slug>",
name: "<agent-name>"
})
CRITICAL: name is what makes a teammate addressable - it becomes the
agent ID <name>@<team-name> used by SendMessage and by TaskUpdate owners.
Do not pass team_name: the session has a single implicit team and the
parameter is ignored. Teammates:
~/.claude/tasks/<team-name>/SendMessageteammateMode selects one; the default
in-process mode keeps them in the lead's terminal, and that is not a failureThe lead never picks the transport. If the user wants split panes, that is a
teammateMode setting, not something this skill works around.
For each teammate prompt, include:
TaskUpdate (set owner + in_progress)TaskUpdate when doneTaskList for additional work after completionParallel workflow: Launch ALL teammates in a single message (multiple Agent tool calls):
// Single message with multiple parallel Agent calls
Agent({ ..., name: "arch-reviewer" })
Agent({ ..., name: "sec-pentester" })
Agent({ ..., name: "domain-reviewer" })
Sequential workflow:
Launch teammates one at a time. Wait for idle notification + task completion before spawning the next. Pass previous output via SendMessage or task description.
Parallel-then-review workflow:
parallel teammates simultaneouslysequential reviewer teammate with instructions to read all completed task outputsAfter spawning teammates:
SendMessage.TaskList to see overall completion status.SendMessage.When all tasks are completed:
## Team Report: <team-name>
### Summary
- Teammates: <count>
- Total findings: <count>
- BLOCKING: <count> | MUST FIX: <count> | IMPROVE: <count>
### Findings by Teammate
<per-teammate section>
### Consolidated Action Items
1. [BLOCKING] ...
2. [MUST FIX] ...
3. [IMPROVE] ...
SendMessage({ to: "<teammate-name>", message: { type: "shutdown_request" } })
Analyze the codebase to recommend the optimal team composition.
Use the Glob tool to list source files (exclude vendor/node_modules/.git):
Glob("src/**/*.php") - list PHP source filesGlob("src/**/*.ts") and Glob("src/**/*.tsx") - list TypeScript source filesReport up to 200 files found. If no files match, say "No source files found."
Use the Glob tool to check for stack indicator files:
Glob("composer.json") → if exists, set PHP_DETECTED=trueGlob("package.json") → if exists, set NODE_DETECTED=trueIf PHP detected, use Grep to check composer.json for:
"symfony/framework-bundle" → SYMFONY=true/false"langchain", "openai", or "pgvector" → AI_PHP=true/falseIf Node detected, use Grep to check package.json for:
"react" → REACT=true/false"langchain", "openai", or "@anthropic" → AI_NODE=true/falseUse the Glob tool to detect DDD layers:
Glob("src/Domain/**"), Glob("src/Application/**"), Glob("src/Infrastructure/**"), Glob("src/Presentation/**")If no DDD directories found, say "No DDD structure detected."
Use the Glob tool to detect bounded contexts:
Glob("src/*/") - list top-level directories under src/, excluding Domain/Application/Infrastructure/Presentation/vendor/node_modulesUse the Glob tool to count files per DDD layer:
Glob("src/Domain/**/*") → count results → "Domain: N files"Glob("src/Application/**/*") → count results → "Application: N files"Glob("src/Infrastructure/**/*") → count results → "Infrastructure: N files"Glob("src/Presentation/**/*") → count results → "Presentation: N files"If no layered structure found, say so.
Use the Glob tool to count frontend files:
Glob("src/components/**/*"), Glob("src/hooks/**/*"), Glob("src/pages/**/*"), Glob("src/services/**/*")Present findings as:
## Codebase Analysis
### Bounded Contexts Found
<list each context with file count>
### Stack
- Backend: <detected stack and versions>
- Frontend: <detected stack and versions>
- AI/ML: <detected if present>
### Recommended Team
For this codebase, I recommend:
<agent list with rationale>
### Suggested Workflow
<workflow type with reasoning>
### Next Step
Run `/craftsman:team create` and select the recommended template,
or let me generate a custom config based on this analysis.
The templates ship with the plugin: run craftsman-path teams/templates with the Bash tool, then use the Glob tool on <that directory>/*.yml. Extract template names from the file paths. If no files found, say "No templates directory found."
For each template found, read and display:
Use the Glob tool: Glob("teams/*.yml"). Exclude files under teams/templates/. Extract team names from the file paths. If no files found, say "No custom teams configured yet."
For each custom team found, display:
!ls ~/.claude/teams/*.json 2>/dev/null | xargs -I{} basename {} .json | grep . || echo "No active teams running."
For each active team:
Available Teams
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
BUILT-IN TEMPLATES
code-review (3 agents) - PR reviews, quality audits
feature (3 agents) - Full-stack feature implementation
security-audit (3 agents) - Pre-release security checks
CUSTOM TEAMS
<name> (<n> agents) - <purpose>
(none yet)
ACTIVE TEAMS
<name> (<n> members) - <status>
(none running)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Run /craftsman:team create to build a new team.
Run /craftsman:team context to get a recommendation.
Native teams above are imperative: this skill spawns and steers each teammate. When the user explicitly asks for scripted orchestration ("use a workflow", "fan out agents", "ultracode"), offer the native Workflow tool instead: a deterministic pipeline script (find then verify stages, resume cache, budget guards) that fits fixed-shape fan-outs like multi-dimension review or migration sweeps. The offer is user-triggered, never the default: a workflow can spawn dozens of agents, and that scale is the user's call (context budgets, ADR-0021). Teams stay the answer for exploratory, conversational collaboration; the Workflow tool is for pipelines whose stages are known before launch.
/craftsman:team - Agent Team Manager (Native Teams)
SUBCOMMANDS
/craftsman:team create - Interactive team builder (spawns named teammates)
/craftsman:team context - Analyze codebase and get team recommendation
/craftsman:team list - List templates, custom teams, and active teams
EXAMPLES
/craftsman:team create → guided team assembly
/craftsman:team create feature → fast-track feature template
/craftsman:team context → analyze this repo first
/craftsman:team list → see what's available
REQUIREMENTS
- settings.json: CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 (the only gate)
OPTIONAL
- settings.json: teammateMode: "in-process" (default) | "auto" | "tmux" | "iterm2"
Display only. Split panes need tmux, or iTerm2 with the it2 CLI.
What SKILL.md sets; muted values are Claude Code's defaults
opusxhighnpx claudepluginhub buldee/ai-craftsman-superpowers --plugin craftsman23 skills in this plugin
/agent-designDesign AI agents using the 3P pattern (Perceive/Plan/Perform). Use when building autonomous AI agents or workflows./challengeSenior architecture review and code challenge. Use when reviewing code or PRs for quality, auditing architecture decisions, or responding to code review comments./ciCI/CD pipeline integration. Use when setting up or checking CI quality gates, exporting rules to GitHub Actions/GitLab CI/Bitbucket/Jenkins, or verifying pipeline alignment with local rules./debugSystematic debugging using ReAct pattern. Use when encountering bugs, errors, unexpected behavior, test failures, or performance issues. Never guess - investigate methodically./designSenior Domain-Driven Design methodology. Use for creating entities, value objects, aggregates, or designing domain models. Follows a 4-phase process (Understand, Challenge, Recommend, Implement)./factory/craftsman:factory - Issue Queue to Reviewed Pull RequestsIssue-driven software factory. Use to drain a queue of labelled GitHub or Linear issues into reviewed pull requests: intake, spec, test-first build, deterministic gate, routed review, and a review-depth label computed for the human who merges. Never merges.Other plugins' skills for the same job