skills/agent-teams/SKILL.md
Create agent teams for parallel collaboration. Use when user mentions team, parallel, multi-agent, coordinate, collaborate, review team, multiple perspectives, or says "agent-teams".
npx skillsauth add jochenyang/jochen-ai-rules 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.
Use Claude Code's NATIVE agent teams feature. Agent teams are a first-class capability built into Claude Code — do NOT simulate them with bash subprocesses or CLI commands.
bash, subprocess, or claude CLI to create parallel agents./orchestrate, unless
they also explicitly ask for parallel teams, multiple simultaneous agents, or
agent-teams.Agent teams add coordination overhead and use significantly more tokens. Choose wisely:
| Scenario | Use | Why | |---------------------------------------------------------------|--------------------|----------------------------------------------------| | Teammates need to share findings and challenge each other | Agent Teams | Peer-to-peer messaging, shared task list | | Quick, focused workers that report back independently | Subagents | Lower overhead, no inter-agent coordination needed | | Sequential tasks, same-file edits, many dependencies | Single Session | No parallelism benefit |
Key difference: Subagents can only report back to the parent. Agent team teammates message each other directly, self-claim tasks, and self-coordinate.
Decision rule: If workers need to communicate with each other → Agent Teams. If not → Subagents or Single Session.
Critical: Teammates do NOT inherit the lead's conversation history. Whatever context they need, the lead must provide in the spawn prompt. Be generous with initial briefing.
Before creating a team, ask:
Best use cases for agent teams:
Poor fit:
/orchestrate ... command without a
separate request for parallel team executionStart with research, then implement. Agent teams work best when they begin with investigation, review, and analysis — then move to implementation if needed.
Principles from the C compiler project:
Select the right team structure based on task type:
IMPORTANT: Every team MUST include a
challenge_agent. This role is not optional — it improves quality by challenging assumptions and finding blind spots that specialists miss.
Roles (4-5 teammates):
security_auditor: OWASP Top 10, injection, auth/authz, dependency vulnerabilitiesperformance_engineer: Complexity, N+1 queries, memory, caching, bundle sizemaintainability_expert: SOLID, DRY, naming, error handling, test coveragechallenge_agent: Dedicated skeptic — challenges assumptions, finds blind spots, questions each reviewer's conclusions (REQUIRED in every team)qa_specialist (optional): Edge cases, race conditions, error pathsCoordination: Work independently → challenge_agent questions everyone's findings → cross-check each other's findings → consolidate into single report.
The challenge_agent (or devil_advisor) is a dedicated skeptic that improves team quality:
Responsibilities:
Why it matters:
Example prompt:
challenge_agent: "Review all findings from security_auditor, performance_engineer, and maintainability_expert. Question their conclusions: What assumptions are they making? What edge cases did they miss? What would make this code fail in production? Output: challenges.md with ranked concerns by severity."
Scale roles by complexity:
Simple (4 roles): Single-page, basic CRUD
fullstack_developer: End-to-end implementationui_reviewer: UX validation, interaction flowschallenge_agent: Challenges design decisions, identifies edge cases and risks (REQUIRED in every team)code_reviewer: Quality, best practices, securityStandard (5-6 roles): Multi-component, API integration
system_architect: API contracts, data models, service boundariesfrontend_specialist: Components, state management, accessibilitybackend_specialist: Business logic, validation, authorizationintegration_tester: Cross-layer verification, E2E scenarioschallenge_agent: Challenges design decisions, identifies edge cases and risks (REQUIRED in every team)code_reviewer: Quality, patterns, securityComplex (6-8 roles): Full-stack module, database design, deployment
database_engineer, devops_engineer to Standard rolesCoordination: Architect defines contracts → Specialists implement in parallel → Testers verify → Reviewer ensures quality → Consolidate.
Roles (3-4 teammates):
log_analyst: Trace reconstruction, timeline, patternscode_auditor: Static analysis, state consistency, root cause hypothesesreproduction_lead: Minimal repro, environment simulationchallenge_agent: Challenges each investigator's hypothesis, pushes for more evidence (REQUIRED in every team)Coordination: Each investigates a different hypothesis → challenge_agent questions conclusions → debate and disprove → converge on root cause.
Roles (3-4 teammates):
advocate_a: Deep dive into option A — strengths, weaknesses, real-world examplesadvocate_b: Deep dive into option Bsynthesizer: Objective comparison, scoring matrix, recommendationchallenge_agent: Challenges each advocate's reasoning, questions assumptions (REQUIRED in every team)Coordination: Advocates research independently → challenge_agent questions conclusions → synthesizer produces final analysis.
Tell Claude what you want in natural language. Be specific about roles and scope.
Use this pattern:
[Brief analysis of why a team is needed]
Create an agent team to [objective].
Spawn [N] teammates:
- [role_name]: "[Goal sentence]. Focus: [specific areas with file paths if applicable]. Output: [deliverable file/format]."
- [role_name]: "[Goal sentence]. Focus: [specific areas]. Output: [deliverable file/format]."
...
Coordination:
- [How teammates collaborate and cross-check]
- [File ownership: who writes where]
- [How results are consolidated]
Wait for teammates to finish.
Role definition quality matters:
Good:
security_auditor: "Audit src/auth/ for security vulnerabilities. Focus: JWT token storage in src/auth/token.ts, session management in src/auth/session.ts, CSRF protection, password hashing, rate limiting. Output: security_review.md with findings sorted by CVSS severity."
Bad:
security_guy: "Check security stuff"
As lead agent, manage using:
| Action | How | When |
|-------------------|--------------------------------|----------------------------------------|
| Direct a teammate | Ask [teammate] | Assign specific work or ask for status |
| Message all | Broadcast | Share updates affecting everyone |
| Wait | Wait for teammates to finish | Before consolidating results — always |
| Clean up | Clean up the team | When done — mandatory, no exceptions |
Assignment modes:
Ask [teammate]. Use for sequenced or specialized work.Optional controls:
After all teammates finish:
These patterns come from Anthropic's experiment where 16 agents built a 100,000-line C compiler:
When tasks are naturally independent, parallelization is trivial: Each agent picks a different failing test or module to work on. The shared task list handles coordination.
Giant monolithic tasks cause agents to get stuck: Unlike hundreds of independent tests, a single massive task can't be parallelized. Break big deliverables into smaller, testable chunks.
Tests are the primary coordination mechanism: With high-quality tests, agents stay on track without human oversight. New commits can't break existing code if CI enforces it.
Agents have no prior context on each session: Each agent starts fresh. Write clear README/CLAUDE.md files so agents can self-orient quickly. Include file paths, architecture notes, and conventions.
Agents waste time without constraints: Without guardrails, agents will spend hours running tests or exploring tangents. Provide fast feedback loops (quick test samples, clear progress indicators).
File-based coordination works: Agents "lock" tasks by writing files. Git merge conflicts serve as tiebreakers. Save all results to files since session state doesn't persist.
Use hooks to enforce rules automatically:
/resume doesn't restore teammates → Always save results to filesUser: "Use agent-teams to review the authentication module for security, performance, and code quality."
Response:
This task benefits from parallel specialized review — three independent perspectives on the same code, with cross-checking. Creating a review team.
Create an agent team to review the authentication module.
Spawn three reviewers:
Coordination:
Wait for teammates to finish.
Cause: Context window limit or message delivery delay Solution:
Cause: Multiple teammates assigned to same files Solution:
Cause: Vague role definition in spawn prompt Solution:
Cause: Unclear completion criteria or circular dependencies Solution:
Cause: Teammates wrote to wrong files or formats differ Solution:
agent-teams only for explicit parallel or multi-perspective work./orchestrate unless the user also asks for parallel execution./orchestratecontext-codebasedeveloper directlyPause and ask the owner before:
Every use of this skill should end with:
Skill Fit - why team orchestration was appropriateTeam Design - roles, ownership, and coordination shapeExecution Evidence - artifacts, files, or checkpoints produced by teammatesRisks / Open Questions - coordination gaps, blockers, or unresolved conflictsNext Action - the concrete consolidation or follow-up stepdatabases
Review current conversation, analyze tasks, errors, and user feedback, extract learning opportunities for skill improvement. Use when user says "reflect", "review session", "what did we learn", "session summary", or after completing a complex task.
development
Create and resume structured manual session handoffs for long-running development work. Use when approaching context limits, before manual reset, before switching models or IDEs, after a milestone, or when automatic compact would lose important implementation state.
development
Implement distinctive, production-grade frontend UI code with strong visual direction, motion systems, local media asset generation, conversion-aware copy, and polished frontend execution. Use when building landing pages, marketing sites, product pages, dashboards, motion-heavy interfaces, or frontend experiences that need real assets and compelling copy.
development
Project context engine for repo orientation, cached handoff, and task-focused code retrieval.