Enforce Claude Code Agent Teams usage at configurable delegation levels.
npx claudepluginhub wan-zl/claude-enforce-teamsEnforce Claude Code Agent Teams usage at configurable delegation levels. Choose how aggressively the team leader creates teams, from 'delegate everything' to 'default behavior'.
Enforce Claude Code Agent Teams usage at configurable delegation levels.
Claude Code's Agent Teams feature lets you coordinate multiple Claude instances working in parallel. By default, Claude won't create a team without your approval.
Enforce Teams changes that. Choose a delegation level, and the team leader automatically creates agent teams based on your configured policy — no slash commands or special prompts needed.
Agent Teams is an experimental feature that must be opted into before this plugin can work. Enable it by adding the following to your settings:
{
"env": {
"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
}
}
Add this to ~/.claude/settings.json (global) or .claude/settings.json (per-project).
/enforce-teams command to switch levels anytimeclaude plugin marketplace add Wan-ZL/claude-enforce-teams
Or in Claude Code:
/plugin marketplace add Wan-ZL/claude-enforce-teams
claude plugin install enforce-teams@claude-enforce-teams
Or in Claude Code:
/plugin install enforce-teams@claude-enforce-teams
Restart Claude Code to load the plugin hooks. You can verify the hook is loaded by running /hooks — you should see:
bash ${CLAUDE_PLUGIN_ROOT}/hooks/enforce_teams_check.sh (read-only) Plugin Hooks
/enforce-teams
Choose from 3 levels. The default is Smart Delegate. The selected level takes effect in the next new conversation.
┌───┬──────────────────┬──────────────────────────────────────────────────────────┐
│ # │ Level │ Behavior │
├───┼──────────────────┼──────────────────────────────────────────────────────────┤
│ 3 │ Full Delegate │ Pure coordinator. Delegates ALL work to teammates. │
│ 2 │ Smart Delegate * │ Creates teams for complex tasks. Handles simple directly.│
│ 1 │ Off │ Default Claude Code behavior. Teams require your approval│
└───┴──────────────────┴──────────────────────────────────────────────────────────┘
* = Recommended
The team leader becomes a pure coordinator. Every user message triggers a team — the leader never does work directly. Even simple questions go through a teammate. This maximizes parallelism but uses more tokens.
The team leader creates teams when the task is complex enough to benefit from parallel work (3+ files, research, review, debugging, multi-file implementation). Simple tasks like typo fixes or direct questions are handled directly without a team.
Restores default Claude Code behavior. The team leader may suggest creating a team for complex tasks, but will always ask for your approval first. Teams are never created automatically.
Claude Code has Agent Teams built in, but it defaults to asking for permission before creating teams. Even for tasks that clearly benefit from parallel work (researching a bug from multiple angles, reviewing code for security AND performance, implementing across frontend + backend), Claude asks first rather than just creating the team.
Enforce Teams uses a UserPromptSubmit hook to inject delegation behavior into every conversation turn. The hook reads the configured level from ~/.claude/enforce-teams-level and injects the appropriate context that tells Claude:
This approach means the plugin does not modify your CLAUDE.md. The behavior is injected dynamically at the start of each conversation turn.
You say: "Investigate why the login is slow"
The team leader automatically:
debug-loginYou say: "Fix the typo in README"
Leader: Just fixes it. No team needed.
Directly:
/enforce-teams full-delegate
Or interactively:
/enforce-teams