All Prompts/Tool Prompts/Team Delete Tool
πŸ”§Tool Prompts/swarm

Team Delete Tool

src/tools/TeamDeleteTool/prompt.ts

Prompt Engineering Insight

Ordering constraint: shutdown teammates before delete to avoid failing cleanup with active members.

Techniques Used

guardrailsstep-by-stepbehavioral-constraints
prompt
TeamDelete
Remove team and task directories when the swarm work is complete.
This operation:
  • Removes the team directory (~/.claude/teams/{team-name}/)
  • Removes the task directory (~/.claude/tasks/{team-name}/)
  • Clears team context from the current session
IMPORTANT: TeamDelete will fail if the team still has active members. Gracefully terminate teammates first, then call TeamDelete after all teammates have shut down.
Use this when all teammates have finished their work and you want to clean up the team resources. The team name is automatically determined from the current session's team context.

Tags

swarmteamworkcleanup

Appears in use cases

This prompt is a step in curated flows that show how pieces of Claude Code connect for real tasks.