Drop-in agent team orchestration for Claude Code. Zero dependencies. Zero scripts.
A CLAUDE.md + .claude/ config that turns Claude Code's native Agent Teams into a
structured orchestration system with defined roles, model routing, and automated quality gates.
Before (this repo, old version): ~2,500 lines of TypeScript + Bash scripts reimplementing what Claude Code already provides natively.
Now: 3 config files, 320 lines total. Everything runs through Claude Code's built-in Agent Teams feature.
# Clone this repo
git clone https://github.com/Devgapperk/Claude-Code-Guide.git
# Copy the orchestration files into your project
cp Claude-Code-Guide/CLAUDE.md /path/to/your-project/
cp -r Claude-Code-Guide/.claude/ /path/to/your-project/cd /path/to/your-project
claudeTell Claude what to build:
Create an agent team to build user authentication.
Spawn an architect (opus), two engineers (sonnet), a validator (haiku), and a scribe (haiku).
Use delegate mode.
Claude reads CLAUDE.md, spawns teammates with the right prompts and models, creates the task list, and orchestrates.
your-project/
├── CLAUDE.md # Orchestration blueprint (loaded by all teammates)
└── .claude/
├── settings.json # Enables agent teams + permissions + hooks
└── hooks/
├── stop-loop-guard.sh # Detects Ralph Loops (agent spinning on same error)
├── task-completed.sh # Blocks task completion if tests/types fail
├── teammate-idle.sh # Prevents idle if uncommitted work exists
├── post-edit-verify.sh # Type-checks after every file edit (catches slop)
└── block-destructive.sh # Blocks rm -rf, force push, DROP TABLE
-
CLAUDE.md is auto-loaded by every teammate on spawn. It defines roles, model routing, anti-slop protocol, loop prevention rules, context window management, and conventions.
-
settings.json enables agent teams, pre-approves safe commands (test, lint, build, git), blocks dangerous ones (.env reads, rm -rf), and wires up 5 hooks across the full lifecycle.
-
Hooks enforce quality at every stage:
Hook Event What It Does stop-loop-guard.shStopScans transcript for repeated errors or retry language. If an agent hit the same error 3+ times or retried 4+ times, forces it to stop and report instead of burning more tokens. task-completed.shTaskCompletedRuns npm test+tsc --noEmit. Blocks completion if either fails. Teammate gets the error output and must fix it.teammate-idle.shTeammateIdleChecks for uncommitted changes. Keeps teammate working until they commit. post-edit-verify.shPostToolUse(Write/Edit)Type-checks after every .ts/.tsx file change. Catches hallucinated imports and wrong signatures on the first edit, not after 10 files of broken code. block-destructive.shPreToolUse(Bash)Blocks rm -rf,git push --force, andDROP TABLE.
| Role | Model | Purpose |
|---|---|---|
| Architect | Opus | Design, review, approve. Never writes code. |
| Engineer-Frontend | Sonnet | React, Tailwind, component tests |
| Engineer-Backend | Sonnet | Express, Drizzle, integration tests |
| Validator | Haiku | Runs tests, types, lint. Read-only. |
| Scribe | Haiku | Docs, CHANGELOG, decision records. |
Only spawn what the task needs. A bug fix might only need 2 engineers + validator.
| Action | Key |
|---|---|
| Cycle teammates | Shift+Up / Shift+Down |
| Delegate mode (lead coordinates only) | Shift+Tab |
| Task list | Ctrl+T |
| Message teammate | Select + type |
| Split pane mode | Set "teammateMode": "tmux" in settings |
Full feature:
Create an agent team to build [feature]. Spawn architect (opus), frontend
engineer (sonnet), backend engineer (sonnet), validator (haiku), scribe (haiku).
Require plan approval for the architect. Use delegate mode.
Parallel code review:
Create an agent team to review PR #142. Three reviewers: security, performance,
test coverage. Have them report independently.
Bug investigation:
Users report [symptom]. Create a team with 4 teammates investigating competing
hypotheses. Have them challenge each other's theories.
| Model | Input / Output per M tokens | When to Use |
|---|---|---|
| Opus | $15 / $75 | Architecture, security, compliance |
| Sonnet | $3 / $15 | Implementation (default) |
| Haiku | $0.25 / $1.25 | Validation, docs, boilerplate |
- Claude Code CLI
jq(used by hook scripts)- Git
No npm install. No build step. No runtime dependencies.
Built by DevGap. Orchestrated with Kleiber. Powered by Claude.