| theme | seriph | ||||||
|---|---|---|---|---|---|---|---|
| background | https://images.unsplash.com/photo-1555066931-4365d14bab8c?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80 | ||||||
| addons |
|
||||||
| class | text-center | ||||||
| highlighter | shiki | ||||||
| lineNumbers | false | ||||||
| info | ## Claude Code Training By Kenneth Kousen Learn more at [KouseniT](https://kousenit.com) | ||||||
| drawings |
|
||||||
| transition | slide-left | ||||||
| title | Claude Code Training | ||||||
| mdc | true | ||||||
| slidev |
|
||||||
| css | unocss |
Ken Kousen
Kousen IT, Inc.
- ken.kousen@kousenit.com
- http://www.kousenit.com
- http://kousenit.org (blog)
- Social Media:
- @kenkousen (twitter)
- @kenkousen@foojay.social (mastodon)
- @kousenit.com (bluesky)
- Tales from the jar side (free newsletter)
- Duration: 5 hours of hands-on learning
- Format: Instructor-led with multiple labs
- Hands-on Labs: Real codebases in Python, JavaScript, Java
- Prerequisites: Command-line experience, development background
- Foundation: Installation, surfaces, CLI basics, code exploration
- Core Skills: Testing, documentation, git operations
- Customization: CLAUDE.md, skills, hooks, output styles
- Extensibility: Plugins, MCP integration
- Advanced: Effort Levels, Plan Mode, Code Review, Subagents, Agent Teams, Dynamic Workflows, SDKs
- AI development tool across 5 primary surfaces (CLI, VS Code, JetBrains, Desktop, Web) plus integrations (Slack, Chrome, iOS, GitHub Actions, GitLab CI/CD)
- Context-aware codebase understanding
- Autonomous, collaborative, and multi-agent modes
- Multi-language support with LSP code intelligence
- Integrated git operations
- Extensible: Skills, Plugins, MCP, Hooks
layout: image-right image: https://images.unsplash.com/photo-1551288049-bebda4e38f71?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80 backgroundSize: cover
- CLI (Terminal) — Full-featured, primary interface
- VS Code Extension — Inline diffs, @-mentions, plan review
- JetBrains Plugin — IntelliJ, PyCharm, WebStorm
- Desktop App — Native Mac/Windows with visual diffs, scheduling, connectors
- Web (claude.ai/code) — Browser-based, no local setup required
Local surfaces share: settings, CLAUDE.md, MCP servers, skills, and hooks. Web sessions only inherit repo-committed config — not user-level ~/.claude settings.
- Three tabs: Chat (general), Cowork (background agent), Code (interactive coding)
- Visual diff review with inline comments and "Review code" button
- Live app preview with embedded browser and auto-verify
- Scheduled tasks — persistent, local, survives restarts
- Connectors — GitHub, Slack, Linear, Notion, Google Calendar
- Computer use (research preview) — Claude controls screen on macOS/Windows
- Parallel sessions with automatic git worktree isolation
- claude.ai/code — Run tasks on Anthropic cloud infrastructure
--cloudflag: Start a web session from CLI:claude --cloud "Fix the auth bug"- Diff view: Review changes file-by-file before creating PRs
- Auto-fix PRs: Claude responds to CI failures and review comments automatically
- Caveat: Replies post under your account — may trigger automation (Atlantis, Actions)
/teleport: Pull web sessions back to your local terminal- Setup: Connect GitHub, install Claude GitHub App, select environment
- Also accessible from Claude iOS and Android apps
- Slack — invoke Claude Code in channels and threads
- Chrome extension — page-aware assistance in the browser
- iOS app — read sessions, dispatch work, review diffs from your phone
- GitHub Actions —
anthropics/claude-code-actionfor PR reviews, auto-fix, scripted workflows - GitLab CI/CD — official integration for pipelines
- No clean handoff from Desktop Code tab back to terminal as of writing — plan accordingly
Surface handoff slash commands you'll meet again later:
/desktop(alias/app) — terminal → desktop Code tab (macOS / Windows)/teleport(alias/tp) — web → terminal/remote-control(alias/rc) — make terminal session controllable from claude.ai
- Send tasks from your phone to your Desktop app
- Dispatch routes dev tasks to Code tab, others to Cowork
- Push notification when done or needs approval
- Continue a running CLI session from phone or browser
claude --rcto start with Remote Control enabled/remote-controlto enable mid-session- Session runs locally — web/mobile is just a window into it
/code-reviewreviews the current diff — or a PR:/code-review <level> <pr#>(/reviewis an alias)- Effort dial: pass a level (
low…max); with none, it reuses the level you typed last - At
high,xhigh, andmaxthe review runs in a background agent — you keep working /code-review ultra: deep multi-agent review in the cloud (user-triggered, billed)- Claude no longer runs
/code-reviewor/verifyon its own — invoke them deliberately
# Review what you're about to commit
/code-review
# Deep review of a GitHub PR
/code-review xhigh 1234- One-line edits you already know how to make — typing is faster than prompting
- Highly regulated codebases without an enterprise plan + audit trail in place
- Tasks needing real-time human judgment (UX copy decisions, brand voice, legal review)
- Production incidents under time pressure — pair with a human, don't drive solo
- Learning a new language/framework — let the friction teach you first
- When you can't review the diff — if you won't read it, don't ship it
The right question isn't "can Claude do this?" — it's "will I understand what shipped?"
- Pro — $20/mo · Sonnet (current default model)
- Max — from $100/mo · 5x and 20x usage tiers · Sonnet or Opus
- Usage limits are shared across Claude and Claude Code and reset every 5 hours — exact numbers shift; check the support article below
- Team — shared seats, central billing, admin controls
- Enterprise — SSO, audit, custom retention, Bedrock / Vertex / Foundry routing
- Opus draws down usage faster than Sonnet — model choice affects how far a session goes
- API path: pre-paid credits via Console; auto-creates a "Claude Code" workspace for cost tracking
📖 Full details: Using Claude Code with your Pro or Max plan
| Tier | When to reach for it |
|---|---|
| Opus (top tier) | Architecture decisions, multi-file refactors, hard debugging, agent orchestration |
| Sonnet (default daily driver) | Most coding, exploration, doc generation |
| Haiku (fastest/cheapest) | Fast loops, batch operations, hooks, classifiers, cheap tool calls |
- Switch mid-conversation:
Alt+P/Option+P, or/model(presssfor this session only,dto set the default for new sessions) - Set per session at launch:
claude --model opus - Effort levels (
/effort low\|medium\|high\|xhigh\|max) are orthogonal — control depth on whichever model you picked
Run /model to see what's current — the lineup advances often (Opus 5 — 1M context — is the default Opus as of this writing, with the Fable family above it; the current Opus defaults to high effort).
Rule of thumb: Sonnet first. Reach for Opus when you've already failed once on Sonnet, not preemptively.
Three first-class providers for enterprises that need their own infrastructure:
- AWS Bedrock —
CLAUDE_CODE_USE_BEDROCK=1 - Google Vertex AI —
CLAUDE_CODE_USE_VERTEX=1 - Microsoft Foundry —
CLAUDE_CODE_USE_FOUNDRY=1
opus, sonnet) often resolve to a previous-generation model on all three providers, lagging the latest by a version.
Don't rely on the alias if you need the newest model — pin an explicit version ID and check your provider's model catalog for the exact string:
ANTHROPIC_MODEL=claude-opus-5 # explicit version, not the bare "opus" alias
ANTHROPIC_MODEL=claude-sonnet-5 # explicit version, not the bare "sonnet" aliasAuth via the cloud provider's IAM, not an Anthropic API key. LLM gateway pattern: ANTHROPIC_BASE_URL + CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1.
Softer alternative: ANTHROPIC_DEFAULT_MODEL sets where new sessions start, while a /model pick still overrides it and persists — most teams want this, not the hard ANTHROPIC_MODEL pin.
- Recommended (macOS / Linux / WSL): native installer, auto-updates
curl -fsSL https://claude.ai/install.sh | bash - Homebrew (macOS):
brew install --cask claude-code(manual upgrade) - WinGet (Windows):
winget install Anthropic.ClaudeCode(manual upgrade) - Linux packages:
apt,dnf,apkfor Debian / Fedora / RHEL / Alpine - Advanced (legacy):
npm install -g @anthropic-ai/claude-code - Verify:
claude --version
The claude binary is itself native — npm is no longer the primary path.
- Start from nothing: Empty directory + idea = working application
- Iterative development: Concept → foundation → enhancements
- Full-stack creation: UI, logic, styling, tests in one session
- Real example: Our
lyrics-trainerexercise started exactly this way
mkdir my-project && cd my-project && git init
claude
"Create a web app that displays song lyrics one line at a time
with Next, Previous, and Play buttons"- Manual Mode (the default) - Interactive conversation; prompts before actions
- Auto-Accept Mode (Shift+Tab) - Autonomous execution
- Plan Mode (
/planor cycle withShift+Tab) - Review plans before execution - Auto Mode - Safety classifier eliminates permission prompts (opt-in)
- Effort levels:
/effort low|medium|high|xhigh|maxto control reasoning depth - Model switch:
Alt+P/Option+P, or/model, to change models mid-conversation
layout: image-right image: https://images.unsplash.com/photo-1517077304055-6e89abbf09b0?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80 backgroundSize: cover
- Find files, functions, patterns
- Understand system architecture
- Trace dependencies
- Identify frameworks
- Reference specific files with
@path/to/file.java
"Analyze the UserService class"
"Explain @src/main/java/com/example/UserController.java"
"How does @pom.xml configure Spring Boot?"- Unit test creation
- Edge case identification
- Integration tests
- Mock object setup
"Create unit tests for the UserService"
"Add tests for error scenarios""Convert all callbacks in @src/api/ to async/await"
"Replace the manual JSON parsing with Jackson annotations""Generate JavaDoc for every public method in UserService"
"Write a README.md from the current package.json scripts and folder layout""Here's the stack trace — trace it back to the root cause and propose a fix"
"@logs/2026-05-08.log shows three different errors. Group them by likely cause."Pattern: name the file or symbol, state the outcome, and let Claude pick the steps.
layout: image-right image: https://images.unsplash.com/photo-1556075798-4825dfaaf498?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80
- Commit message generation
- Branch management
- Merge conflict resolution
- Pull request creation
"Commit these changes with an appropriate message"
"Create a pull request for this feature"- Batch operations: Call multiple tools in single response
- Parallel execution: Run git status + diff + log simultaneously
- Performance optimization: Reduces round-trips
- Complex workflows: Chain dependent operations
# Parallel git operations
"Show me git status, recent commits, and current diff"
# Multi-file analysis
"Check all test files and their coverage simultaneously"💡 Pro tip: Request "in parallel" for faster execution
layout: image-left image: https://images.unsplash.com/photo-1454165804606-c3d57bc86b40?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80 backgroundSize: cover
- Project memory:
./CLAUDE.md(shared with team) - User memory:
~/.claude/CLAUDE.md(personal preferences) - Rules directory:
.claude/rules/for organized project rules - Auto-discovered up directory tree
- Quick add: Start input with
#to add memory - Automatic memory: Claude records and recalls across sessions
- Commands:
/memoryto edit,/initto bootstrap - Import files: Use
@path/to/importsyntax
AGENTS.mdis the convention for other tools (Codex, etc.)- Claude Code does NOT natively read
AGENTS.md— onlyCLAUDE.md(open issue #6235) - A repo with both files looks bilingual but is silently single-language to Claude Code
- Bridge pattern — reference
AGENTS.mdfromCLAUDE.mdso Claude Code picks it up:
# CLAUDE.md
…project-specific guidance for Claude Code…
## Cross-tool conventions
See @AGENTS.md for conventions shared with Codex and other agentic tools.- The
@import keeps a single source of truth without duplicating content
- Configure context display:
~/.claude/settings.jsonor/statusline - Shows git branch, status, working directory, custom info
- Keeps important context visible without asking
- Reduces repetitive status checks
{
"statusline": {
"items": [
{"type": "git_branch"},
{"type": "git_status"},
{"type": "cwd"},
{"type": "custom", "command": "node -v"}
]
}
}Perfect for teams wanting standardized context visibility
- Built-in —
/help,/clear,/compact,/init,/memory,/permissions,/code-review,/config,/plan,/login,/mcp, … (~30 and growing) - Custom (now merged into skills) —
.claude/commands/<name>.mdstill works; skills are the modern path - Skill-derived — any skill with
user-invocable: trueexposes/<skill-name> - Plugin-supplied — installed plugins contribute their own commands
- Discovery:
/helplists current commands;/completion as you type - Conflict rule: if a command and a skill share a name, the skill wins
- Scope: project (
.claude/) shares with team; user (~/.claude/) is personal
Don't memorize the catalog — it changes monthly. Learn the categories and let /help enumerate.
- Simple commands: Just a markdown file — no frontmatter needed
- Skills: Add YAML frontmatter for model, effort, tools, paths
- Use
$ARGUMENTSor$0,$1for dynamic content
# Quick command (lightweight)
mkdir -p .claude/commands
echo "Create service for $ARGUMENTS entity" > .claude/commands/service.md
# User-scoped command (personal, available across projects)
mkdir -p ~/.claude/commands
echo "Fix issue #$ARGUMENTS" > ~/.claude/commands/fix.md
# Usage: /service User or /fix 123Real-world example:
# ~/.claude/commands/docs.md
Update both the README.md and CLAUDE.md files as appropriate.
If either file does not exist, please create it. Generate the
CLAUDE.md file as though the user invoked the init task.- Event-driven workflow automation with four hook types:
- Command hooks: Run shell commands on events
- HTTP hooks: POST JSON to a URL endpoint
- Prompt hooks: Ask Claude for yes/no decisions
- Agent hooks: Spawn subagents to verify conditions
- Conditional hooks:
iffield filters when hooks run (permission rule syntax) - PreToolUse: Modify tool inputs, block dangerous operations
- Security controls: Validate and filter operations before they run
- Configuration:
~/.claude/settings.jsonor.claude/settings.json
{ "hooks": { "PreToolUse": [{
"type": "command", "command": "validate-edit.sh", "if": "Edit(**)"
}] } }{ "hooks": { "PreToolUse": [{
"type": "command", "command": "prettier --write $FILE", "if": "Write(**)"
}] } }{ "hooks": { "SessionEnd": [{
"type": "command", "command": "generate-session-report.sh"
}] } }Important: Treat hook feedback as user input — Claude adjusts if blocked.
- Session:
SessionStart,SessionEnd,InstructionsLoaded - Tools:
PreToolUse,PostToolUse,PermissionRequest,PermissionDenied - Teams:
TeammateIdle,TaskCreated,TaskCompleted - Files:
FileChanged,CwdChanged,WorktreeCreate,WorktreeRemove - Config:
ConfigChange,Notification - Context:
PreCompact,PostCompact - Output:
MessageDisplay— transform or hide assistant message text - MCP:
Elicitation,ElicitationResult - Agent-level hooks: Skills and agents define their own hooks in frontmatter
/keybindingscommand to configure keyboard shortcuts- Config file:
~/.claude/keybindings.json - Remap any action to preferred key combinations
chat:newlineaction for configurable multi-line input- Argument shorthand:
$0,$1in custom commands (not just$ARGUMENTS)
{
"chat:submit": "enter",
"chat:newline": "shift+enter",
"chat:switch_model": "alt+p",
"chat:open_external_editor": "ctrl+x ctrl+e"
}Key shortcuts: Ctrl+B (background), Ctrl+X Ctrl+K (kill agents), Ctrl+X Ctrl+E (external editor)
- Language Server Protocol integration for precise code navigation
- Go to definition: Jump to where symbols are defined
- Find references: Locate all usages across the codebase
- Hover info: Get type information and documentation
- Call hierarchy: Trace incoming and outgoing calls
- Workspace symbols: Search for symbols across the project
- Works with any configured LSP server (TypeScript, Java, Python, etc.)
- Modify the system prompt to set role, tone, and format — not what Claude knows
- Built-in styles: Default, Concise, Explanatory, Learning
- Custom styles: Create your own in
~/.claude/output-styles/(user) or.claude/output-styles/(project) - Use cases:
- Onboarding new team members (Explanatory)
- Pair-programming and teaching (Learning — drops
TODO(human)markers for you to fill in) - Custom registers for code review, production work, etc.
- For project-specific guidance (conventions, codebase facts), use
CLAUDE.mdinstead
- Default: Standard software-engineering system prompt
- Concise: Leads with results, skips preamble and narration — same thoroughness
- Explanatory: Adds educational "Insights" between coding steps
- Learning: Collaborative learn-by-doing — Claude inserts
TODO(human)markers for you to implement - Switch via
/config→ select Output style from the menu - Or edit
outputStyledirectly in.claude/settings.local.json:
{ "outputStyle": "Explanatory" }- Changes take effect on the next session (the system prompt is fixed at session start so prompt caching stays warm)
Create ~/.claude/output-styles/production.md:
---
name: Production
description: Concise output for experienced developers
---
# Instructions for Claude
- Be concise and action-focused
- Skip explanations unless asked
- Show code without lengthy preambles
- Assume expert-level knowledgeThen run /config → Output style and pick Production. Start a new session for the change to apply.
--continue: Automatically resume most recent conversation--resume: Interactive picker showing conversation history with timestamps and message counts- Full history restored: Complete message context maintained (even hundreds of messages)
- Original settings preserved: Model and configuration retained
- Stored locally: Complete conversation database maintained on your machine
# Continue most recent conversation
claude --continue
# Show conversation picker with details
claude --resume
# Continue with new prompt
claude --continue --print "Continue with my task"layout: image-right image: https://images.unsplash.com/photo-1586953208448-b95a79798f07?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80
- Drag and drop images into Claude Code window
- Copy/paste with
Ctrl+V(notCmd+Veven on a Mac!) - Provide file path: "Analyze this image:
/path/to/screenshot.png" - Analyze UI designs, error screenshots, diagrams
- Generate code from visual mockups
- Debug visual issues and layouts
# Common image workflows
"Analyze this error screenshot and suggest fixes"
"Generate HTML/CSS for this UI mockup"
"Explain what this diagram shows"
"Convert this whiteboard sketch to code"- Read .ipynb files with full cell outputs
- Analyze notebooks: Code, markdown, and visualizations
- Edit notebook cells: Use NotebookEdit tool
- Data analysis workflows: Process datasets and results
- Visualization understanding: Interpret charts and graphs
"Analyze this Jupyter notebook and explain the data pipeline"
"Add error handling to the data processing cells"
"Convert this notebook to a production Python script"layout: image-right image: https://images.unsplash.com/photo-1451187580459-43490279c0fa?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80 backgroundSize: cover
Before you build anything, name what you're building:
| If... | You have a... | Lives at |
|---|---|---|
| The work happens once | Prompt | the conversation |
| Work repeats the same way each time | Skill | .claude/skills/<name>/SKILL.md |
| A coherent suite needs to ship | Plugin | <plugin>/.claude-plugin/plugin.json |
| The agent needs live access to a system | MCP server | .mcp.json (or inside a plugin) |
| A step must be deterministic | Hook | settings.json (or plugin hooks/) |
Most installable capabilities are single skills. Plugins typically bundle a coherent suite from one author — document-skills ships ~16 skills (xlsx, pdf, docx, pptx…); autoresearch ships ~10.
📖 Full vocabulary in glossary.md at the repository root.
- Modular capabilities that extend Claude's functionality beyond the base model
- Unified with slash commands (v2.1): Skills and commands merged into one system
- Three-tier loading system for efficiency:
- Metadata (always loaded): Name and description (~100 tokens)
- Instructions (triggered): Main SKILL.md with procedures
- Resources (on-demand): Scripts, templates, reference files
- Hot-reload: Edit SKILL.md and changes take effect immediately
- Automatic activation when contextually relevant
- Progressive disclosure: Load only what's needed for each task
Anthropic provides four production-ready Agent Skills:
- 📊 Excel (xlsx): Build spreadsheets, generate reports with charts
- 📄 Word (docx): Create and format professional documents
- 📽️ PowerPoint (pptx): Create and edit presentations
- 📑 PDF (pdf): Generate formatted PDF documents and reports
Usage: These skills activate automatically when you reference relevant file types or request document creation
# Skills activate automatically
"Create a quarterly report spreadsheet with sales data"
"Generate a PDF proposal document with our company branding"
"Build a presentation deck for the product launch"~/.claude/skills/my-skill/
├── SKILL.md # Required: YAML frontmatter + instructions
├── templates/ # Optional: reusable templates
├── scripts/ # Optional: helper scripts
└── reference/ # Optional: docs, schemas
Frontmatter options: effort, context: fork, paths, shell, model
---
name: Java Spring Generator
description: Generate Spring Boot components
effort: high
paths:
- "src/**/*.java"
---
# Instructions
When generating Spring Boot code:
1. Use constructor injection, not @Autowired
2. Follow controller/service/repository packages
3. Include JavaDoc
4. Generate tests with @SpringBootTest- Plugin system (v2.0.12+) provides installable packages of commands, agents, hooks, and MCP servers
- Plugin marketplace: Discover and share team workflows
- Repository-level config:
extraKnownMarketplacesfor enterprise control - Management commands:
/plugin install <name>- Install from marketplace/plugin enable/disable <name>- Control active plugins/plugin marketplace- Browse available plugins/plugin list- View installed plugins
- Standardize code generation across teams
- Enforce security review processes
- Automate compliance documentation
- Integrate with internal tools and APIs
- Share custom commands and agents
- Distribute MCP server configurations
- Onboard new team members faster
# Install company's internal plugin
/plugin install acme-corp-standards
# Plugin provides:
# - Slash commands for service generation
# - Security review hooks
# - MCP servers for internal APIs
# - Pre-configured output styleslayout: image-right image: https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80
/effort low|medium|high|xhigh|maxcontrols reasoning depth (picker labels: Faster ↔ Smarter)- Low: Fast responses for simple tasks
- Medium: Balanced reasoning
- High: Deep analysis for complex architecture (current Opus defaults here)
- xhigh: Very deep reasoning for hard tasks
- max: The ceiling — reserve for the hardest problems
- Keywords still work: "think", "think harder", "ultrathink"
- Can set in skill frontmatter:
effort: high
/effort high
# Or use keywords in your prompt
"Ultrathink about the best approach for implementing OAuth2"- Type
/planor cycle withShift+Tabto activate - Claude presents implementation plan before writing code
- Review strategy, approve, or modify approach
- Perfect for complex, multi-file changes
- Uses the Plan subagent behind the scenes
- Plan big work in the cloud:
claude --cloud "…", review from any surface,/teleportit back
- Autonomous agents that Claude launches for specialized tasks
- Dynamic selection: Claude chooses appropriate subagent automatically
- Model selection: Different subagents can use different models
- Built-in types:
- Plan: Strategic task decomposition and planning
- Explore: Fast codebase exploration and search
- General-purpose: Full read/write access for complex work
- Custom agents: Define in
.claude/agents/as markdown with YAML frontmatter- Specify:
model,tools,effort,hooks,permissionMode
- Specify:
- Background execution:
Ctrl+Bto background,Ctrl+X Ctrl+Kto kill - Worktree isolation:
isolation: "worktree"for safe parallel work
Claude launches subagents when tasks match specialized capabilities:
# Triggers Explore subagent (read-only, fast search)
"Find all API endpoints in this codebase"
"How does authentication work across the project?"
# Triggers Plan subagent
/plan or "Create a plan for adding OAuth"
# Triggers General-purpose subagent (full read/write)
"Generate comprehensive test coverage for UserService"
"Create API documentation for all REST endpoints"You don't manage this - Claude handles subagent selection automatically for optimal results
- Multi-agent orchestration: A lead agent coordinates multiple teammates
- Shared task list: Tasks with dependencies, ownership, and status tracking
- Independent context: Each teammate gets its own context window
- Inter-agent messaging: Direct messages, broadcasts, and shutdown coordination
- Automatic work distribution: Teammates self-claim tasks as they finish
# Enable teams (still gated by this env var)
export CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1
# Example prompt
"Create a team to refactor the auth module: one agent updates
the service layer, another updates tests, a third updates docs"With the env var set, every session already has one implicit team — no
TeamCreate step.
- Lead agent spawns teammates directly via the Agent tool's
nameparameter — the oldTeamCreate/TeamDeletetools were removed - Teammates work independently, report back, claim new tasks
- Messaging: continue a teammate with
SendMessage(relayed messages don't carry user authority — a security guardrail) - Idle state is normal: Teammates go idle between turns, wake on message
- Hook events:
TeammateIdle,TaskCompletedfor automation - Best for: Large refactors, multi-file features, parallel code + test work
Lead Agent ──→ creates tasks ──→ assigns teammates
↑ │
└── receives results ←─────────┘
(via shared task list + messages)
- Orchestrate tens to hundreds of background agents from a single request
- Deterministic control flow: loops, conditionals, fan-out, and pipelines decide what runs — not model improvisation
- Opt-in: include the keyword
ultracodein your prompt, or just ask Claude to "use a workflow" (the keyword was renamed fromworkflow→ultracode) - Runs in the background: keeps each agent's tool output out of your main context; you're notified when it completes
- View runs:
/workflows
Built for work one context can't hold: exhaustive multi-dimension code review, a migration swept across many files, or N independent design attempts scored against each other.
| Agent Teams | Dynamic Workflows | |
|---|---|---|
| Coordination | Model-driven — a lead agent decides | Script-driven — deterministic control flow |
| Best when | Work shape emerges as you go | You can describe the structure up front |
| Scale | A handful of teammates | Tens to hundreds of agents |
| Trigger | CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 + ask |
ultracode keyword / "use a workflow" |
- Both spend tokens at scale — reach for them on genuinely large, parallelizable work, not quick edits
- Run tasks while you keep working — your prompt stays free
Ctrl+Bto background a running agentCtrl+X Ctrl+Kto kill all background agents/batchskill: parallel changes across many files (uses worktrees under the hood)- Subagents can declare
isolation: "worktree"in frontmatter for safe parallel writes - See the Git Worktrees slide later for the worktree mechanics
- Named sessions:
/rename my-featurefor easy identification later - PR-linked sessions:
claude --from-pr 123resumes with PR context loaded - Session branching:
/branchto fork a conversation when you want to try two paths - Resume picker:
claude --resumeshows up to 50 recent sessions with timestamps - Continue last:
claude --continuejumps straight back into the most recent - Auto-memory: Claude records and recalls context across sessions
(Cross-surface handoffs — --remote, /teleport, /desktop, Dispatch — are covered in the Surfaces section.)
- Claude automatically records and recalls memories as it works
- Stored at
~/.claude/projects/<project>/memory/ MEMORY.mdindex file loaded at session start (first 200 lines)- Topic files loaded on demand when relevant
/memorycommand to view and manage memories- Memory types: user preferences, feedback, project context, references
- Subagents can maintain their own auto memory
- Toggle with
autoMemoryEnabledsetting
- Eliminates permission prompts via a background safety classifier
- Classifier reviews each action and allows/blocks automatically
- Different from Auto-Accept (
Shift+Tab): Auto Mode is intelligent, not blanket - Allows: Local file ops, dependency installs, read-only HTTP, pushing to current branch
- Blocks: Downloading + executing code, production deploys, force pushes, IAM changes
- Requirements: a current Sonnet / Opus / Fable model; available across paid plans (Pro, Max, Team, Enterprise, API)
- Enable:
--permission-mode auto, or cycle withShift+Tab - Recommended over
--dangerously-skip-permissionsfor new workflows; the old flag still works for personal/Pro use
/loop |
Desktop | Cloud | |
|---|---|---|---|
| Runs on | Your machine | Your machine | Anthropic cloud |
| Requires open session | Yes | No | No |
| Persistent | No | Yes | Yes |
| Local file access | Yes | Yes | No |
| Min interval | 1 minute | 1 minute | 1 hour |
/loop— Session-scoped polling:/loop 5m check if the deployment finished- Desktop — Persistent local tasks that survive restarts
- Cloud — Always-on via
/schedule— runs even with your machine off - Cloud tasks clone the repo fresh each run (default branch)
- Push events from external sources into running Claude Code sessions
- Supported: Telegram, Discord, iMessage (via plugins)
- Two-way: Claude reads events and replies back
- Use cases: chat bridge from phone, CI/monitoring webhooks
--channelsflag to enable:claude --channels plugin:telegram@claude-plugins-official- Requires claude.ai login
- Enterprise: admin must enable
channelsEnabled
- Standard protocol for AI-to-system connections
- Tool integration (APIs, databases, services)
- Context enhancement for better AI responses
- Security controls and permissions
- MCP Tool Search (default since v2.1): Lazy-loads tools on demand
- Reduces context usage by ~95% with many MCP tools
- Tools discovered automatically when needed
# Import from Claude Desktop
claude mcp add-from-claude-desktop
# Add remote server (HTTP)
claude mcp add --transport http context7 https://mcp.context7.com/mcp
# Add local server
claude mcp add context7 -- npx -y @upstash/context7-mcp- Project config:
.mcp.jsonin project root - Management:
claude mcp list,/mcp enable|disable
- GitHub MCP - Repository operations, issues, PRs
- Context7 - Downloads latest API docs and examples for modern code
- Docker MCP Toolkit - Container management and operations
- Playwright MCP - UI test generation and browser automation
- Heroku MCP - Deployment and app management
- Interactive setup:
claude mcp - Local servers: Full configuration control
- Remote servers: OAuth authentication, zero maintenance
- Docker MCP Toolkit:
docker mcp gateway run
# List existing MCP servers
claude mcp list
# Add local server
claude mcp add my-server -e API_KEY=123 -- /path/to/server
# Add remote server (HTTP)
claude mcp add --transport http remote-server https://example.com/mcp
# Add Docker MCP toolkit
claude mcp add docker-mcp docker mcp gateway run- Available SDKs: TypeScript, Python, Command Line
- Build AI-powered coding assistants into your workflows
- Multi-turn conversations and session management
- Custom system prompts and flexible I/O formats
- MCP integration for extended capabilities
# Command line usage
claude -p "Write a function to calculate Fibonacci numbers"
claude -p "Generate a hello world function" --output-format json// TypeScript SDK
import { query } from "@anthropic-ai/claude-code";
for await (const message of query({
prompt: "Write a haiku about foo.py",
options: { maxTurns: 3 }
})) {
// Process messages
}from claude_code import query
async for msg in query("Refactor this module",
context_files=["app.py"], max_turns=3):
print(msg.content)- name: AI Code Review
run: claude -p "Review PR changes" --output-format json > review.json# .git/hooks/pre-commit
claude -p "Check for security issues" --allowed-tools read,grepSame SDK, three deployment shapes: interactive script, CI step, git hook.
- Native IDE integration bringing Claude Code into your editor
- In-editor experience: Work with Claude without leaving VS Code
- Context-aware: Accesses your workspace files and settings
- All Claude Code features: Skills, MCP, custom commands available
- Installation: Search "Claude Code" in VS Code Extensions marketplace
- Reference files with
@syntax directly in VS Code - View diffs and approve changes inline
- Session management with AI-generated titles, rename, fork
- Plan view panel with full markdown and commenting
- MCP server management via
/mcpin extension - Compaction display as collapsible card
- JetBrains Plugin: IntelliJ, PyCharm, WebStorm — same core features
layout: image-left image: https://images.unsplash.com/photo-1460925895917-afdab827c52f?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80 backgroundSize: cover
- Use
/costcommand to check usage - Shows current usage and limits
- Pro Plan: Displays prompt count vs limit
- Max Plans: Shows monthly usage summary
- Limits reset every 5 hours
- Plan ahead for intensive work sessions
# Check your current usage
/cost
# Example output (Pro Plan):
# 📊 Cost information:
# - Input tokens: 1,245
# - Output tokens: 3,782
# - Total cost: $0.076
# Example output (Max Plan):
# With your Claude Max subscription, no need to monitor cost
# — your subscription includes Claude Code usage/compactcompresses conversation history while preserving essentials- Auto-compaction triggers near the context limit; you'll see a warning first
- Manual is better when you know a logical chunk is done — pick the seam
- Long sessions stay coherent over hundreds of messages with periodic compacts
/contextshows what's currently consuming the window
/compact # proactive — pick your moment
# What you'll see when auto-compaction is imminent:
⚠️ Context limit approaching. Auto-compacting in next response
to preserve conversation history and continue working.- Fine-grained control over Claude Code's capabilities
- Use
/permissionsUI to manage tool permissions - Allow/Deny rules for specific tools and actions
- Enterprise policies for organization-wide control
- Permission precedence: Enterprise → CLI → Project → User
# Example permission rules
Bash(npm run test:*) # Allow npm test commands
Edit(docs/**) # Allow editing docs directory
Read(src/*) # Allow reading source files
# Access permissions UI
/permissions- Default: Prompts for each action
- Accept Edits: Auto-approves file edits
- Plan: Read-only exploration, no edits
- Auto: Safety classifier decides (Team/Enterprise/API)
- Don't Ask: Only pre-approved tools run (CI/CD)
- Bypass Permissions: No prompts at all
# Quick permission profiles via aliases
alias claude-dev='claude --allowed-tools all'
alias claude-review='claude --allowed-tools read,grep'
alias claude-safe='claude --disabled-tools bash,webfetch'
alias claude-ci='claude --allowed-tools bash,git,test'layout: image-left image: https://images.unsplash.com/photo-1522071820081-009f0129c71c?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80 backgroundSize: cover
- Built-in worktree support:
claude -worclaude --worktree- Automatically creates isolated worktree + new branch
- Prompts to keep or remove on session exit
- Manual worktrees also work for full control
- Share git history while isolating working files
- Perfect for multi-feature development
# Built-in (preferred) — automatic isolation
claude -w # Start in new worktree
claude --worktree # Same thing
# Manual worktrees for full control
git worktree add ../project-feature-a -b feature-a
cd ../project-feature-a && claude
# Manage worktrees
git worktree list
git worktree remove ../project-feature-a- Be specific about what you want to achieve
- Provide context about your goals and constraints
- Use iterative refinement for complex tasks
- Include examples when possible to show desired patterns
claude doctor # Diagnose installation issues (in-session: /doctor)Settings live in JSON files, not CLI commands (claude config was retired in 2.0):
$EDITOR ~/.claude/settings.json # user settings (model, hooks, permissions…)
$EDITOR .claude/settings.json # project settings, checked in# In-session: /config opens the interactive settings panel
cat ~/.claude/settings.json
echo $ANTHROPIC_API_KEY # Verify API key- Command not found → Check PATH:
which claude(native) ornpm list -g @anthropic-ai/claude-code(npm install) - Permission denied → Re-run the native installer; for npm, fix prefix or use sudo
- Windows users → Use WinGet or run inside WSL 2 (note:
/sandboxrequires WSL 2, not native Windows or WSL 1)
# Recommended: native installer (auto-updates)
curl -fsSL https://claude.ai/install.sh | bash
# Legacy npm (still works, no auto-update)
npm uninstall -g @anthropic-ai/claude-code
npm install -g @anthropic-ai/claude-code- API key not found → Set
ANTHROPIC_API_KEYenvironment variable - Rate limits → Use
/costto monitor usage - Context too large → Use
/compactto reduce conversation size
# Reinstall the native binary (auto-updates after install)
curl -fsSL https://claude.ai/install.sh | bash- Start with clean git state
- Generate tests if none exist
- Commit checkpoints regularly
- Use Claude for git workflows (commits, issues, merges)
- Use git worktrees for parallel sessions on different branches
- Review changes before accepting
- Test generated code thoroughly
| Command | Description |
|---|---|
/effort low|medium|high|xhigh|max |
Set reasoning depth |
/plan |
Enter Plan Mode from prompt |
/code-review [level] [pr#] |
Review the current diff or a PR (ultra = cloud) |
/workflows |
View dynamic-workflow runs (trigger with ultracode) |
/batch |
Parallel changes across codebase |
/loop 5m prompt |
Recurring prompt execution |
/memory |
View and manage auto-memory |
| Command | Description |
|---|---|
/branch |
Branch the conversation |
/fork |
Copy the session into a background session (own worktree) |
/subtask |
Launch an in-session background subagent |
/copy N |
Copy Nth-latest response to clipboard |
/context |
Get context optimization suggestions |
/color |
Set prompt-bar color for session |
/powerup |
Interactive feature lessons |
Removed: /tag, /vim (use /config).
https://code.claude.com/docs/en/overview
https://github.com/anthropics/claude-code
https://github.com/kousen/claude-code-training
https://github.com/anthropics/claude-code/issues