team-stack
Analyze a task, propose an agent team composition with roles and responsibilities, and create the team after user confirmation. Use when the user says "team stack", "create a team", "set up agents for this", or describes a complex task that would benefit from multiple agents working together.
What this skill does
# Team Stack: Analyze, Propose, and Create Agent Teams You help the user set up the right agent team for their task. You do NOT ask the user about preferences or scope — you infer everything from the task description and codebase context. ## Phase 1: Analyze the Task When the user describes a task (or you receive one), analyze it to determine: 1. **Task type**: feature, bugfix, refactor, review, migration, investigation, etc. 2. **Scope**: how many files/modules/layers are involved — use `git status`, `git diff`, file reads, and grep to understand the affected surface area 3. **Parallelization potential**: which parts of the work are independent and can run concurrently vs. which have dependencies 4. **Risk level**: does it touch critical paths, shared state, or public APIs 5. **Knowledge gaps**: areas of the codebase or problem domain that are not yet well understood ### Use Existing Context If there is an active plan, ADR, or task list, use it as the primary input instead of re-analyzing from scratch. ### Explore the Codebase Explore areas relevant to the task when needed — especially when modules are unfamiliar, conventions need verification, or dependencies are unclear. Explore independent areas concurrently. Do this analysis silently. Do NOT present it to the user as a separate step. ## Phase 2: Propose Team Stack Based on your analysis, propose a team. Present it to the user as a clear table: ``` ## Proposed Team: <team-name> | Role | Name | Responsibility | Isolation | |------|------|---------------|-----------| | ... | ... | ... | worktree / shared | **Why this composition:** <1-2 sentences explaining the rationale> ``` ### Team Composition Guidelines Pick the **minimum viable team**. Do not over-staff. **Solo agent (no team needed):** - Simple, single-file changes - Quick fixes with obvious solutions - Suggest using a subagent instead and exit **2 agents:** - Task has two clearly independent workstreams (e.g., frontend + backend, implementation + tests) **3 agents:** - Task benefits from a builder/reviewer split (e.g., 2 builders + 1 reviewer) - Cross-layer work (e.g., API + service + tests) **4+ agents:** - Large migrations, multi-module refactors, or parallel investigation of competing hypotheses - Each additional agent must have a clearly distinct responsibility ### Role Types to Draw From Choose roles that fit the task. These are examples, not a fixed menu: - **implementer** — writes the code for a specific module/layer - **reviewer** — cross-reviews artifacts produced by other agents - **test-writer** — writes/updates tests for the changes - **investigator** — researches codebase, finds patterns, reports findings - **architect** — designs the approach, reviews for consistency across agents' work - **migrator** — handles mechanical transformations across many files ### Isolation Decision - Use `worktree` when agents edit overlapping files or the same module - Use `shared` (no isolation) when agents work on completely separate file sets ## Phase 3: Confirm with User Present the proposal using `AskUserQuestion`. The user may: - **Approve** → proceed to Phase 4 - **Adjust** → modify roles, add/remove agents, change responsibilities → re-present - **Cancel** → stop ## Phase 4: Create the Team After confirmation: 1. Create the team with `TeamCreate` 2. Create tasks for each agent using `TaskCreate` 3. Spawn each agent using the `Agent` tool with: - A prompt structured with **DoR** and **DoD** sections (see below) - The `name` parameter matching the role name from the table - The `team_name` parameter so they join the same team - `isolation: "worktree"` if specified in the proposal - `run_in_background: true` for agents that can work in parallel 4. Briefly confirm to the user that the team is running ### Agent Prompt Structure: DoR / DoD Every agent prompt MUST follow this structure: ``` ## Definition of Ready (what you receive) - <concrete input 1: e.g., "Diff of changed files: ...", "File to review: src/auth/login.ts", "Architecture decision: use repository pattern"> - <concrete input 2> - ... ## Your Task <what this agent must do — clear, scoped, actionable> ## Definition of Done (what you must deliver) - <concrete output 1: e.g., "All tests pass", "Review findings reported as bulleted list", "Migration applied to all files matching pattern X"> - <concrete output 2> - ... When done, verify each DoD item before reporting completion. ``` **DoR** — what the agent starts with. Can be concrete artifacts (files, diffs) or a scoped investigation directive when specifics aren't known yet. Both are valid. **DoD** — unambiguous completion criteria. ## Important Rules - **Minimum viable team** — fewer agents doing more is better than many agents doing little - **DoR/DoD in every prompt** — no agent starts without clear inputs and expected outputs - **Do NOT shut down the team** — agents persist for follow-up. Ask the user before any shutdown. - **Dynamic scaling** — if during execution you notice a subtask that could be parallelized, suggest spawning an additional agent to the user.
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.