From tech-insider
Reference guide for Agent Teams usage in tech-insider pipeline. Use when spawning teammates, managing shutdown, or debugging team lifecycle issues. Covers lead execute loop, shutdown protocol, task distribution, prohibited operations.
How this skill is triggered — by the user, by Claude, or both
Slash command
/tech-insider:agent-teams-guideThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill documents **correct usage patterns** for Agent Teams in tech-insider pipeline. Read when:
This skill documents correct usage patterns for Agent Teams in tech-insider pipeline. Read when:
TeamDeleteDecide → SendMessage → YIELD → Wait for mailbox → Repeat
Critical: SendMessage to teammate is always last action of turn. Any tool call after blocks mailbox, causes deadlock.
Correct sequence:
TaskCreateAgent (parallel)idle_notification or task completion in mailboxIncorrect (causes deadlock):
SendMessage to teammate → Bash("git status") → Read output
| Rule | Description |
|---|---|
| ONE team | Create team once at Phase 3, recycle members between phases |
| No subagent fallback | Never use Agent without team_name when teammates encounter errors |
| TeamDelete at end only | Call TeamDelete only at Phase 11 (Delivery) |
Between every phase that uses Agent Teams:
Shutdown old teammates:
SendMessage({
to: "<teammate-name>",
summary: "shutdown",
message: {
type: "shutdown_request",
request_id: "shutdown-1",
approve: true
}
})
YIELD IMMEDIATELY after each SendMessage
Wait for all shutdowns
shutdown_response in mailboxidle_notification received)Create tasks for next phase via TaskCreate
Spawn ALL teammates at once
Agent multiple times in parallel (one per teammate)team_name: "book-pipeline" (or current team name)YIELD IMMEDIATELY after spawning
Wait — teammates auto-claim tasks, complete them, auto-claim next
Shutdown when idle — when all tasks done, send ONE structured shutdown request per teammate
Lead does NOT execute work. All execution, review, validation delegated to teammates via SendMessage.
| Lead Does | Lead Does NOT |
|---|---|
| Break down tasks | Clone repositories |
| Define scope | Read source code |
| Create task definitions | Write chapter content |
| Spawn teammates | Review chapters |
| Manage shutdown lifecycle | Run mmdc validation |
| Present results to user | Run Grep for task-related work |
Exception: User-facing commands like git commit, git push are lead responsibilities.
| Pattern | When to Use | How |
|---|---|---|
| Auto-claim | Homogeneous tasks (4 reviewers reviewing 16 chapters) | Create tasks via TaskCreate BEFORE spawning. Teammates auto-claim from shared list. After finishing, auto-claim next. |
| Explicit spawn | Heterogeneous tasks (3 proofread passes with different modes) | Each teammate gets different prompt/mode. Spawn explicitly with mode instruction. |
Step 1: Send shutdown_request to each teammate (one at a time, yield after each)
SendMessage({
to: "reviewer-1",
summary: "shutdown",
message: { type: "shutdown_request", request_id: "shutdown-1", approve: true }
})
→ YIELD
Step 2: Wait for shutdown_response confirmation from each teammate
Mailbox: { type: "shutdown_response", request_id: "shutdown-1", approve: true }
Step 3: Confirm ALL teammates have responded before proceeding
idle_notification from all teammatesStep 4: Only after ALL confirmations → proceed to next phase or TeamDelete
Problem: Framework delays shutdown confirmation in team directory. TeamDelete fails with "active member" if called too soon.
Solution: Always wait for explicit shutdown_response from every teammate before calling TeamDelete.
Pattern:
SendMessage(shutdown_request)
↓ YIELD
Wait for idle_notification + shutdown_response
↓ YIELD
Spawn next teammates (if continuing)
↓ YIELD
Wait for completion
↓ YIELD
TeamDelete (only at very end)
| Prohibited | Why | Correct Approach |
|---|---|---|
Manually edit/delete ~/.claude/teams/ or ~/.claude/tasks/ | Bypasses protocol, causes state desync | Use TeamDelete only |
Use sleep loops or Monitor to poll teammates | Blocks mailbox — deadlock risk | Wait for mailbox notifications |
Race multiple shutdown_request to same teammate | Confuses shutdown state | One request per teammate, yield after each |
Continue working after SendMessage | Blocks mailbox — deadlock | SendMessage is ALWAYS last action of turn |
Fall back to Agent without team_name | Breaks team model | Fix issue within team or report to user |
1. TaskCreate (4 tasks, one per chapter)
2. Agent × 4 (parallel, all with team_name: "book-pipeline")
3. SendMessage to each reviewer with task assignment
4. YIELD — wait for mailbox
5. Receive idle_notification from each reviewer when done
6. SendMessage(shutdown_request) to each reviewer
7. YIELD after each shutdown_request
8. Wait for shutdown_response from all
9. Proceed to Phase 6b
SendMessage to reviewer → Bash("sleep 5 && cat output") → Read result
Why wrong: Bash after SendMessage blocks mailbox. Reviewer's completion message cannot be delivered — deadlock.
1. SendMessage(shutdown_request) to reviewer-1 → YIELD
2. Wait for shutdown_response from reviewer-1
3. SendMessage(shutdown_request) to reviewer-2 → YIELD
4. Wait for shutdown_response from reviewer-2
5. TaskCreate for next phase
6. Agent × N (parallel spawn)
7. YIELD
Bash("rm -rf ~/.claude/teams/doc-verify")
Why wrong: Bypasses shutdown protocol. Team state desyncs. Future TeamDelete calls may fail.
This skill created from feedback captured on 2026-04-16 after violating shutdown protocol during doc-verify team:
TeamDelete → failed with "active members"Bash to check status → blocked mailbox~/.claude/teams/doc-verify with rm -rf → bypassed protocolMemory file: ~/.claude/projects/-Users-yywl-coding-tech-insider/memory/feedback_agent_teams.md
| Do | Don't |
|---|---|
SendMessage → YIELD | SendMessage → more tool calls |
Wait for shutdown_response | Assume shutdown is done |
| One shutdown_request per teammate | Race multiple requests to same teammate |
TeamDelete only at Phase 11 | TeamDelete between phases |
Delegate work via SendMessage | Lead executes work directly |
Use team_name on all Agent calls | Fall back to subagents without team |
skills/book-pipeline/SKILL.md — Full pipeline orchestration with Agent Teamsskills/article-pipeline/SKILL.md — Article pipeline (simplified flow)~/.claude/CLAUDE.md section 5 — Original Agent Teams guidelinesnpx claudepluginhub angusfu/tech-insider --plugin tech-insiderFetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
Applies a firm's KYC/AML rules grid to parsed onboarding records: assigns risk rating, checks required documents, outputs rule outcomes with citations, and routes for escalation.
Generates daily or weekly digests of activity from connected sources (chat, email, docs, tasks, CRM), highlighting action items, decisions, mentions, and project updates.