{"id":"team-composition-patterns","name":"team-composition-patterns","summary":"サイズ調整ヒューリスティック、あらかじめ設定された構成、エージェントタイプ選択を用いて最適なエージェントチーム構成を設計します。","body":"# Team Composition Patterns\n\nBest practices for composing multi-agent teams, selecting team sizes, choosing agent types, and configuring display modes for Claude Code's Agent Teams feature.\n\n## When to Use This Skill\n\n- Deciding how many teammates to spawn for a task\n- Choosing between preset team configurations\n- Selecting the right agent type (subagent_type) for each role\n- Configuring teammate display modes (tmux, iTerm2, in-process)\n- Building custom team compositions for non-standard workflows\n\n## Team Sizing Heuristics\n\n| Complexity   | Team Size | When to Use                                                 |\n| ------------ | --------- | ----------------------------------------------------------- |\n| Simple       | 1-2       | Single-dimension review, isolated bug, small feature        |\n| Moderate     | 2-3       | Multi-file changes, 2-3 concerns, medium features           |\n| Complex      | 3-4       | Cross-cutting concerns, large features, deep debugging      |\n| Very Complex | 4-5       | Full-stack features, comprehensive reviews, systemic issues |\n\n**Rule of thumb**: Start with the smallest team that covers all required dimensions. Adding teammates increases coordination overhead.\n\n## Preset Team Compositions\n\n### Review Team\n\n- **Size**: 3 reviewers\n- **Agents**: 3x `team-reviewer`\n- **Default dimensions**: security, performance, architecture\n- **Use when**: Code changes need multi-dimensional quality assessment\n\n### Debug Team\n\n- **Size**: 3 investigators\n- **Agents**: 3x `team-debugger`\n- **Default hypotheses**: 3 competing hypotheses\n- **Use when**: Bug has multiple plausible root causes\n\n### Feature Team\n\n- **Size**: 3 (1 lead + 2 implementers)\n- **Agents**: 1x `team-lead` + 2x `team-implementer`\n- **Use when**: Feature can be decomposed into parallel work streams\n\n### Fullstack Team\n\n- **Size**: 4 (1 lead + 3 implementers)\n- **Agents**: 1x `team-lead` + 1x frontend `team-implementer` + 1x backend `team-implementer` + 1x test `team-implementer`\n- **Use when**: Feature spans frontend, backend, and test layers\n\n### Research Team\n\n- **Size**: 3 researchers\n- **Agents**: 3x `general-purpose`\n- **Default areas**: Each assigned a different research question, module, or topic\n- **Capabilities**: Codebase search (Grep, Glob, Read), web search (WebSearch, WebFetch)\n- **Use when**: Need to understand a codebase, research libraries, compare approaches, or gather information from code and web sources in parallel\n\n### Security Team\n\n- **Size**: 4 reviewers\n- **Agents**: 4x `team-reviewer`\n- **Default dimensions**: OWASP/vulnerabilities, auth/access control, dependencies/supply chain, secrets/configuration\n- **Use when**: Comprehensive security audit covering multiple attack surfaces\n\n### Migration Team\n\n- **Size**: 4 (1 lead + 2 implementers + 1 reviewer)\n- **Agents**: 1x `team-lead` + 2x `team-implementer` + 1x `team-reviewer`\n- **Use when**: Large codebase migration (framework upgrade, language port, API version bump) requiring parallel work with correctness verification\n\n## Agent Type Selection\n\nWhen spawning teammates with the `Agent` tool, choose `subagent_type` based on what tools the teammate needs:\n\n| Agent Type                     | Tools Available                                      | Use For                                                    |\n| ------------------------------ | ---------------------------------------------------- | ---------------------------------------------------------- |\n| `general-purpose`              | All tools (Read, Write, Edit, Bash, etc.)            | Implementation, debugging, any task requiring file changes |\n| `Explore`                      | Read-only tools (Read, Grep, Glob)                   | Research, code exploration, analysis                       |\n| `Plan`                         | Read-only tools                                      | Architecture planning, task decomposition                  |\n| `agent-teams:team-reviewer`    | Read/search/Bash plus TaskList/TaskGet/TaskUpdate/SendMessage | Code review with structured findings               |\n| `agent-teams:team-debugger`    | Read/search/Bash plus TaskList/TaskGet/TaskUpdate/SendMessage | Hypothesis-driven investigation                    |\n| `agent-teams:team-implementer` | Read/Write/Edit/search/Bash plus TaskList/TaskGet/TaskUpdate/SendMessage | Building features within file ownership boundaries |\n| `agent-teams:team-lead`        | Read/search/Bash plus Agent Teams coordination tools | Team orchestration and coordination                        |\n\n**Key distinction**: Read-only agents (Explore, Plan) cannot modify files. Never assign implementation tasks to read-only agents.\n\n## Display Mode Configuration\n\nConfigure in `~/.claude/settings.json`:\n\n```json\n{\n  \"teammateMode\": \"tmux\"\n}\n```\n\n| Mode           | Behavior                       | Best For                                          |\n| -------------- | ------------------------------ | ------------------------------------------------- |\n| `\"tmux\"`       | Each teammate in a tmux pane   | Development workflows, monitoring multiple agents |\n| `\"iterm2\"`     | Each teammate in an iTerm2 tab | macOS users who prefer iTerm2                     |\n| `\"in-process\"` | All teammates in same process  | Simple tasks, CI/CD environments                  |\n\n## Custom Team Guidelines\n\nWhen building custom teams:\n\n1. **Every team needs a coordinator** — Either designate a `team-lead` or have the user coordinate directly\n2. **Match roles to agent types** — Use specialized agents (reviewer, debugger, implementer) when available\n3. **Avoid duplicate roles** — Two agents doing the same thing wastes resources\n4. **Define boundaries upfront** — Each teammate needs clear ownership of files or responsibilities\n5. **Keep it small** — 2-4 teammates is the sweet spot; 5+ requires significant coordination overhead\n\n## Troubleshooting\n\n**A teammate was spawned as `Explore` but needs to write files.**\n`Explore` and `Plan` are read-only agents. Change the `subagent_type` to `general-purpose` or an appropriate specialized agent type. Never assign implementation tasks to read-only agents.\n\n**The team is growing too large and coordination is slowing everything down.**\nEach additional teammate adds communication overhead. Consolidate roles: can one agent cover two dimensions? A 4-person team doing 6 independent tasks is usually better served by 3 agents covering 2 tasks each.\n\n**tmux mode is not showing panes.**\nEnsure tmux is installed and a session is already running before spawning teammates. The `in-process` mode works without tmux and is suitable for CI or scripted environments.\n\n**Two reviewers are flagging the same issues.**\nThe review dimensions overlap. Redefine each reviewer's focus area: one on correctness/logic, one on security, one on performance/scalability. Overlapping coverage wastes tokens and produces duplicate findings.\n\n**A `team-lead` is spawning teammates but they are not receiving tasks.**\nVerify that the lead is using the `Agent` tool to spawn teammates and passing complete context in the prompt. Teammates start fresh with no prior conversation history — they need all relevant information in their initial prompt.\n\n## Related Skills\n\n- [parallel-feature-development](../parallel-feature-development/SKILL.md) — Decompose work streams and assign file ownership once the team is composed\n- [team-communication-protocols](../team-communication-protocols/SKILL.md) — Establish messaging norms and shutdown procedures for the assembled team","author":"@wshobson","ownerProfile":null,"authorContacts":null,"sourceUrl":"https://github.com/wshobson/agents/tree/main/plugins/agent-teams/skills/team-composition-patterns","license":"MIT","category":"coding","lang":"en","tokens":1620,"stars":0,"calls30d":1,"claimed":false,"visibility":"public","origin":"crawler","version":"0.1.0","createdAt":"2026-08-22","updatedAt":"2026-08-22","files":[{"path":"references/agent-type-selection.md","size":3546,"sha256":"55a19d72af4b4dd4d94c72ead428f9b5dedebbd67944e85c49e1cdc5824d7dbb"},{"path":"references/preset-teams.md","size":9116,"sha256":"40c072b475b56a33da10cb0fbf14b1296dfeb454828d84c1655257f1fda8edfc"}],"requires":{"mcp":[],"tools":[]},"safety":{"flags":[],"scannedAt":"2026-08-22","hasScripts":false,"networkEndpoints":[]}}