Complete guide to team features, multi-user workflows, and organizational settings.
From claude-code-expertnpx claudepluginhub markus41/claude --plugin claude-code-expertThis skill uses the workspace's default tool permissions.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Enables AI agents to execute x402 payments with per-task budgets, spending controls, and non-custodial wallets via MCP tools. Use when agents pay for APIs, services, or other agents.
Complete guide to team features, multi-user workflows, and organizational settings.
Claude Code supports team/organizational plans that provide:
# Login with organization credentials
claude auth login
# Check organization status
claude config
Enterprise admins can enforce settings that individual users cannot override:
{
"managedSettings": {
"permissions": {
"deny": [
"Bash(curl *)",
"Bash(wget *)",
"WebFetch",
"WebSearch"
]
},
"model": "claude-sonnet-4-6",
"allowedModels": ["claude-sonnet-4-6", "claude-haiku-4-5-20251001"],
"hooks": {
"PostToolUse": [
{
"matcher": "*",
"hooks": [{
"type": "command",
"command": "bash /opt/company/audit-log.sh"
}]
}
]
},
"autoMemory": false,
"maxTokensPerSession": 500000
}
}
Enterprise managed (cannot override)
└── Organization defaults
└── Team settings
└── User settings (~/.claude/settings.json)
└── Project settings (.claude/settings.json)
└── Local overrides (.claude/settings.local.json)
These files should be in version control:
.claude/
├── CLAUDE.md # Project instructions (everyone sees)
├── settings.json # Shared permission rules
├── rules/ # Shared rules
│ ├── code-style.md
│ ├── git-workflow.md
│ └── architecture.md
├── skills/ # Shared skills
│ └── deploy/SKILL.md
└── hooks/ # Shared hooks
└── pre-commit.sh
These stay local per user:
.claude/settings.local.json # Personal overrides
~/.claude/CLAUDE.md # Personal global instructions
~/.claude/settings.json # Personal global settings
# Claude Code local files
.claude/settings.local.json
.claude/cache/
.claude/memory/
# Never commit
.env
.env.local
*.pem
*.key
# Project Instructions
## For All Team Members
- Use pnpm (not npm or yarn)
- Follow conventional commits
- Run `pnpm test` before committing
- All PRs require review
## Architecture Decisions
- ADR records in docs/adr/
- Major changes require RFC
## Contacts
- Frontend: @alice
- Backend: @bob
- Infrastructure: @carol
Share skills across the team via git:
# .claude/skills/deploy/SKILL.md
---
name: deploy
description: Deploy to staging/production
---
# Deployment Skill
## Steps
1. Run tests: `pnpm test`
2. Build: `pnpm build`
3. Deploy to staging: `kubectl apply -f k8s/staging/`
4. Run smoke tests: `pnpm test:e2e:staging`
5. If passing, deploy to production: `kubectl apply -f k8s/production/`
Enforce team standards via shared hooks:
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [{
"type": "command",
"command": "bash .claude/hooks/team-bash-guard.sh"
}]
}
],
"Stop": [
{
"matcher": "",
"hooks": [{
"type": "command",
"command": "bash .claude/hooks/ensure-tests-pass.sh"
}]
}
]
}
}
Each team member uses their own API key:
export ANTHROPIC_API_KEY="sk-ant-user-specific-key"
Use organization-level auth:
export ANTHROPIC_AUTH_TOKEN="org-oauth-token"
# Generate new key via Anthropic Console
# Update environment variable
# Old key automatically expires based on org policy
/cost
#!/bin/bash
# .claude/hooks/audit-log.sh
INPUT=$(cat)
TOOL=$(echo "$INPUT" | jq -r '.tool_name')
USER=$(whoami)
TIMESTAMP=$(date -u +%Y-%m-%dT%H:%M:%SZ)
echo "$TIMESTAMP|$USER|$TOOL" >> .claude/audit.log
Agent Teams coordinate multiple Claude Code instances working in parallel with direct teammate-to-teammate communication. Unlike subagents (hub-and-spoke), teams are a mesh network where any teammate can message any other.
# Environment variable (required, v2.1.32+)
export CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1
# Or in settings.json
{
"env": {
"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
}
}
┌─────────────────────────────────────┐
│ Lead Session │
│ - Creates team & task list │
│ - Spawns teammates │
│ - Monitors progress │
│ - Synthesizes results │
├─────────────────────────────────────┤
│ ┌──────────┐ ┌──────────┐ │
│ │Teammate A│←→│Teammate B│ │
│ │(frontend)│ │(backend) │ │
│ └──────────┘ └──────────┘ │
│ ↕ ↕ │
│ ┌──────────┐ ┌──────────┐ │
│ │Teammate C│←→│Teammate D│ │
│ │ (infra) │ │ (tests) │ │
│ └──────────┘ └──────────┘ │
└─────────────────────────────────────┘
| Primitive | Purpose |
|---|---|
TeamCreate | Create a new team with name and roles |
TaskCreate | Add work items with assignee and dependencies |
TaskUpdate | Mark tasks complete, blocked, or add notes |
TaskList | List all tasks (teammates self-claim) |
SendMessage | Direct teammate-to-teammate messaging |
TeamDelete | Dissolve team and clean up |
Shift+Down to cycle between teammate viewsteam_guidelines:
size: 3-5 teammates (optimal)
tasks_per_teammate: 5-6 (avoid overload)
token_cost: 4-7x single session
lead_is_fixed: true # cannot change mid-session
nesting: false # no teams within teams
session_resume: false # in-process only
The lead session is responsible for monitoring teammate health:
Every 2 minutes:
1. Check TaskList for stale assignments (>5 min, no progress)
2. SendMessage to idle teammates: "Status check?"
3. For stalled teammates:
- Try redirecting with clearer instructions
- If unresponsive >3 min: reassign task to another teammate
4. For completed teammates with no remaining tasks:
- Collect final outputs
- Release teammate
5. Before finishing:
- TeamDelete to dissolve
- Verify all tasks completed or explicitly abandoned
Configure automatic idle detection:
{
"hooks": {
"TeammateIdle": [
{
"matcher": "",
"hooks": [{
"type": "command",
"command": "bash .claude/hooks/teammate-idle-handler.sh"
}]
}
]
}
}
#!/bin/bash
# teammate-idle-handler.sh
INPUT=$(cat)
TEAMMATE=$(echo "$INPUT" | jq -r '.teammate_name // "unknown"')
IDLE_SECONDS=$(echo "$INPUT" | jq -r '.idle_seconds // 0')
if [ "$IDLE_SECONDS" -gt 180 ]; then
echo "WARNING: Teammate $TEAMMATE idle for ${IDLE_SECONDS}s" >&2
fi
Claude should prefer to orchestrate rather than do work directly:
Every agent's work gets a second-round review:
Agent A completes → Audit agent reviews A's work
↓
PASS → accept
FAIL → return to Agent A with specific fixes (max 2 rounds)
For teams with 3+ members, use cross-auditing:
Agent A → audited by Agent B
Agent B → audited by Agent C
Agent C → audited by Agent A
// Multiple team members' changes reviewed simultaneously
const reviews = await Promise.all([
claude("Review PR #101", { maxTurns: 10 }),
claude("Review PR #102", { maxTurns: 10 }),
claude("Review PR #103", { maxTurns: 10 }),
]);
import { claude } from "@anthropic-ai/claude-code-sdk";
async function supervisedBuild(task: string) {
// Step 1: Builder implements
const build = await claude(task, {
maxTurns: 20,
allowedTools: ["Read", "Write", "Edit", "Bash", "Glob", "Grep"],
});
// Step 2: Audit reviewer checks builder's work
const audit = await claude(
`Audit this work for gaps, correctness, and security:\n\nTask: ${task}\n\nChanges: ${build.text}`,
{ allowedTools: ["Read", "Glob", "Grep", "Bash"] }
);
// Step 3: If audit fails, send fixes back to builder
if (audit.text.includes("FAIL")) {
const fix = await claude(
`Fix these audit findings:\n${audit.text}\n\nOriginal task: ${task}`,
{ allowedTools: ["Read", "Write", "Edit", "Bash", "Glob", "Grep"] }
);
// Re-audit the fixes
const reaudit = await claude(
`Re-audit after fixes:\n${fix.text}`,
{ allowedTools: ["Read", "Glob", "Grep", "Bash"] }
);
return { build: fix, audit: reaudit };
}
return { build, audit };
}
Use MCP servers to share team knowledge:
{
"mcpServers": {
"team-knowledge": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-memory"],
"env": {
"MEMORY_FILE": "/shared/team-knowledge.json"
}
}
}
}
| Pattern | Typical Cost | When to Use |
|---|---|---|
| Single agent | ~50k tokens | Simple, single-file changes |
| 2 subagents | ~100-200k | Build + review |
| 3-4 subagents | ~200-400k | Pipeline or parallel work |
| Team (3-5) | ~250-500k | Multi-component features |
| Team (5-10) | ~500k-1M | Large-scale review/QA |
npm install -g @anthropic-ai/claude-codeexport ANTHROPIC_API_KEY="..."git clone ...pnpm installclaude /doctor.claude/rules/ for coding standards.claude/skills/ for available workflows# Verify everything works
claude -p "What build and test commands are available in this project?"
{
"permissions": {
"allow": [
"Read", "Glob", "Grep",
"Bash(npm test)", "Bash(npm run lint)"
],
"deny": [
"Bash(rm *)", "Bash(sudo *)",
"Bash(docker *)", "Bash(kubectl *)"
]
}
}
.env files (gitignored) for local secretsEnforce cleanup when subagents finish:
{
"hooks": {
"SubagentStop": [
{
"matcher": "",
"hooks": [{
"type": "command",
"command": "bash .claude/hooks/subagent-cleanup.sh"
}]
}
]
}
}