Claude Code Workspace
Anthropic's command-line agentic coding assistant. Designed to operate directly in your terminal to build, refactor, search, test, and commit code with advanced models.
The Ultimate Coding Sandbox
Claude Code integrates directly with your local Git repository, executing tests, configuring Model Context Protocol (MCP) servers, writing instructions to CLAUDE.md, and running automated background tasks inside Git worktrees to scale development.
Memory (CLAUDE.md)
Persistent instructions, rules, and coding standards. Auto-memory indexes build routines and preferences across workspace sessions.
Lifecycle Hooks
Run shell commands on tool calls, prompt submissions, or context compaction. Enforce security, auto-format code, or handle OAuth.
Custom Agent Skills
Extend toolkits with the Agent Skills specification. Inline pre-execution context injection and Positional arguments scripting.
Installation & Core Setup
Get Claude Code running in your development environment and verify permissions.
1. Installation
Run the installer script to download the compiled binary and add it to your PATH:
Run the PowerShell installer (recommended) or use winget:
Note: winget works but does not support auto-updates. The npm method (npm i -g @anthropic-ai/claude-code) is deprecated.
2. Authentication
Sign in using your Anthropic Console account or Pro/Team consumer subscription.
# Sign in with a web authentication flow
claude auth login
# Sign in via Console (if using API billing)
claude auth login --console
# Verify current login status
claude auth status
3. Advanced Providers & Gateways
Claude Code can run via AWS Bedrock, Google Vertex AI, Microsoft Foundry, or custom third-party LLM gateways.
| Provider | Configuration / Command | Required Environment Variables |
|---|---|---|
| Amazon Bedrock | claude --model bedrock/claude-4-6-sonnet or /setup-bedrock |
CLAUDE_CODE_USE_BEDROCK=1, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY |
| Google Vertex AI | claude --model vertex/claude-4-6-sonnet or /setup-vertex |
CLAUDE_CODE_USE_VERTEX=1, VERTEX_PROJECT_ID, VERTEX_REGION |
| LLM Gateways | Configure endpoint maps in ~/.claude/settings.json |
Configure llmGatewayConfig keys mapping custom URLs and Auth. |
CLI Flags & Slash Commands
Complete reference of CLI launching parameters and built-in interactive shell functions. Click any flag or command to watch it run live in a simulated terminal.
Top-level Command Line Flags
Customize execution behavior, directory bounds, and model context before launching a session.
| Flag | Purpose | Syntax / Example |
|---|---|---|
-p / --print |
Run headless print mode (directly output result and exit). | claude -p "Explain db schema" |
-c / --continue |
Load the most recent conversation transcript in the current directory. | claude -c |
-r / --resume |
Resume a specific session by UUID or name, or open the interactive picker. | claude -r "auth-validation" |
-w / --worktree |
Start in an isolated git worktree to work in parallel on a branch. | claude -w feature-oauth |
--permission-mode |
Override baseline permissions (default, plan, acceptEdits, auto, dontAsk, bypassPermissions). |
claude --permission-mode plan |
--effort |
Set model reasoning effort level (low, medium, high, xhigh, max). |
claude --effort high |
--model |
Specify a Claude model to use for the session. | claude --model claude-opus-4-8 |
--max-turns |
Limit the number of agentic turns in non-interactive mode. | claude -p "fix tests" --max-turns 10 |
--output-format |
Output format for headless mode: text, json, or stream-json. |
claude -p "explain" --output-format json |
--allowedTools |
Pre-approve specific tools without prompting (for CI/scripts). | claude -p "test" --allowedTools Bash Edit |
--add-dir |
Grants file system read/write access to supplementary project folders. | claude --add-dir ../common-library |
--bare |
Fast-start that skips MCP servers, hooks, plugins, and CLAUDE.md discovery. | claude --bare -p "list directory" |
Interactive Slash Commands (/)
Commands executed directly in the interactive prompt. Use them to switch models, audit logs, reset history, and control workflows.
| Command | Category | Description |
|---|---|---|
/clear |
Session | Archived current transcript and starts a clean conversation. |
/compact |
Session | Summarizes context history to save token consumption. |
/context |
Session | Grid map visualization of the loaded context window. |
/rewind |
History | Undo code changes and roll back chat turns back to a checkpoint. |
/goal <condition> |
Execution | Keeps Claude working autonomously across turns until goal matches. |
/loop [interval] [prompt] |
Execution | Polls and runs prompts repeatedly (schedule a cron or watch deploy). |
/install-github-app |
Execution | Sets up the official Claude GitHub Actions integration to respond on PRs and issues. |
/batch <query> |
Execution | Fills 5-30 parallel background subagents to deploy massive refactors. |
/mcp |
Setup | Manage active Model Context Protocol servers. |
/theme |
Setup | Interactively configure terminal colors and styling. |
/config |
Setup | Open the interactive configuration interface for all settings. |
/permissions |
Setup | View and update tool approval rules and permission allowlists. |
/terminal-setup |
Setup | Configure terminal features like Shift+Enter multiline input support. |
/vim |
Setup | Toggle Vim-style keybindings for the prompt input line. |
/login / /logout |
Setup | Manage authentication state within the interactive session. |
/memory |
History | View, edit, or reset auto-generated MEMORY.md project learnings. |
/usage |
History | Displays cost, token usage, and API call breakdown. (Aliases: /cost, /stats) |
/status |
History | Show current environment, config scope, and session metadata. |
/doctor |
Session | Run health checks and troubleshoot configuration issues. |
/help |
Session | Display all available commands with descriptions. |
/ide |
Session | Manage IDE integrations (VS Code, JetBrains) from the CLI. |
/skills |
Session | List all available custom skills and built-in AI workflows. |
Keyboard Shortcuts Visualizer
Click on any keyboard key to inspect its exact action and view real-world examples inside Claude Code.
Click a key combo on the left keyboard grid to view detailed documentation and terminal use cases.
[Awaiting selection...]
CLAUDE.md & Auto Memory
Manage how Claude maintains context, remembers build specifications, and accumulates codebase learnings.
Memory Scoping Layers
Claude walks up directory trees to find configuration instructions, layering context from broadest to most specific.
| Layer | Location | Scope |
|---|---|---|
| Org Policy | /Library/Application Support/... |
All sessions across company machines. |
| User Preferences | ~/.claude/CLAUDE.md |
Your personal code formatting rules. |
| Project Scope | ./CLAUDE.md |
Team-shared repository specifications. |
| Local Sandbox | ./CLAUDE.local.md |
Local testing endpoints (gitignored). |
| Path-specific Rules | .claude/rules/*.md |
Scoped via YAML frontmatter glob matching. |
Auto Memory & Learnings
Claude autonomously records preferences, database tricks, and corrected mistakes in ~/.claude/projects/<project>/memory/.
# Auto-generated by Claude Code (On by default)
## Project Learnings
- Database tests require a local Redis client running on port 6379.
- Use pnpm instead of npm to avoid long install logs.
- The auth server throws 401 when token date validation is mock-skipped.
# View or edit memories during session:
/memory
CLAUDE.md Configuration Generator
Configure project specifications and export a production-ready CLAUDE.md file.
1. Build & Test Commands
2. Choose Standards & Guidelines
3. Custom Project Instructions (One per line)
# Loading...
Automation & Event Hooks
Register shell scripts to execute deterministically during Claude Code's agentic loop events.
Event Triggers:
Triggers when a session starts, resumes, or is compacted.
JSON Event Input Payload (on stdin):
{"source": "startup | resume | clear | compact", "session_id": "UUID", "cwd": "path"}
Exit Code Decisions & Output:
Adds stdout to Claude's conversation context. Useful for loading custom instructions dynamically.
Hook Configuration Schema:
# Selected Hook Configuration will render here...
Custom Skills Studio
Extend Claude's toolset using the Agent Skills open standard. Formulate templates, frontmatter configurations, and test shell command preprocessing.
1. Code & Frontmatter Editor
Define variables ($ARGUMENTS, $0), frontmatter rules, and shell commands (prefixed by !).
2. Evaluated Prompt Result
This is the resolved prompt injected into Claude's context when the skill executes.
Subagents, Background Agents & MCP
Scale development with parallel agents, background daemon sessions, custom agent definitions, and Model Context Protocol integrations. Click any card to watch it run in the desktop app.
Subagents (Task Tool)
Claude can spawn independent subagents using the Task tool to work in parallel. Subagents execute in isolated contexts and report findings back to the parent agent.
# Claude automatically spawns subagents for:
- Read-heavy research across large codebases
- Parallel file analysis (avoid context bloat)
- Independent test suite validation
- Multi-module refactoring via /batch
# Manual batch decomposition:
/batch "Update all API handlers to v2 format"
→ Spawns 5-30 parallel workers in git worktrees
Agent View & Background Sessions
Open the full-screen Agent View to monitor running, blocked, and completed sessions — including background sessions that keep working while you do other things.
# Open the Agent View operations screen
claude agents
# Scope the view to one directory
claude agents --cwd ~/projects/api
# Machine-readable status for scripts
claude agents --json
→ Background sessions are marked "bg" and
can be resumed with /resume
Custom Agent Definitions
Define reusable agent personas with scoped tools and behaviors in YAML files under .claude/agents/.
name: code-reviewer
description: Reviews PRs for security and style issues
model: claude-sonnet-4-6
allowed-tools:
- Read
- Bash(git diff)
- Bash(git log)
instructions: |
Review code for security vulnerabilities,
performance issues, and style violations.
Never modify files directly.
Launch with: claude --agent code-reviewer
MCP Server Management
Connect Model Context Protocol servers to extend Claude with external data sources, databases, APIs, and specialized tools.
# Add an MCP server via CLI
claude mcp add my-db-server -- npx @db/mcp-server
# Manage servers interactively
/mcp
# Supported transports:
- stdio (local process communication)
- SSE (Server-Sent Events)
- streamable-HTTP (web endpoints)
Custom Slash Commands
Create reusable prompt templates as custom slash commands by adding Markdown files to your .claude/commands/ directory. These appear alongside built-in commands in the / menu.
| File Path | Invocation | Description |
|---|---|---|
.claude/commands/review.md |
/project:review |
Project-scoped command, shared with team via Git. |
~/.claude/commands/daily.md |
/user:daily |
Personal command, available across all projects. |
Commands support $ARGUMENTS for parameters and !`shell` syntax for injecting live codebase data. |
||
Mastery Checklist & Progress
Track which Claude Code CLI capabilities you've read, practiced, and mastered. Progress is saved locally in your browser.