plugins/ai-registry-draft-pr/common/agent-team/skills/agent-team/SKILL.md
Use when user needs to decide between single agent, subagents, or agent team for a task, or when designing agent team structure and execution prompts. Triggers: 'agent team', 'team design', 'swarm', 'multi-agent', '팀 설계', '에이전트 팀', '팀 만들어', '멀티 에이전트', '팀 구성', '팀으로 작업', '자율성', 'autonomy', '알아서 하게'
npx skillsauth add onejaejae/skills agent-teamInstall 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.
Assess whether a task needs single agent, subagents, or a full agent team — then design and output a copy-paste execution prompt.
Core principle: Always try the simplest approach first. Agent teams are expensive — justify the cost.
AskUserQuestion은 이 스킬이 로드된 턴에서 절대 호출하지 마세요.
필수 절차:
digraph agent_team {
rankdir=TB;
"User describes task" [shape=doublecircle];
"Scan codebase or capture requirements" [shape=box];
"Auto-recommend (size, topology, autonomy)" [shape=box, style=filled, fillcolor=lightyellow];
"Interview (1-2 rounds)" [shape=box];
"Select autonomy tier (A/B/C)" [shape=box, style=filled, fillcolor=lightyellow];
"Run Decision Tree" [shape=diamond];
"Single agent" [shape=box, style=filled, fillcolor=lightgreen];
"Subagent design" [shape=box];
"Team design" [shape=box];
"Apply autonomy template" [shape=box, style=filled, fillcolor=lightyellow];
"Output execution prompt" [shape=doublecircle];
"User describes task" -> "Scan codebase or capture requirements";
"Scan codebase or capture requirements" -> "Auto-recommend (size, topology, autonomy)";
"Auto-recommend (size, topology, autonomy)" -> "Interview (1-2 rounds)";
"Interview (1-2 rounds)" -> "Select autonomy tier (A/B/C)";
"Select autonomy tier (A/B/C)" -> "Run Decision Tree";
"Run Decision Tree" -> "Single agent" [label="single context sufficient"];
"Run Decision Tree" -> "Subagent design" [label="parallel, no comms"];
"Run Decision Tree" -> "Team design" [label="parallel, needs comms"];
"Single agent" -> "Done — no prompt needed";
"Subagent design" -> "Apply autonomy template";
"Team design" -> "Apply autonomy template";
"Apply autonomy template" -> "Output execution prompt";
}
Auto-recommendation from scan:
| Signal | Recommendation | |---|---| | Top-level dirs with 3+ files each | 1 agent per dir (max 5) | | Shared interface files (types, contracts) | Pre-write in Phase 0 | | Existing CLAUDE.md with ownership rules | Reuse ownership map | | Single dir, ≤5 files | Single agent — END |
When there is nothing to scan, derive recommendations from requirements:
Greenfield recommendation:
| Signal | Recommendation | |---|---| | 1-2 named modules | Single agent or 2 subagents | | 3+ named modules, independent | 1 agent per module | | Modules share DB/auth/API | Pre-write contracts in Phase 0 | | Tech stack unknown | Ask in Phase 2 Round 1 FIRST |
Output a preliminary recommendation table. This is a hypothesis — Phase 3 Decision Tree is the final judge.
추천 결과 (예비 — Phase 3에서 확정):
- 접근법: [단독 / 서브에이전트 / 팀]
- 인원: [N명]
- 토폴로지: [패턴 이름]
- 파일소유권: [dir → agent 매핑]
- 자율성: [Tier A/B/C 추천 + 근거]
Phase 1 추천 ≠ 최종 결정. Phase 2 인터뷰 결과로 추천이 바뀔 수 있음. Phase 3 Decision Tree가 공식 판단.
If scan reveals mismatch between user's description and actual stack:
[주의] 스택 불일치 경고 포함Then STOP and wait for user response.
Use AskUserQuestion. 1-2 rounds, 2-3 questions per round.
Round 1 — Scope & Autonomy:
Autonomy Tier Selection (MANDATORY — present to user):
| Tier | Name | Leader Role | Agent Behavior | Best For | |---|---|---|---|---| | A | Prescribed | Task list + step-by-step | Follow exact instructions | 예측 가능한 결과, 첫 사용 | | B | Semi-autonomous | Goals + constraints + file ownership | Plan own approach within boundaries | 업계 권장 (sweet spot) | | C | Fully autonomous | High-level objective only | Self-decompose, self-assign, self-review | 실험적, 고위험 |
Default to Tier B unless user explicitly requests otherwise.
Round 2 (if ambiguous) — Coordination needs:
Greenfield-specific questions (add to Round 1 if no codebase):
Run this tree strictly. Do NOT skip to team design because a task "seems big".
Q1. Can a single agent handle this in one context window?
Indicators: ≤5 files, single domain, sequential steps
├─ YES → SINGLE AGENT. Tell user "팀 불필요" and END.
└─ NO ↓
Q2. Are there 3+ independent parallel work units?
Indicators: separate file groups, no shared mutable state
├─ NO → SINGLE AGENT with sequential subagent calls.
└─ YES ↓
Q3. Do parallel agents need real-time communication?
Indicators: shared contracts to negotiate, interface dependencies,
need to react to each other's outputs mid-task
├─ NO → SUBAGENTS (Agent tool, parallel). Design in Phase 4a.
└─ YES → AGENT TEAM (TeamCreate). Design in Phase 4b.
"팀" ≠ TeamCreate: User saying "팀으로 해줘" does NOT mean TeamCreate is needed. Always run Q1-Q3. Explain the distinction if decision tree says subagents but user said "팀".
Cost check (MANDATORY before any multi-agent recommendation):
| Approach | Relative Cost | When Worth It | |---|---|---| | Single agent | 1x | Default. Always try first | | Subagents (parallel) | ~Nx | Time savings > cost increase | | Agent Team | ~Nx + 30% comms overhead | Complex coordination essential |
Real-world cost context: Multi-agent setups consume ~15x tokens vs single agent. Present this to user. Get confirmation before designing.
Team size: 3-5 MAX. More = decomposition is wrong. Group related work.
Topology selection:
| Pattern | When | Example | |---|---|---| | Sequential Pipeline | Fixed workflow stages | Research → Write → Edit | | Parallel Specialists | Same task, different lenses | Security + Performance + Test review | | Generator + Critic | Quality-critical output | Code → Review loop | | Map-Reduce | Independent chunks | Module A + B + C in parallel | | Competing Hypotheses | Debugging, decision-making | 3 agents test 3 theories |
Autonomy determines HOW spawn prompts are written. Same team structure, different prompt style.
Per-agent prompt includes:
- Numbered step-by-step task list (1. Do X, 2. Do Y, 3. Verify Z)
- Exact file paths to create/edit
- Expected output format
- Completion signal: "DONE: [exact checklist item completed]"
- NO self-planning: agent follows instructions only
Leader behavior:
- Creates full task list before spawning
- Assigns every task explicitly
- Reviews every output before next phase
Per-agent prompt includes:
- Goal statement + success criteria
- File ownership boundaries (EXCLUSIVE)
- Constraints: what NOT to do, what NOT to touch
- Reference: shared contracts file paths
- Freedom: agent decides approach within boundaries
- Completion signal: "DONE: [summary of what was accomplished]"
- Checkpoint: agent reports plan BEFORE executing (leader approves or redirects)
Leader behavior:
- Writes contracts + constraints in Phase 0
- Spawns agents with goals (not steps)
- Reviews agent plans at checkpoint
- Intervenes only on contract violations or blocked signals
Per-agent prompt includes:
- High-level objective only
- File ownership boundaries (still EXCLUSIVE — non-negotiable)
- Budget limit: "Complete within N tool calls" (prevents runaway)
- Self-review: agent must verify own output before signaling done
- Completion signal: "DONE: [summary + self-review results]"
Leader behavior:
- Minimal Phase 0 (dir structure + ownership only)
- Does NOT create task lists — agents self-decompose
- Reviews only final output, not intermediate steps
- MUST set budget limits to prevent cost explosion
Budget N guideline:
- Simple module (≤5 files): N = 50 tool calls
- Medium module (5-15 files): N = 100 tool calls
- Complex module (15+ files or greenfield): N = 150 tool calls
- If unsure, start with N = 80 and adjust after first agent completes
⚠️ RISK WARNINGS (present to user before confirming Tier C):
- Cost explosion: agents may spawn sub-agents or loop without bound
- Direction drift: without checkpoints, agents may solve wrong problem
- Quality variance: no intermediate review = higher failure rate
- Recovery cost: if output is wrong, entire agent's work is wasted
- Recommended only for: experienced users, low-stakes experiments
Final deliverable = copy-paste execution prompt.
The prompt MUST contain ALL of the following. Missing any = incomplete prompt.
subagent_type (REQUIRED — e.g., general-purpose, Explore)model hint if relevant (e.g., haiku for search, sonnet for implementation)npm run build passes, tests pass)Format:
## 아래 프롬프트를 Claude Code에 붙여넣으세요
> [한국어 요약: 팀 구성, 토폴로지, 자율성 Tier, 예상 비용 수준]
```text
[English execution prompt here]
Also write the prompt to `plans/{task-slug}-team-prompt.md` for reuse.
## Claude Code Platform Constraints
Know these BEFORE designing:
| Constraint | Impact |
|---|---|
| Teammates: 20 tools (subagents: 25) | Teammates can't use some tools subagents can |
| VS Code: team messages unstable | **Use terminal CLI only for team mode** |
| No shared memory between agents | ALL context must be in spawn prompt or files |
| Agents can't see leader's conversation | Spawn prompts must be fully self-contained |
| Cost: ~15x tokens vs single agent | Always present cost comparison first |
## Red Flags — STOP and Reconsider
- Designing 6+ teammates → decomposition is wrong, re-group
- No clear file ownership boundaries → risk of overwrites
- All tasks are sequential → subagent chain, not team
- "Feels like it needs a team" without Q1-Q3 → re-run decision tree
- Skipping cost check → always present cost comparison first
- User says "팀" but Q3=NO → explain: subagents are better, "팀" ≠ TeamCreate
- Tier C without budget limits → cost explosion risk, add limits before proceeding
## Common Mistakes
| Mistake | Fix |
|---|---|
| Jump to team design without interview | Always scan + interview first |
| 6+ agents because task is "big" | 3-5 max. Group related work |
| No file ownership plan | Every agent gets exclusive file list |
| Spawn prompt says "refactor the auth" | Include full context: stack, structure, interfaces |
| Skip cost comparison | Always show single vs sub vs team cost before designing |
| Design team for sequential workflow | Use subagent chaining instead |
| Missing `subagent_type` in spawn instructions | REQUIRED field — Agent tool will fail without it |
| Placeholder instructions "[same as Agent 1]" | Every agent gets fully materialized instructions |
| No Phase 0 scaffolding | Always create dirs, install deps, write contracts BEFORE spawning |
| No failure handling | Specify: BLOCKED/FAILED protocol per agent |
| Greenfield with no Phase 0 project init | Phase 0 MUST include project scaffolding (create-next-app, etc.) |
| Same prompt style for all autonomy tiers | Tier A=steps, Tier B=goals+constraints, Tier C=objective+budget |
| Tier C without budget limits | ALWAYS set tool-call budget for Tier C agents |
| Ignoring user's autonomy preference | Present A/B/C table, let user choose (default B) |
## Technical Constraint
Skills cannot use TeamCreate, SendMessage, or Agent tools directly. This skill **designs** the team and outputs a prompt that the user pastes into Claude Code to execute.
testing
CLAUDE.md 기반 환경 안전 체크. 작업 시작 전에 프로젝트의 안전 규칙, 컨벤션, 환경 설정을 자동 검증하여 CLEAR/WARNING/BLOCKED 상태를 보고한다. /check가 "변경 후 검증"이라면, /pre-flight는 "작업 전 환경 검증"이다. Use PROACTIVELY before starting work, especially after switching branches, pulling changes, or resuming a session. Also use when explicitly asked: "/pre-flight", "프리플라이트", "환경 체크", "작업 전 점검", "안전 체크", "environment check", "pre-flight check", "시작해도 돼?", "환경 괜찮아?", "safety check", "DB 확인", "설정 확인", "config check".
tools
PR 리뷰 워크플로우와 체크리스트를 제공하는 스킬. "PR 리뷰해줘", "코드 리뷰 해줘", "이 PR 봐줘", "review this PR" 등 PR 리뷰 요청 시 사용. GitHub/GitLab PR URL 또는 로컬 브랜치 diff를 기반으로 체계적이고 일관된 리뷰를 수행. 코드 품질, 안정성/보안, 성능, 테스트, 문서화 관점에서 건설적인 피드백 제공.
documentation
PR review comments를 체계적으로 처리하는 skill. Use when: (1) PR에 동료의 리뷰가 달렸을 때, (2) 여러 리뷰를 한 번에 처리하고 싶을 때, (3) 수정 후 commit 링크가 포함된 reply를 자동으로 추가하고 싶을 때
tools
PR diff를 받아 코드 리뷰 자동 요약을 생성하는 스킬. 핵심 변경점을 3줄로 요약하고, 변경 파일별로 what changed / why it matters / risk level을 정리. Use when: "PR 요약", "diff 요약", "PR 변경점 정리", "코드 변경 요약", "summarize PR", "PR summary", "diff summary", "what changed in this PR", "변경점 요약해줘", "PR 핵심 정리", "리뷰 요약"