plugins/claude-code-expert/skills/teams-collaboration/SKILL.md
# Claude Code Teams & Collaboration Complete guide to team features, multi-user workflows, and organizational settings. ## Team Plans ### Overview Claude Code supports team/organizational plans that provide: - Shared billing and usage tracking - Managed settings and policies - Centralized API key management - Team member management - Usage analytics and reporting ### Organization Setup ```bash # Login with organization credentials claude auth login # Check organization status claude config
npx skillsauth add markus41/claude plugins/claude-code-expert/skills/teams-collaborationInstall 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.
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"
}]
}
]
}
}
development
Enhanced plan-authoring skill with Pre-Writing context gathering, task metadata, non-TDD templates, Red Flags, telemetry, and an automated plan linter. Use when you have a spec or requirements for a multi-step task, before touching code.
tools
Documentation intelligence engine with graph-based API docs, algorithm library, and drift detection
tools
Ultraplan cloud planning — kick off a plan in the cloud from your terminal, review and revise in the browser, then execute remotely or send back to CLI
tools
--- name: mcp description: Configure MCP servers for Claude Code — stdio vs HTTP, authentication, Tools/Resources/Prompts distinction, channels (CI webhook, mobile relay, Discord bridge, fakechat), and cost of always-loaded tools. Use this skill whenever adding an MCP server, debugging connection issues, choosing between MCP Tools vs Prompts vs Resources, installing channel servers, or managing .mcp.json. Triggers on: "MCP server", "mcp config", "add Obsidian MCP", "install context7", "channels"