These pages document master, which is unreleased and in development. The Quick Start installs the latest stable release; anything newer than that tag is marked in the text.
Claude Code Project Configuration Guide
Overview
Section titled βOverviewβThis system gives you templated CLAUDE.md configurations for different project types, each with a built-in Agent Team β specialized roles that Claude uses to delegate work via sub-agents. The enhanced launcher script manages per-project Claude sessions, using cmux on macOS and tmux elsewhere.
Files included:
| File | Purpose |
|---|---|
claude-setup.sh |
One-time setup β creates ~/.claude/templates/ with Agent Team configs |
claude-code |
Enhanced launcher β manages sessions via cmux or tmux |
Installation (One-Time)
Section titled βInstallation (One-Time)β# 1. Make both scripts executablechmod +x claude-setup.sh claude-code
# 2. Run setup (creates all templates in ~/.claude/templates/)./claude-setup.sh
# 3. Verifyclaude-code listAfter setup, your ~/.claude/ directory looks like:
~/.claude/βββ CLAUDE.md # Global config + Agent Team Protocolβββ templates/β βββ ml-rag/ # 5 agents: Lead, RAG Eng, Graph Eng, Data Analyst, QAβ β βββ CLAUDE.mdβ β βββ commands/β β βββ eval.mdβ β βββ ingest.mdβ β βββ team-review.mdβ βββ ml-app/ # 5 agents: Lead, Backend Dev, Frontend Dev, ML/AI Eng, QAβ β βββ CLAUDE.mdβ β βββ commands/β β βββ bench.mdβ β βββ providers.mdβ β βββ team-review.mdβ βββ ml-utils/ # 5 agents: Lead, MCP Eng, Retrieval Eng, Storage Eng, QAβ β βββ CLAUDE.mdβ β βββ commands/β β βββ eval.mdβ β βββ mcp-test.mdβ β βββ team-review.mdβ βββ ml-langchain/ # 4 agents: Lead, Agent Dev, Integration Eng, QAβ β βββ CLAUDE.mdβ β βββ commands/β β βββ trace.mdβ β βββ team-review.mdβ βββ ml-n8n/ # 4 agents: Lead, Workflow Designer, Python Dev, QA/DevOpsβ β βββ CLAUDE.mdβ β βββ commands/β β βββ export-workflows.mdβ β βββ team-review.mdβ βββ java-enterprise/ # 6 agents: Lead, Java Dev, Frontend Dev, Data/Msg Eng, QA, DevOpsβ β βββ CLAUDE.mdβ β βββ commands/β β βββ build.mdβ β βββ new-module.mdβ β βββ db-migrate.mdβ β βββ team-review.mdβ β βββ new-feature.mdβ βββ web-static/ # 4 agents: Lead, Frontend Dev, Content/SEO, QAβ β βββ CLAUDE.mdβ β βββ commands/β β βββ team-review.mdβ βββ web-dynamic/ # 5 agents: Lead, Frontend Dev, Backend Dev, QA, DevOpsβ β βββ CLAUDE.mdβ β βββ commands/β β βββ db-migrate.mdβ β βββ team-review.mdβ β βββ new-feature.mdβ βββ java-tooling/ # 5 agents: Lead, APT Eng, MCP Specialist, Plugin Dev, QAβ βββ CLAUDE.mdβ βββ commands/β βββ build.mdβ βββ generate-and-verify.mdβ βββ new-annotation.mdβ βββ new-generator.mdβ βββ team-review.mdβββ settings.json # Your global Claude settings (if any)Workflow 1: New Terminal + New Project
Section titled βWorkflow 1: New Terminal + New ProjectβWhen starting a brand-new project from scratch.
Example: New ML RAG project
Section titled βExample: New ML RAG projectβ# Step 1: Initialize project with templateclaude-code init ml-rag ~/projects/medical-rag
# What this does:# - Creates ~/projects/medical-rag/ (if it doesn't exist)# - Copies ml-rag template CLAUDE.md β ~/projects/medical-rag/CLAUDE.md# - Copies commands β ~/projects/medical-rag/.claude/commands/
# Step 2: Customize the CLAUDE.md for this specific project# Open ~/projects/medical-rag/CLAUDE.md# Look for β UPDATE comments and fill in your choices:# - Vector store: Qdrant# - Embeddings: OpenAI text-embedding-3-large# - LLM: Claude 3.5 Sonnet via Anthropic API# - etc.
# Step 3: Start Claude sessionclaude-code ~/projects/medical-rag
# This creates tmux session "claude-medical-rag" in that directory.# Claude reads: ~/.claude/CLAUDE.md (global) + ./CLAUDE.md (project)Example: New Java Enterprise project
Section titled βExample: New Java Enterprise projectβ# Initializeclaude-code init java-enterprise ~/projects/order-service
# Customize CLAUDE.md:# - Databases: PostgreSQL + Redis (no MongoDB for this one)# - Messaging: Kafka only (no RabbitMQ)# - Frontend: React + MUI# - etc.
# Startclaude-code ~/projects/order-service
# Now inside Claude, you also get custom slash commands:# /project:build β full build + test# /project:new-module β scaffold new bounded context# /project:db-migrate β create + apply DB migrationExample: New dynamic web app
Section titled βExample: New dynamic web appβclaude-code init web-dynamic ~/projects/saas-dashboard# Customize, then:claude-code ~/projects/saas-dashboardWorkflow 2: New Terminal + Existing Project
Section titled βWorkflow 2: New Terminal + Existing ProjectβWhen returning to a project that already has CLAUDE.md configured.
# Option A: Start new session (if tmux session doesn't exist)claude-code ~/projects/order-service# Creates tmux session "claude-order-service" and starts Claude
# Option B: Resume existing session (if already running)claude-code ~/projects/order-service# Detects existing tmux session and attaches to it
# Option C: From project directorycd ~/projects/order-serviceclaude-code# Uses current directory; creates/attaches session "claude-order-service"What Claude sees when it starts:
Section titled βWhat Claude sees when it starts:βClaude Code automatically reads these files (in this order):
~/.claude/CLAUDE.mdβ your global preferences (coding style, git conventions, communication style)./CLAUDE.mdβ project-specific rules (stack, architecture, conventions, commands)./.claude/commands/*.mdβ custom slash commands available via/project:name
The global file provides your universal baseline. The project file provides specifics. They combine β you donβt repeat yourself.
Template Reference
Section titled βTemplate ReferenceβAvailable Templates
Section titled βAvailable Templatesβ| Template | Use When | Key Features |
|---|---|---|
ml-rag |
Building RAG pipelines with knowledge graphs | Vector + graph hybrid search, eval harnesses, chunking rules |
ml-app |
Full-stack LLM applications | Clean Architecture, protocol-based LLM abstraction, strategy pattern, Next.js frontend |
ml-utils |
Headless Python utility / MCP tool server | MCP-first, ports-and-adapters, hybrid retrieval, pluggable vector stores |
ml-langchain |
LangChain/LangGraph agent workflows | LangGraph state machines, LangSmith tracing, agent patterns |
ml-n8n |
n8n-based workflow automation | Workflow JSON versioning, Python microservice integration |
java-enterprise |
Full-stack Java with messaging + caching | Hexagonal architecture, Kafka/RabbitMQ, GraphQL schema-first |
java-tooling |
Java annotation processors, Gradle plugins, code generators | JSR 269, JavaPoet, Spring AI MCP, multi-module Gradle |
web-static |
Static marketing/blog sites | Content-first, SEO, performance budgets |
web-dynamic |
Full-stack web apps | Next.js App Router, Prisma, auth, mobile-responsive |
Customization Points
Section titled βCustomization PointsβEvery template has β UPDATE comments marking values you should change per project. Common ones:
- Database choice (PostgreSQL vs MySQL vs MongoDB)
- LLM provider and model
- Frontend component library
- Deployment target
- Serialization format (Avro vs Protobuf vs JSON)
Model & Effort Strategy
Section titled βModel & Effort StrategyβThe agent team is NOT used for every phase. Planning, building, and reviewing each require a different configuration:
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ PLAN β BUILD β REVIEW ββ β β ββ Opus / High β Sonnet / Medium β Opus / High ββ Team Lead β Team Lead delegates to β Team Lead alone ββ works ALONE β specialist sub-agents β reviews all outputββ β β ββ Architecture, β Implementation from β Integration check,ββ API design, β the approved plan. β convention audit, ββ data models, β Upgrade to Opus for β final sign-off ββ trade-offs β auth/security/complex β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β Quick tasks (rename, format, boilerplate): Haiku / Low effortWhy no delegation during planning? Sub-agents only see what the Team Lead passes them. Planning requires seeing the full architecture β trade-offs across frontend, backend, data, and infra simultaneously. Fragmenting that into specialist perspectives produces plans that donβt cohere.
Why delegation during building? Once the plan is locked, each task is well-scoped to a single domain. A Backend Developer sub-agent implementing Prisma models from a clear spec doesnβt need to see the React component tree.
Agent Teams β How They Work
Section titled βAgent Teams β How They WorkβEvery template includes an Agent Team section in its CLAUDE.md. This tells Claude to operate as a team lead who delegates specialized work to sub-agents during the build phase.
The Full Workflow
Section titled βThe Full WorkflowβPLANNING PHASE (Team Lead alone, Opus, high effort) β β "Design the order management feature" β β Thinks holistically about architecture β β Produces: API contracts, data model, component tree, test plan β βΌBUILDING PHASE (Team delegates, Sonnet, medium effort) β β Team Lead decomposes the plan into domain-specific tasks: β ββββ Backend Dev: Prisma schema + tRPC routes ββββ Frontend Dev: React pages + components ββββ QA Engineer: tests at every layer β β Each sub-agent gets: role prompt + plan context + specific task β Team Lead reviews each output before continuing β βΌREVIEW PHASE (Team Lead alone, Opus, high effort) β β Reviews all combined output holistically β Checks cross-domain consistency, conventions, integrationWhen Does Delegation Happen?
Section titled βWhen Does Delegation Happen?βOnly during the build phase. The Team Lead uses these rules:
- Handle directly: planning, review, single-file changes, simple tasks, general questions
- Delegate: multi-file specialist work (>50 lines), cross-domain features, evaluations
- Coordinate: features that touch multiple domains (e.g., new DB table + API + UI)
Team Compositions Per Template
Section titled βTeam Compositions Per Templateβ| Template | Team Lead (default) | Specialists |
|---|---|---|
| ml-rag | Team Lead | RAG Engineer, Knowledge Graph Engineer, Data Analyst, QA Engineer |
| ml-app | Team Lead | Backend Dev, Frontend Dev, ML/AI Engineer, QA Engineer |
| ml-utils | Team Lead | MCP Engineer, Retrieval Engineer, Storage Engineer, QA Engineer |
| ml-langchain | Team Lead | Agent Developer, Integration Engineer, QA & Eval Engineer |
| ml-n8n | Team Lead | Workflow Designer, Python Developer, QA & DevOps Engineer |
| java-enterprise | Team Lead / Architect | Java Backend Dev, Frontend Dev, Data & Messaging Eng, QA, DevOps |
| java-tooling | Team Lead | APT Engineer, MCP Specialist, Plugin Dev, QA Engineer |
| web-static | Team Lead | Frontend Developer, Content & SEO Specialist, QA Engineer |
| web-dynamic | Team Lead / Architect | Frontend Dev, Backend Dev, QA Engineer, DevOps |
Team Slash Commands
Section titled βTeam Slash CommandsβEvery template includes /project:team-review β triggers all team roles to review recent changes in sequence. The java-enterprise and web-dynamic templates also include /project:new-feature for end-to-end feature implementation with coordinated delegation.
Customizing Your Team
Section titled βCustomizing Your TeamβAfter claude-code init, you can edit the Agent Team section in your projectβs CLAUDE.md:
- Add a role: copy an existing role block and modify expertise/constraints
- Remove a role: delete the block (Team Lead will handle those tasks directly)
- Adjust triggers: change when delegation happens (e.g., raise/lower the 50-line threshold)
- Refine constraints: add project-specific rules to any role
How Configuration Layers Work
Section titled βHow Configuration Layers Workβββββββββββββββββββββββββββββββββββββββββββββββββββββββββ Claude's Behavior ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€β 4. Custom Commands (.claude/commands/) β β "recipes" for tasksβ 3. Agent Team (in ./CLAUDE.md) β β "who does what?"β 2. Project CLAUDE.md (./CLAUDE.md) β β "how does THIS project work?"β 1. Global CLAUDE.md (~/.claude/CLAUDE.md) β β "how do I generally code?"βββββββββββββββββββββββββββββββββββββββββββββββββββββββLayer 1 β Global: Your universal coding standards, git conventions, communication preferences, and the Agent Team Protocol (how delegation works). Written once, applies everywhere.
Layer 2 β Project: Stack-specific rules, architecture constraints, naming conventions, testing requirements. Written per project (from template, then customized).
Layer 3 β Agent Team: Role definitions, expertise areas, ownership boundaries, and delegation prompts. Tells Claude when to work directly vs. spawn specialist sub-agents.
Layer 4 β Commands: Task-specific instructions Claude can execute on demand. Includes team-wide operations like team-review and new-feature.
Keep CLAUDE.md focused
Section titled βKeep CLAUDE.md focusedβLong CLAUDE.md files waste Claudeβs context window. Aim for 50-100 lines per file. If you need more detail, put it in separate docs and reference them: βSee docs/architecture.md for full system design.β
Evolve templates over time
Section titled βEvolve templates over timeβAfter using a template on a few projects, youβll discover missing conventions. Update the template in ~/.claude/templates/ so future projects benefit.
Add project-specific commands
Section titled βAdd project-specific commandsβAs you work on a project, create new .claude/commands/ files for repetitive tasks:
# Example: create a new command for your order-service projectcat > ~/projects/order-service/.claude/commands/deploy-staging.md << 'CMD'Deploy to staging:1. Run full build and test suite2. Build Docker image with tag staging-{date}3. Push to container registry4. Apply k8s manifests from infra/k8s/staging/5. Wait for rollout to complete6. Run smoke tests against staging URLCMDSession management (token efficiency)
Section titled βSession management (token efficiency)βClaude Code accumulates context over a conversation. Left unchecked, this bloats token usage and degrades quality. Three habits keep it tight:
One task per session. If you finish a feature and pivot to something unrelated (e.g., API design β test refactoring), start a fresh session. The launcherβs per-project tmux sessions help β but even within a project, /clear resets context when you shift focus.
Compact at boundaries. When you finish a logical unit of work (a feature, a bug fix, a migration), run /compact with a focus hint:
/compact Summarize recent work focusing on the Kafka consumer changesThis compresses the conversation history into a tight summary, freeing context for the next task.
Point to files, donβt paste. Instead of dumping code into the chat, tell Claude which files to read:
Read src/api/users.ts and generate tests for its exported functions.Claude loads only whatβs needed rather than carrying everything in context.
Permission patterns
Section titled βPermission patternsβConfigure /permissions to reduce confirmation prompts. See permissions-guide.md for per-stack Allow/Deny patterns.
Multiple Claude sessions
Section titled βMultiple Claude sessionsβThe launcher creates separate tmux sessions per project directory. You can have multiple running:
# Terminal 1claude-code ~/projects/order-service # β tmux session: claude-order-service
# Terminal 2claude-code ~/projects/medical-rag # β tmux session: claude-medical-rag
# List all sessionstmux list-sessionsOutput Styles
Section titled βOutput StylesβOutput styles modify Claude Codeβs system prompt to change how it responds. They go beyond verbosity β they can fundamentally change the interaction model.
Built-in styles
Section titled βBuilt-in stylesβ| Style | Behavior | Best for |
|---|---|---|
| Default | Standard software engineering assistant β concise, code-focused | Everyday development, build phase, experienced users |
| Explanatory | Adds educational βInsightsβ between coding tasks explaining implementation choices and codebase patterns | Plan/review phases, onboarding to a new codebase, architecture decisions |
| Learning | Collaborative learn-by-doing β shares insights AND asks you to write small pieces of code yourself via TODO(human) markers |
Coaching, pair programming, learning a new stack |
How to configure
Section titled βHow to configureβ- Run
/output-styleto select from a menu (also accessible via/config) - Run
/output-style explanatoryto switch directly - Setting is saved per-project in
.claude/settings.local.json - Can also set
"outputStyle": "Explanatory"in any settings file
Custom output styles
Section titled βCustom output stylesβCreate a Markdown file in ~/.claude/output-styles/ (user-level) or .claude/output-styles/ (project-level):
---name: My Custom Styledescription: Brief description shown in /output-style menukeep-coding-instructions: true---
# Custom Instructions
Your instructions here β these replace the default system prompt(unless keep-coding-instructions is true).Set keep-coding-instructions: true to retain Claude Codeβs software engineering behavior alongside your custom instructions. Without it, the coding-specific parts of the system prompt are removed β useful for non-engineering agents.
Phase recommendations
Section titled βPhase recommendationsβ- Plan / Review: Use Explanatory β you want reasoning, trade-offs, and codebase pattern insights visible
- Build: Use Default β faster iteration, less noise in context window
- Onboarding: Use Learning β builds understanding of unfamiliar code through guided participation
Launcher Command Reference
Section titled βLauncher Command Referenceβclaude-code [path] Start/resume Claude session (default: current dir)claude-code init <type> [path] Initialize project from templateclaude-code sync [path] [--dry-run] Sync project against its templateclaude-code list List available templatesclaude-code help Show full usageTemplate Sync
Section titled βTemplate SyncβAfter updating templates (claude-setup.sh --sync), use claude-code sync to propagate changes to existing projects:
claude-code sync --dry-run # preview changes in current directoryclaude-code sync ~/projects/my-app # apply sync to a specific projectSync updates commands and .claude/ contents (e.g. remediation.json) but never overwrites CLAUDE.md β it shows a diff for manual review. Projects track their template in .claude/template.json; older projects without this file are matched by their CLAUDE.md heading.