SpyBara
Go Premium

Documentation 2026-02-25 03:47 UTC to 2026-02-26 21:08 UTC

27 files changed +200 −195. View all changes and history on the product overview
2026
Sat 28 21:01 Fri 27 21:05 Thu 26 21:08 Wed 25 03:47 Tue 24 21:08 Mon 23 21:13 Sat 21 18:03 Fri 20 21:03 Thu 19 21:06 Wed 18 03:48 Tue 17 21:08 Mon 16 21:05 Sat 14 03:44 Fri 13 21:09 Thu 12 00:06 Wed 11 21:10 Tue 10 21:13 Mon 9 15:17 Sat 7 21:05 Fri 6 21:06 Thu 5 21:06 Wed 4 21:07 Tue 3 21:08 Sun 1 21:03

agent-teams.md +9 −9

Details

70 70 

71This example works well because the three roles are independent and can explore the problem without waiting on each other:71This example works well because the three roles are independent and can explore the problem without waiting on each other:

72 72 

73```73```text theme={null}

74I'm designing a CLI tool that helps developers track TODO comments across74I'm designing a CLI tool that helps developers track TODO comments across

75their codebase. Create an agent team to explore this from different angles: one75their codebase. Create an agent team to explore this from different angles: one

76teammate on UX, one on technical architecture, one playing devil's advocate.76teammate on UX, one on technical architecture, one playing devil's advocate.


120 120 

121Claude decides the number of teammates to spawn based on your task, or you can specify exactly what you want:121Claude decides the number of teammates to spawn based on your task, or you can specify exactly what you want:

122 122 

123```123```text theme={null}

124Create a team with 4 teammates to refactor these modules in parallel.124Create a team with 4 teammates to refactor these modules in parallel.

125Use Sonnet for each teammate.125Use Sonnet for each teammate.

126```126```


129 129 

130For complex or risky tasks, you can require teammates to plan before implementing. The teammate works in read-only plan mode until the lead approves their approach:130For complex or risky tasks, you can require teammates to plan before implementing. The teammate works in read-only plan mode until the lead approves their approach:

131 131 

132```132```text theme={null}

133Spawn an architect teammate to refactor the authentication module.133Spawn an architect teammate to refactor the authentication module.

134Require plan approval before they make any changes.134Require plan approval before they make any changes.

135```135```


160 160 

161To gracefully end a teammate's session:161To gracefully end a teammate's session:

162 162 

163```163```text theme={null}

164Ask the researcher teammate to shut down164Ask the researcher teammate to shut down

165```165```

166 166 


170 170 

171When you're done, ask the lead to clean up:171When you're done, ask the lead to clean up:

172 172 

173```173```text theme={null}

174Clean up the team174Clean up the team

175```175```

176 176 


253 253 

254A single reviewer tends to gravitate toward one type of issue at a time. Splitting review criteria into independent domains means security, performance, and test coverage all get thorough attention simultaneously. The prompt assigns each teammate a distinct lens so they don't overlap:254A single reviewer tends to gravitate toward one type of issue at a time. Splitting review criteria into independent domains means security, performance, and test coverage all get thorough attention simultaneously. The prompt assigns each teammate a distinct lens so they don't overlap:

255 255 

256```256```text theme={null}

257Create an agent team to review PR #142. Spawn three reviewers:257Create an agent team to review PR #142. Spawn three reviewers:

258- One focused on security implications258- One focused on security implications

259- One checking performance impact259- One checking performance impact


267 267 

268When the root cause is unclear, a single agent tends to find one plausible explanation and stop looking. The prompt fights this by making teammates explicitly adversarial: each one's job is not only to investigate its own theory but to challenge the others'.268When the root cause is unclear, a single agent tends to find one plausible explanation and stop looking. The prompt fights this by making teammates explicitly adversarial: each one's job is not only to investigate its own theory but to challenge the others'.

269 269 

270```270```text theme={null}

271Users report the app exits after one message instead of staying connected.271Users report the app exits after one message instead of staying connected.

272Spawn 5 agent teammates to investigate different hypotheses. Have them talk to272Spawn 5 agent teammates to investigate different hypotheses. Have them talk to

273each other to try to disprove each other's theories, like a scientific273each other to try to disprove each other's theories, like a scientific


284 284 

285Teammates load project context automatically, including CLAUDE.md, MCP servers, and skills, but they don't inherit the lead's conversation history. See [Context and communication](#context-and-communication) for details. Include task-specific details in the spawn prompt:285Teammates load project context automatically, including CLAUDE.md, MCP servers, and skills, but they don't inherit the lead's conversation history. See [Context and communication](#context-and-communication) for details. Include task-specific details in the spawn prompt:

286 286 

287```287```text theme={null}

288Spawn a security reviewer teammate with the prompt: "Review the authentication module288Spawn a security reviewer teammate with the prompt: "Review the authentication module

289at src/auth/ for security vulnerabilities. Focus on token handling, session289at src/auth/ for security vulnerabilities. Focus on token handling, session

290management, and input validation. The app uses JWT tokens stored in290management, and input validation. The app uses JWT tokens stored in


319 319 

320Sometimes the lead starts implementing tasks itself instead of waiting for teammates. If you notice this:320Sometimes the lead starts implementing tasks itself instead of waiting for teammates. If you notice this:

321 321 

322```322```text theme={null}

323Wait for your teammates to complete their tasks before proceeding323Wait for your teammates to complete their tasks before proceeding

324```324```

325 325 

best-practices.md +24 −37

Details

148 Run `/init` to generate a starter CLAUDE.md file based on your current project structure, then refine over time.148 Run `/init` to generate a starter CLAUDE.md file based on your current project structure, then refine over time.

149</Tip>149</Tip>

150 150 

151CLAUDE.md is a special file that Claude reads at the start of every conversation. Include Bash commands, code style, and workflow rules. This gives Claude persistent context **it can't infer from code alone**.151CLAUDE.md is a special file that Claude reads at the start of every conversation. Include Bash commands, code style, and workflow rules. This gives Claude persistent context it can't infer from code alone.

152 152 

153The `/init` command analyzes your codebase to detect build systems, test frameworks, and code patterns, giving you a solid foundation to refine.153The `/init` command analyzes your codebase to detect build systems, test frameworks, and code patterns, giving you a solid foundation to refine.

154 154 


194 194 

195You can place CLAUDE.md files in several locations:195You can place CLAUDE.md files in several locations:

196 196 

197* **Home folder (`~/.claude/CLAUDE.md`)**: Applies to all Claude sessions197* **Home folder (`~/.claude/CLAUDE.md`)**: applies to all Claude sessions

198* **Project root (`./CLAUDE.md`)**: Check into git to share with your team, or name it `CLAUDE.local.md` and `.gitignore` it198* **Project root (`./CLAUDE.md`)**: check into git to share with your team, or name it `CLAUDE.local.md` and `.gitignore` it

199* **Parent directories**: Useful for monorepos where both `root/CLAUDE.md` and `root/foo/CLAUDE.md` are pulled in automatically199* **Parent directories**: useful for monorepos where both `root/CLAUDE.md` and `root/foo/CLAUDE.md` are pulled in automatically

200* **Child directories**: Claude pulls in child CLAUDE.md files on demand when working with files in those directories200* **Child directories**: Claude pulls in child CLAUDE.md files on demand when working with files in those directories

201 201 

202### Configure permissions202### Configure permissions


207 207 

208By default, Claude Code requests permission for actions that might modify your system: file writes, Bash commands, MCP tools, etc. This is safe but tedious. After the tenth approval you're not really reviewing anymore, you're just clicking through. There are two ways to reduce these interruptions:208By default, Claude Code requests permission for actions that might modify your system: file writes, Bash commands, MCP tools, etc. This is safe but tedious. After the tenth approval you're not really reviewing anymore, you're just clicking through. There are two ways to reduce these interruptions:

209 209 

210* **Permission allowlists**: Permit specific tools you know are safe (like `npm run lint` or `git commit`)210* **Permission allowlists**: permit specific tools you know are safe (like `npm run lint` or `git commit`)

211* **Sandboxing**: Enable OS-level isolation that restricts filesystem and network access, allowing Claude to work more freely within defined boundaries211* **Sandboxing**: enable OS-level isolation that restricts filesystem and network access, allowing Claude to work more freely within defined boundaries

212 212 

213Alternatively, use `--dangerously-skip-permissions` to bypass all permission checks for contained workflows like fixing lint errors or generating boilerplate.213Alternatively, use `--dangerously-skip-permissions` to bypass all permission checks for contained workflows like fixing lint errors or generating boilerplate.

214 214 


216 Letting Claude run arbitrary commands can result in data loss, system corruption, or data exfiltration via prompt injection. Only use `--dangerously-skip-permissions` in a sandbox without internet access.216 Letting Claude run arbitrary commands can result in data loss, system corruption, or data exfiltration via prompt injection. Only use `--dangerously-skip-permissions` in a sandbox without internet access.

217</Warning>217</Warning>

218 218 

219Read more about [configuring permissions](/en/settings) and [enabling sandboxing](/en/sandboxing#sandboxing).219Read more about [configuring permissions](/en/permissions) and [enabling sandboxing](/en/sandboxing).

220 220 

221### Use CLI tools221### Use CLI tools

222 222 


356 356 

357Claude asks about things you might not have considered yet, including technical implementation, UI/UX, edge cases, and tradeoffs.357Claude asks about things you might not have considered yet, including technical implementation, UI/UX, edge cases, and tradeoffs.

358 358 

359```359```text theme={null}

360I want to build [brief description]. Interview me in detail using the AskUserQuestion tool.360I want to build [brief description]. Interview me in detail using the AskUserQuestion tool.

361 361 

362Ask about technical implementation, UI/UX, edge cases, concerns, and tradeoffs. Don't ask obvious questions, dig into the hard parts I might not have considered.362Ask about technical implementation, UI/UX, edge cases, concerns, and tradeoffs. Don't ask obvious questions, dig into the hard parts I might not have considered.


380 380 

381The best results come from tight feedback loops. Though Claude occasionally solves problems perfectly on the first attempt, correcting it quickly generally produces better solutions faster.381The best results come from tight feedback loops. Though Claude occasionally solves problems perfectly on the first attempt, correcting it quickly generally produces better solutions faster.

382 382 

383* **`Esc`**: Stop Claude mid-action with the `Esc` key. Context is preserved, so you can redirect.383* **`Esc`**: stop Claude mid-action with the `Esc` key. Context is preserved, so you can redirect.

384* **`Esc + Esc` or `/rewind`**: Press `Esc` twice or run `/rewind` to open the rewind menu and restore previous conversation and code state, or summarize from a selected message.384* **`Esc + Esc` or `/rewind`**: press `Esc` twice or run `/rewind` to open the rewind menu and restore previous conversation and code state, or summarize from a selected message.

385* **`"Undo that"`**: Have Claude revert its changes.385* **`"Undo that"`**: have Claude revert its changes.

386* **`/clear`**: Reset context between unrelated tasks. Long sessions with irrelevant context can reduce performance.386* **`/clear`**: reset context between unrelated tasks. Long sessions with irrelevant context can reduce performance.

387 387 

388If you've corrected Claude more than twice on the same issue in one session, the context is cluttered with failed approaches. Run `/clear` and start fresh with a more specific prompt that incorporates what you learned. A clean session with a better prompt almost always outperforms a long session with accumulated corrections.388If you've corrected Claude more than twice on the same issue in one session, the context is cluttered with failed approaches. Run `/clear` and start fresh with a more specific prompt that incorporates what you learned. A clean session with a better prompt almost always outperforms a long session with accumulated corrections.

389 389 


411 411 

412Since context is your fundamental constraint, subagents are one of the most powerful tools available. When Claude researches a codebase it reads lots of files, all of which consume your context. Subagents run in separate context windows and report back summaries:412Since context is your fundamental constraint, subagents are one of the most powerful tools available. When Claude researches a codebase it reads lots of files, all of which consume your context. Subagents run in separate context windows and report back summaries:

413 413 

414```414```text theme={null}

415Use subagents to investigate how our authentication system handles token415Use subagents to investigate how our authentication system handles token

416refresh, and whether we have any existing OAuth utilities I should reuse.416refresh, and whether we have any existing OAuth utilities I should reuse.

417```417```


420 420 

421You can also use subagents for verification after Claude implements something:421You can also use subagents for verification after Claude implements something:

422 422 

423```423```text theme={null}

424use a subagent to review this code for edge cases424use a subagent to review this code for edge cases

425```425```

426 426 


444 Run `claude --continue` to pick up where you left off, or `--resume` to choose from recent sessions.444 Run `claude --continue` to pick up where you left off, or `--resume` to choose from recent sessions.

445</Tip>445</Tip>

446 446 

447Claude Code saves conversations locally. When a task spans multiple sessions (you start a feature, get interrupted, come back the next day) you don't have to re-explain the context:447Claude Code saves conversations locally. When a task spans multiple sessions, you don't have to re-explain the context:

448 448 

449```bash theme={null}449```bash theme={null}

450claude --continue # Resume the most recent conversation450claude --continue # Resume the most recent conversation

451claude --resume # Select from recent conversations451claude --resume # Select from recent conversations

452```452```

453 453 

454Use `/rename` to give sessions descriptive names (`"oauth-migration"`, `"debugging-memory-leak"`) so you can find them later. Treat sessions like branches. Different workstreams can have separate, persistent contexts.454Use `/rename` to give sessions descriptive names like `"oauth-migration"` or `"debugging-memory-leak"` so you can find them later. Treat sessions like branches: different workstreams can have separate, persistent contexts.

455 455 

456***456***

457 457 

458## Automate and scale458## Automate and scale

459 459 

460Once you're effective with one Claude, multiply your output with parallel sessions, headless mode, and fan-out patterns.460Once you're effective with one Claude, multiply your output with parallel sessions, non-interactive mode, and fan-out patterns.

461 461 

462Everything so far assumes one human, one Claude, and one conversation. But Claude Code scales horizontally. The techniques in this section show how you can get more done.462Everything so far assumes one human, one Claude, and one conversation. But Claude Code scales horizontally. The techniques in this section show how you can get more done.

463 463 

464### Run headless mode464### Run non-interactive mode

465 465 

466<Tip>466<Tip>

467 Use `claude -p "prompt"` in CI, pre-commit hooks, or scripts. Add `--output-format stream-json` for streaming JSON output.467 Use `claude -p "prompt"` in CI, pre-commit hooks, or scripts. Add `--output-format stream-json` for streaming JSON output.

468</Tip>468</Tip>

469 469 

470With `claude -p "your prompt"`, you can run Claude headlessly, without an interactive session. Headless mode is how you integrate Claude into CI pipelines, pre-commit hooks, or any automated workflow. The output formats (plain text, JSON, streaming JSON) let you parse results programmatically.470With `claude -p "your prompt"`, you can run Claude non-interactively, without a session. Non-interactive mode is how you integrate Claude into CI pipelines, pre-commit hooks, or any automated workflow. The output formats let you parse results programmatically: plain text, JSON, or streaming JSON.

471 471 

472```bash theme={null}472```bash theme={null}

473# One-off queries473# One-off queries


539 539 

540Use `--verbose` for debugging during development, and turn it off in production.540Use `--verbose` for debugging during development, and turn it off in production.

541 541 

542### Safe Autonomous Mode542### Safe autonomous mode

543 543 

544Use `claude --dangerously-skip-permissions` to bypass all permission checks and let Claude work uninterrupted. This works well for workflows like fixing lint errors or generating boilerplate code.544Use `claude --dangerously-skip-permissions` to bypass all permission checks and let Claude work uninterrupted. This works well for workflows like fixing lint errors or generating boilerplate code.

545 545 


580 580 

581## Related resources581## Related resources

582 582 

583<CardGroup cols={2}>583* [How Claude Code works](/en/how-claude-code-works): the agentic loop, tools, and context management

584 <Card title="How Claude Code works" icon="gear" href="/en/how-claude-code-works">584* [Extend Claude Code](/en/features-overview): skills, hooks, MCP, subagents, and plugins

585 Understand the agentic loop, tools, and context management585* [Common workflows](/en/common-workflows): step-by-step recipes for debugging, testing, PRs, and more

586 </Card>586* [CLAUDE.md](/en/memory): store project conventions and persistent context

587 

588 <Card title="Extend Claude Code" icon="puzzle-piece" href="/en/features-overview">

589 Choose between skills, hooks, MCP, subagents, and plugins

590 </Card>

591 

592 <Card title="Common workflows" icon="list-check" href="/en/common-workflows">

593 Step-by-step recipes for debugging, testing, PRs, and more

594 </Card>

595 

596 <Card title="CLAUDE.md" icon="file-lines" href="/en/memory">

597 Store project conventions and persistent context

598 </Card>

599</CardGroup>

Details

22 22 

23Claude Code is also available on the Claude app for [iOS](https://apps.apple.com/us/app/claude-by-anthropic/id6473753684) and [Android](https://play.google.com/store/apps/details?id=com.anthropic.claude) for kicking off tasks on the go and monitoring work in progress.23Claude Code is also available on the Claude app for [iOS](https://apps.apple.com/us/app/claude-by-anthropic/id6473753684) and [Android](https://play.google.com/store/apps/details?id=com.anthropic.claude) for kicking off tasks on the go and monitoring work in progress.

24 24 

25You can move between local and remote development: [send tasks from your terminal to run on the web](#from-terminal-to-web) with the `&` prefix, or [teleport web sessions back to your terminal](#from-web-to-terminal) to continue locally. To use the web interface while running Claude Code on your own machine instead of cloud infrastructure, see [Remote Control](/en/remote-control).25You can [kick off new tasks on the web from your terminal](#from-terminal-to-web) with `--remote`, or [teleport web sessions back to your terminal](#from-web-to-terminal) to continue locally. To use the web interface while running Claude Code on your own machine instead of cloud infrastructure, see [Remote Control](/en/remote-control).

26 26 

27## Who can use Claude Code on the web?27## Who can use Claude Code on the web?

28 28 


69 69 

70## Moving tasks between web and terminal70## Moving tasks between web and terminal

71 71 

72You can start tasks on the web and continue them in your terminal, or send tasks from your terminal to run on the web. Web sessions persist even if you close your laptop, and you can monitor them from anywhere including the Claude iOS app.72You can start new tasks on the web from your terminal, or pull web sessions into your terminal to continue locally. Web sessions persist even if you close your laptop, and you can monitor them from anywhere including the Claude mobile app.

73 73 

74<Note>74<Note>

75 Session handoff is one-way: you can pull web sessions into your terminal, but you can't push an existing terminal session to the web. The [`&` prefix](#from-terminal-to-web) creates a *new* web session with your current conversation context.75 Session handoff is one-way: you can pull web sessions into your terminal, but you can't push an existing terminal session to the web. The `--remote` flag creates a *new* web session for your current repository.

76</Note>76</Note>

77 77 

78### From terminal to web78### From terminal to web

79 79 

80Start a message with `&` inside Claude Code to send a task to run on the web:80Start a web session from the command line with the `--remote` flag:

81 

82```

83& Fix the authentication bug in src/auth/login.ts

84```

85 

86This creates a new web session on claude.ai with your current conversation context. The task runs in the cloud while you continue working locally. Use `/tasks` to check progress, or open the session on claude.ai or the Claude iOS app to interact directly. From there you can steer Claude, provide feedback, or answer questions just like any other conversation.

87 

88You can also start a web session directly from the command line:

89 81 

90```bash theme={null}82```bash theme={null}

91claude --remote "Fix the authentication bug in src/auth/login.ts"83claude --remote "Fix the authentication bug in src/auth/login.ts"

92```84```

93 85 

94#### Tips for background tasks86This creates a new web session on claude.ai. The task runs in the cloud while you continue working locally. Use `/tasks` to check progress, or open the session on claude.ai or the Claude mobile app to interact directly. From there you can steer Claude, provide feedback, or answer questions just like any other conversation.

87 

88#### Tips for remote tasks

95 89 

96**Plan locally, execute remotely**: For complex tasks, start Claude in plan mode to collaborate on the approach before sending work to the web:90**Plan locally, execute remotely**: For complex tasks, start Claude in plan mode to collaborate on the approach, then send work to the web:

97 91 

98```bash theme={null}92```bash theme={null}

99claude --permission-mode plan93claude --permission-mode plan

100```94```

101 95 

102In plan mode, Claude can only read files and explore the codebase. Once you're satisfied with the plan, send it to the web for autonomous execution:96In plan mode, Claude can only read files and explore the codebase. Once you're satisfied with the plan, start a remote session for autonomous execution:

103 97 

104```98```bash theme={null}

105& Execute the migration plan we discussed99claude --remote "Execute the migration plan in docs/migration-plan.md"

106```100```

107 101 

108This pattern gives you control over the strategy while letting Claude execute autonomously in the cloud.102This pattern gives you control over the strategy while letting Claude execute autonomously in the cloud.

109 103 

110**Run tasks in parallel**: Each `&` command creates its own web session that runs independently. You can kick off multiple tasks and they'll all run simultaneously in separate sessions:104**Run tasks in parallel**: Each `--remote` command creates its own web session that runs independently. You can kick off multiple tasks and they'll all run simultaneously in separate sessions:

111 105 

112```106```bash theme={null}

113& Fix the flaky test in auth.spec.ts107claude --remote "Fix the flaky test in auth.spec.ts"

114& Update the API documentation108claude --remote "Update the API documentation"

115& Refactor the logger to use structured output109claude --remote "Refactor the logger to use structured output"

116```110```

117 111 

118Monitor all sessions with `/tasks`. When a session completes, you can create a PR from the web interface or [teleport](#from-web-to-terminal) the session to your terminal to continue working.112Monitor all sessions with `/tasks`. When a session completes, you can create a PR from the web interface or [teleport](#from-web-to-terminal) the session to your terminal to continue working.


232 226 

233**To update an existing environment:** Select the current environment, to the right of the environment name, and select the settings button. This will open a dialog where you can update the environment name, network access, and environment variables.227**To update an existing environment:** Select the current environment, to the right of the environment name, and select the settings button. This will open a dialog where you can update the environment name, network access, and environment variables.

234 228 

235**To select your default environment from the terminal:** If you have multiple environments configured, run `/remote-env` to choose which one to use when starting web sessions from your terminal with `&` or `--remote`. With a single environment, this command shows your current configuration.229**To select your default environment from the terminal:** If you have multiple environments configured, run `/remote-env` to choose which one to use when starting web sessions from your terminal with `--remote`. With a single environment, this command shows your current configuration.

236 230 

237<Note>231<Note>

238 Environment variables must be specified as key-value pairs, in [`.env` format](https://www.dotenv.org/). For example:232 Environment variables must be specified as key-value pairs, in [`.env` format](https://www.dotenv.org/). For example:

239 233 

240 ```234 ```text theme={null}

241 API_KEY=your_api_key235 API_KEY=your_api_key

242 DEBUG=true236 DEBUG=true

243 ```237 ```

Details

8 8 

9## CLI commands9## CLI commands

10 10 

11You can start sessions, pipe content, resume conversations, and manage updates with these commands:

12 

11| Command | Description | Example |13| Command | Description | Example |

12| :------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------- |14| :------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------- |

13| `claude` | Start interactive REPL | `claude` |15| `claude` | Start interactive session | `claude` |

14| `claude "query"` | Start REPL with initial prompt | `claude "explain this project"` |16| `claude "query"` | Start interactive session with initial prompt | `claude "explain this project"` |

15| `claude -p "query"` | Query via SDK, then exit | `claude -p "explain this function"` |17| `claude -p "query"` | Query via SDK, then exit | `claude -p "explain this function"` |

16| `cat file \| claude -p "query"` | Process piped content | `cat logs.txt \| claude -p "explain"` |18| `cat file \| claude -p "query"` | Process piped content | `cat logs.txt \| claude -p "explain"` |

17| `claude -c` | Continue most recent conversation in current directory | `claude -c` |19| `claude -c` | Continue most recent conversation in current directory | `claude -c` |


133 135 

134**When to use each:**136**When to use each:**

135 137 

136* **`--system-prompt`**: Use when you need complete control over Claude's system prompt. This removes all default Claude Code instructions, giving you a blank slate.138* **`--system-prompt`**: use when you need complete control over Claude's system prompt. This removes all default Claude Code instructions, giving you a blank slate.

137 ```bash theme={null}139 ```bash theme={null}

138 claude --system-prompt "You are a Python expert who only writes type-annotated code"140 claude --system-prompt "You are a Python expert who only writes type-annotated code"

139 ```141 ```

140 142 

141* **`--system-prompt-file`**: Use when you want to load a custom prompt from a file, useful for team consistency or version-controlled prompt templates.143* **`--system-prompt-file`**: use when you want to load a custom prompt from a file, useful for team consistency or version-controlled prompt templates.

142 ```bash theme={null}144 ```bash theme={null}

143 claude -p --system-prompt-file ./prompts/code-review.txt "Review this PR"145 claude -p --system-prompt-file ./prompts/code-review.txt "Review this PR"

144 ```146 ```

145 147 

146* **`--append-system-prompt`**: Use when you want to add specific instructions while keeping Claude Code's default capabilities intact. This is the safest option for most use cases.148* **`--append-system-prompt`**: use when you want to add specific instructions while keeping Claude Code's default capabilities intact. This is the safest option for most use cases.

147 ```bash theme={null}149 ```bash theme={null}

148 claude --append-system-prompt "Always use TypeScript and include JSDoc comments"150 claude --append-system-prompt "Always use TypeScript and include JSDoc comments"

149 ```151 ```

150 152 

151* **`--append-system-prompt-file`**: Use when you want to append instructions from a file while keeping Claude Code's defaults. Useful for version-controlled additions.153* **`--append-system-prompt-file`**: use when you want to append instructions from a file while keeping Claude Code's defaults. Useful for version-controlled additions.

152 ```bash theme={null}154 ```bash theme={null}

153 claude -p --append-system-prompt-file ./prompts/style-rules.txt "Review this PR"155 claude -p --append-system-prompt-file ./prompts/style-rules.txt "Review this PR"

154 ```156 ```

costs.md +1 −1

Details

22 22 

23The `/cost` command provides detailed token usage statistics for your current session:23The `/cost` command provides detailed token usage statistics for your current session:

24 24 

25```25```text theme={null}

26Total cost: $0.5526Total cost: $0.55

27Total duration (API): 6m 19.7s27Total duration (API): 6m 19.7s

28Total duration (wall): 6h 33m 10.2s28Total duration (wall): 6h 33m 10.2s

desktop.md +2 −0

Details

463 463 

464### What's not available in Desktop464### What's not available in Desktop

465 465 

466The following features are only available in the CLI or VS Code extension:

467 

466* **Third-party providers**: Desktop connects to Anthropic's API directly. Use the [CLI](/en/quickstart) with Bedrock, Vertex, or Foundry instead.468* **Third-party providers**: Desktop connects to Anthropic's API directly. Use the [CLI](/en/quickstart) with Bedrock, Vertex, or Foundry instead.

467* **Linux**: the desktop app is available on macOS and Windows only.469* **Linux**: the desktop app is available on macOS and Windows only.

468* **Inline code suggestions**: Desktop does not provide autocomplete-style suggestions. It works through conversational prompts and explicit code changes.470* **Inline code suggestions**: Desktop does not provide autocomplete-style suggestions. It works through conversational prompts and explicit code changes.

Details

356 356 

357Team admins can set up automatic marketplace installation for projects by adding marketplace configuration to `.claude/settings.json`. When team members trust the repository folder, Claude Code prompts them to install these marketplaces and plugins.357Team admins can set up automatic marketplace installation for projects by adding marketplace configuration to `.claude/settings.json`. When team members trust the repository folder, Claude Code prompts them to install these marketplaces and plugins.

358 358 

359Add `extraKnownMarketplaces` to your project's `.claude/settings.json`:

360 

361```json theme={null}

362{

363 "extraKnownMarketplaces": {

364 "my-team-tools": {

365 "source": {

366 "source": "github",

367 "repo": "your-org/claude-plugins"

368 }

369 }

370 }

371}

372```

373 

359For full configuration options including `extraKnownMarketplaces` and `enabledPlugins`, see [Plugin settings](/en/settings#plugin-settings).374For full configuration options including `extraKnownMarketplaces` and `enabledPlugins`, see [Plugin settings](/en/settings#plugin-settings).

360 375 

361## Troubleshooting376## Troubleshooting

Details

200 200 

201In issue or PR comments:201In issue or PR comments:

202 202 

203```203```text theme={null}

204@claude implement this feature based on the issue description204@claude implement this feature based on the issue description

205@claude how should I implement user authentication for this endpoint?205@claude how should I implement user authentication for this endpoint?

206@claude fix the TypeError in the user dashboard component206@claude fix the TypeError in the user dashboard component

gitlab-ci-cd.md +3 −3

Details

126 126 

127In an issue comment:127In an issue comment:

128 128 

129```129```text theme={null}

130@claude implement this feature based on the issue description130@claude implement this feature based on the issue description

131```131```

132 132 


136 136 

137In an MR discussion:137In an MR discussion:

138 138 

139```139```text theme={null}

140@claude suggest a concrete approach to cache the results of this API call140@claude suggest a concrete approach to cache the results of this API call

141```141```

142 142 


146 146 

147In an issue or MR comment:147In an issue or MR comment:

148 148 

149```149```text theme={null}

150@claude fix the TypeError in the user dashboard component150@claude fix the TypeError in the user dashboard component

151```151```

152 152 

headless.md +4 −17

Details

152 152 

153## Next steps153## Next steps

154 154 

155<CardGroup cols={2}>155* [Agent SDK quickstart](https://platform.claude.com/docs/en/agent-sdk/quickstart): build your first agent with Python or TypeScript

156 <Card title="Agent SDK quickstart" icon="play" href="https://platform.claude.com/docs/en/agent-sdk/quickstart">156* [CLI reference](/en/cli-reference): all CLI flags and options

157 Build your first agent with Python or TypeScript157* [GitHub Actions](/en/github-actions): use the Agent SDK in GitHub workflows

158 </Card>158* [GitLab CI/CD](/en/gitlab-ci-cd): use the Agent SDK in GitLab pipelines

159 

160 <Card title="CLI reference" icon="terminal" href="/en/cli-reference">

161 Explore all CLI flags and options

162 </Card>

163 

164 <Card title="GitHub Actions" icon="github" href="/en/github-actions">

165 Use the Agent SDK in GitHub workflows

166 </Card>

167 

168 <Card title="GitLab CI/CD" icon="gitlab" href="/en/gitlab-ci-cd">

169 Use the Agent SDK in GitLab pipelines

170 </Card>

171</CardGroup>

hooks.md +1 −1

Details

1731 1731 

1732Run `claude --debug` to see hook execution details, including which hooks matched, their exit codes, and output. Toggle verbose mode with `Ctrl+O` to see hook progress in the transcript.1732Run `claude --debug` to see hook execution details, including which hooks matched, their exit codes, and output. Toggle verbose mode with `Ctrl+O` to see hook progress in the transcript.

1733 1733 

1734```1734```text theme={null}

1735[DEBUG] Executing hooks for PostToolUse:Write1735[DEBUG] Executing hooks for PostToolUse:Write

1736[DEBUG] Getting matching hook commands for PostToolUse with query: Write1736[DEBUG] Getting matching hook commands for PostToolUse with query: Write

1737[DEBUG] Found 1 hook matchers in settings1737[DEBUG] Found 1 hook matchers in settings

hooks-guide.md +4 −4

Details

36 <Tab title="macOS">36 <Tab title="macOS">

37 Uses [`osascript`](https://ss64.com/mac/osascript.html) to trigger a native macOS notification through AppleScript:37 Uses [`osascript`](https://ss64.com/mac/osascript.html) to trigger a native macOS notification through AppleScript:

38 38 

39 ```39 ```bash theme={null}

40 osascript -e 'display notification "Claude Code needs your attention" with title "Claude Code"'40 osascript -e 'display notification "Claude Code needs your attention" with title "Claude Code"'

41 ```41 ```

42 </Tab>42 </Tab>


44 <Tab title="Linux">44 <Tab title="Linux">

45 Uses `notify-send`, which is pre-installed on most Linux desktops with a notification daemon:45 Uses `notify-send`, which is pre-installed on most Linux desktops with a notification daemon:

46 46 

47 ```47 ```bash theme={null}

48 notify-send 'Claude Code' 'Claude Code needs your attention'48 notify-send 'Claude Code' 'Claude Code needs your attention'

49 ```49 ```

50 </Tab>50 </Tab>


52 <Tab title="Windows (PowerShell)">52 <Tab title="Windows (PowerShell)">

53 Uses PowerShell to show a native message box through .NET's Windows Forms:53 Uses PowerShell to show a native message box through .NET's Windows Forms:

54 54 

55 ```55 ```powershell theme={null}

56 powershell.exe -Command "[System.Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms'); [System.Windows.Forms.MessageBox]::Show('Claude Code needs your attention', 'Claude Code')"56 powershell.exe -Command "[System.Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms'); [System.Windows.Forms.MessageBox]::Show('Claude Code needs your attention', 'Claude Code')"

57 ```57 ```

58 </Tab>58 </Tab>


637 637 

638When Claude Code runs a hook, it spawns a shell that sources your profile (`~/.zshrc` or `~/.bashrc`). If your profile contains unconditional `echo` statements, that output gets prepended to your hook's JSON:638When Claude Code runs a hook, it spawns a shell that sources your profile (`~/.zshrc` or `~/.bashrc`). If your profile contains unconditional `echo` statements, that output gets prepended to your hook's JSON:

639 639 

640```640```text theme={null}

641Shell ready on arm64641Shell ready on arm64

642{"decision": "block", "reason": "Not allowed"}642{"decision": "block", "reason": "Not allowed"}

643```643```

Details

13 13 

14 **macOS users**: Option/Alt key shortcuts (`Alt+B`, `Alt+F`, `Alt+Y`, `Alt+M`, `Alt+P`) require configuring Option as Meta in your terminal:14 **macOS users**: Option/Alt key shortcuts (`Alt+B`, `Alt+F`, `Alt+Y`, `Alt+M`, `Alt+P`) require configuring Option as Meta in your terminal:

15 15 

16 * **iTerm2**: Settings → Profiles → Keys → Set Left/Right Option key to "Esc+"16 * **iTerm2**: settings → Profiles → Keys → set Left/Right Option key to "Esc+"

17 * **Terminal.app**: Settings → Profiles → Keyboard → Check "Use Option as Meta Key"17 * **Terminal.app**: settings → Profiles → Keyboard → check "Use Option as Meta Key"

18 * **VS Code**: Settings → Profiles → Keys → Set Left/Right Option key to "Esc+"18 * **VS Code**: settings → Profiles → Keys → set Left/Right Option key to "Esc+"

19 19 

20 See [Terminal configuration](/en/terminal-config) for details.20 See [Terminal configuration](/en/terminal-config) for details.

21</Note>21</Note>


108| `/model` | Select or change the AI model. With Opus 4.6, use left/right arrows to [adjust effort level](/en/model-config#adjust-effort-level). The change takes effect immediately without waiting for the current response to finish |108| `/model` | Select or change the AI model. With Opus 4.6, use left/right arrows to [adjust effort level](/en/model-config#adjust-effort-level). The change takes effect immediately without waiting for the current response to finish |

109| `/permissions` | View or update [permissions](/en/permissions#manage-permissions) |109| `/permissions` | View or update [permissions](/en/permissions#manage-permissions) |

110| `/plan` | Enter plan mode directly from the prompt |110| `/plan` | Enter plan mode directly from the prompt |

111| `/rename <name>` | Rename the current session for easier identification |111| `/rename [name]` | Rename the current session. Without a name, generates one from conversation history (requires at least one message in the conversation context). |

112| `/resume [session]` | Resume a conversation by ID or name, or open the session picker |112| `/resume [session]` | Resume a conversation by ID or name, or open the session picker |

113| `/rewind` | Rewind the conversation and/or code, or summarize from a selected message |113| `/rewind` | Rewind the conversation and/or code, or summarize from a selected message |

114| `/stats` | Visualize daily usage, session history, streaks, and model preferences |114| `/stats` | Visualize daily usage, session history, streaks, and model preferences |

115| `/status` | Open the Settings interface (Status tab) showing version, model, account, and connectivity |115| `/status` | Open the Settings interface (Status tab) showing version, model, account, and connectivity |

116| `/statusline` | Set up Claude Code's status line UI |116| `/statusline` | Set up Claude Code's status line UI |

117| `/copy` | Copy the last assistant response to clipboard |117| `/copy` | Copy the last response to clipboard. When code blocks are present, shows an interactive picker to select individual code blocks or the full response |

118| `/tasks` | List and manage background tasks |118| `/tasks` | List and manage background tasks |

119| `/teleport` | Resume a remote session from claude.ai (subscribers only) |119| `/teleport` | Resume a remote session from claude.ai (subscribers only) |

120| `/desktop` | Hand off the current CLI session to the Claude Code Desktop app (macOS and Windows only) |120| `/desktop` | Hand off the current CLI session to the Claude Code Desktop app (macOS and Windows only) |


204 204 

205Claude Code maintains command history for the current session:205Claude Code maintains command history for the current session:

206 206 

207* History is stored per working directory207* Input history is stored per working directory

208* Cleared with `/clear` command208* Input history resets when you run `/clear` to start a new session. The previous session's conversation is preserved and can be resumed.

209* Use Up/Down arrows to navigate (see keyboard shortcuts above)209* Use Up/Down arrows to navigate (see keyboard shortcuts above)

210* **Note**: History expansion (`!`) is disabled by default210* **Note**: history expansion (`!`) is disabled by default

211 211 

212### Reverse search with Ctrl+R212### Reverse search with Ctrl+R

213 213 

214Press `Ctrl+R` to interactively search through your command history:214Press `Ctrl+R` to interactively search through your command history:

215 215 

2161. **Start search**: Press `Ctrl+R` to activate reverse history search2161. **Start search**: press `Ctrl+R` to activate reverse history search

2172. **Type query**: Enter text to search for in previous commands - the search term will be highlighted in matching results2172. **Type query**: enter text to search for in previous commands. The search term is highlighted in matching results

2183. **Navigate matches**: Press `Ctrl+R` again to cycle through older matches2183. **Navigate matches**: press `Ctrl+R` again to cycle through older matches

2194. **Accept match**:2194. **Accept match**:

220 * Press `Tab` or `Esc` to accept the current match and continue editing220 * Press `Tab` or `Esc` to accept the current match and continue editing

221 * Press `Enter` to accept and execute the command immediately221 * Press `Enter` to accept and execute the command immediately


223 * Press `Ctrl+C` to cancel and restore your original input223 * Press `Ctrl+C` to cancel and restore your original input

224 * Press `Backspace` on empty search to cancel224 * Press `Backspace` on empty search to cancel

225 225 

226The search displays matching commands with the search term highlighted, making it easy to find and reuse previous inputs.226The search displays matching commands with the search term highlighted, so you can find and reuse previous inputs.

227 227 

228## Background bash commands228## Background bash commands

229 229 

keybindings.md +2 −2

Details

292 292 

293For example:293For example:

294 294 

295```295```text theme={null}

296ctrl+k Single key with modifier296ctrl+k Single key with modifier

297shift+tab Shift + Tab297shift+tab Shift + Tab

298meta+p Command/Meta + P298meta+p Command/Meta + P


309 309 

310Chords are sequences of keystrokes separated by spaces:310Chords are sequences of keystrokes separated by spaces:

311 311 

312```312```text theme={null}

313ctrl+k ctrl+s Press Ctrl+K, release, then Ctrl+S313ctrl+k ctrl+s Press Ctrl+K, release, then Ctrl+S

314```314```

315 315 

memory.md +19 −3

Details

37Auto memory is a persistent directory where Claude records learnings, patterns, and insights as it works. Unlike CLAUDE.md files that contain instructions you write for Claude, auto memory contains notes Claude writes for itself based on what it discovers during sessions.37Auto memory is a persistent directory where Claude records learnings, patterns, and insights as it works. Unlike CLAUDE.md files that contain instructions you write for Claude, auto memory contains notes Claude writes for itself based on what it discovers during sessions.

38 38 

39<Note>39<Note>

40 Auto memory is being rolled out gradually. If you aren't seeing auto memory, you can opt in by setting `CLAUDE_CODE_DISABLE_AUTO_MEMORY=0` in your environment.40 Auto memory is enabled by default. To toggle it on or off, use `/memory` and select the auto-memory toggle.

41</Note>41</Note>

42 42 

43### What Claude remembers43### What Claude remembers


73 73 

74### Manage auto memory74### Manage auto memory

75 75 

76Auto memory files are markdown files you can edit at any time. Use `/memory` to open the file selector, which includes your auto memory entrypoint alongside your CLAUDE.md files.76Auto memory files are markdown files you can edit at any time. Use `/memory` to open the file selector, which includes your auto memory entrypoint alongside your CLAUDE.md files. The `/memory` selector also includes an auto-memory toggle to turn the feature on or off.

77 77 

78To ask Claude to save something specific, tell it directly: "remember that we use pnpm, not npm" or "save to memory that the API tests require a local Redis instance".78To ask Claude to save something specific, tell it directly: "remember that we use pnpm, not npm" or "save to memory that the API tests require a local Redis instance".

79 79 

80When neither variable is set, auto memory follows the gradual rollout. The variable name uses double-negative logic: `DISABLE=0` means "don't disable" and forces auto memory on.80You can also control auto memory through settings or environment variables.

81 

82Disable auto memory for all projects by adding `autoMemoryEnabled` to your user settings:

83 

84```json theme={null}

85// ~/.claude/settings.json

86{ "autoMemoryEnabled": false }

87```

88 

89Disable auto memory for a single project by adding `autoMemoryEnabled` to the project settings:

90 

91```json theme={null}

92// .claude/settings.json

93{ "autoMemoryEnabled": false }

94```

95 

96Override all other settings with the `CLAUDE_CODE_DISABLE_AUTO_MEMORY` environment variable. This takes precedence over both the `/memory` toggle and `settings.json`, making it useful for CI or managed environments:

81 97 

82```bash theme={null}98```bash theme={null}

83export CLAUDE_CODE_DISABLE_AUTO_MEMORY=1 # Force off99export CLAUDE_CODE_DISABLE_AUTO_MEMORY=1 # Force off

model-config.md +1 −1

Details

55 55 

56Example settings file:56Example settings file:

57 57 

58```58```json theme={null}

59{59{

60 "permissions": {60 "permissions": {

61 ...61 ...

plugins.md +1 −1

Details

205 205 

206Add a `skills/` directory at your plugin root with Skill folders containing `SKILL.md` files:206Add a `skills/` directory at your plugin root with Skill folders containing `SKILL.md` files:

207 207 

208```208```text theme={null}

209my-plugin/209my-plugin/

210├── .claude-plugin/210├── .claude-plugin/

211│ └── plugin.json211│ └── plugin.json

Details

26 26 

27**Skill structure**:27**Skill structure**:

28 28 

29```29```text theme={null}

30skills/30skills/

31├── pdf-processor/31├── pdf-processor/

32│ ├── SKILL.md32│ ├── SKILL.md


408 408 

409A complete plugin follows this structure:409A complete plugin follows this structure:

410 410 

411```411```text theme={null}

412enterprise-plugin/412enterprise-plugin/

413├── .claude-plugin/ # Metadata directory (optional)413├── .claude-plugin/ # Metadata directory (optional)

414│ └── plugin.json # plugin manifest414│ └── plugin.json # plugin manifest


650 650 

651**Correct structure**: Components must be at the plugin root, not inside `.claude-plugin/`. Only `plugin.json` belongs in `.claude-plugin/`.651**Correct structure**: Components must be at the plugin root, not inside `.claude-plugin/`. Only `plugin.json` belongs in `.claude-plugin/`.

652 652 

653```653```text theme={null}

654my-plugin/654my-plugin/

655├── .claude-plugin/655├── .claude-plugin/

656│ └── plugin.json ← Only manifest here656│ └── plugin.json ← Only manifest here

quickstart.md +30 −30

Details

6 6 

7> Welcome to Claude Code!7> Welcome to Claude Code!

8 8 

9This quickstart guide will have you using AI-powered coding assistance in just a few minutes. By the end, you'll understand how to use Claude Code for common development tasks.9This quickstart guide will have you using AI-powered coding assistance in a few minutes. By the end, you'll understand how to use Claude Code for common development tasks.

10 10 

11## Before you begin11## Before you begin

12 12 


29 <Tab title="Native Install (Recommended)">29 <Tab title="Native Install (Recommended)">

30 **macOS, Linux, WSL:**30 **macOS, Linux, WSL:**

31 31 

32 ```bash theme={null}32 ```bash theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null}

33 curl -fsSL https://claude.ai/install.sh | bash33 curl -fsSL https://claude.ai/install.sh | bash

34 ```34 ```

35 35 

36 **Windows PowerShell:**36 **Windows PowerShell:**

37 37 

38 ```powershell theme={null}38 ```powershell theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null}

39 irm https://claude.ai/install.ps1 | iex39 irm https://claude.ai/install.ps1 | iex

40 ```40 ```

41 41 

42 **Windows CMD:**42 **Windows CMD:**

43 43 

44 ```batch theme={null}44 ```batch theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null}

45 curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd45 curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd

46 ```46 ```

47 47 


53 </Tab>53 </Tab>

54 54 

55 <Tab title="Homebrew">55 <Tab title="Homebrew">

56 ```bash theme={null}56 ```bash theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null}

57 brew install --cask claude-code57 brew install --cask claude-code

58 ```58 ```

59 59 


63 </Tab>63 </Tab>

64 64 

65 <Tab title="WinGet">65 <Tab title="WinGet">

66 ```powershell theme={null}66 ```powershell theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null}

67 winget install Anthropic.ClaudeCode67 winget install Anthropic.ClaudeCode

68 ```68 ```

69 69 


114 114 

115Let's start with understanding your codebase. Try one of these commands:115Let's start with understanding your codebase. Try one of these commands:

116 116 

117```117```text theme={null}

118what does this project do?118what does this project do?

119```119```

120 120 

121Claude will analyze your files and provide a summary. You can also ask more specific questions:121Claude will analyze your files and provide a summary. You can also ask more specific questions:

122 122 

123```123```text theme={null}

124what technologies does this project use?124what technologies does this project use?

125```125```

126 126 

127```127```text theme={null}

128where is the main entry point?128where is the main entry point?

129```129```

130 130 

131```131```text theme={null}

132explain the folder structure132explain the folder structure

133```133```

134 134 

135You can also ask Claude about its own capabilities:135You can also ask Claude about its own capabilities:

136 136 

137```137```text theme={null}

138what can Claude Code do?138what can Claude Code do?

139```139```

140 140 

141```141```text theme={null}

142how do I create custom skills in Claude Code?142how do I create custom skills in Claude Code?

143```143```

144 144 

145```145```text theme={null}

146can Claude Code work with Docker?146can Claude Code work with Docker?

147```147```

148 148 

149<Note>149<Note>

150 Claude Code reads your files as needed - you don't have to manually add context. Claude also has access to its own documentation and can answer questions about its features and capabilities.150 Claude Code reads your project files as needed. You don't have to manually add context.

151</Note>151</Note>

152 152 

153## Step 5: Make your first code change153## Step 5: Make your first code change

154 154 

155Now let's make Claude Code do some actual coding. Try a simple task:155Now let's make Claude Code do some actual coding. Try a simple task:

156 156 

157```157```text theme={null}

158add a hello world function to the main file158add a hello world function to the main file

159```159```

160 160 


173 173 

174Claude Code makes Git operations conversational:174Claude Code makes Git operations conversational:

175 175 

176```176```text theme={null}

177what files have I changed?177what files have I changed?

178```178```

179 179 

180```180```text theme={null}

181commit my changes with a descriptive message181commit my changes with a descriptive message

182```182```

183 183 

184You can also prompt for more complex Git operations:184You can also prompt for more complex Git operations:

185 185 

186```186```text theme={null}

187create a new branch called feature/quickstart187create a new branch called feature/quickstart

188```188```

189 189 

190```190```text theme={null}

191show me the last 5 commits191show me the last 5 commits

192```192```

193 193 

194```194```text theme={null}

195help me resolve merge conflicts195help me resolve merge conflicts

196```196```

197 197 


201 201 

202Describe what you want in natural language:202Describe what you want in natural language:

203 203 

204```204```text theme={null}

205add input validation to the user registration form205add input validation to the user registration form

206```206```

207 207 

208Or fix existing issues:208Or fix existing issues:

209 209 

210```210```text theme={null}

211there's a bug where users can submit empty forms - fix it211there's a bug where users can submit empty forms - fix it

212```212```

213 213 


224 224 

225**Refactor code**225**Refactor code**

226 226 

227```227```text theme={null}

228refactor the authentication module to use async/await instead of callbacks228refactor the authentication module to use async/await instead of callbacks

229```229```

230 230 

231**Write tests**231**Write tests**

232 232 

233```233```text theme={null}

234write unit tests for the calculator functions234write unit tests for the calculator functions

235```235```

236 236 

237**Update documentation**237**Update documentation**

238 238 

239```239```text theme={null}

240update the README with installation instructions240update the README with installation instructions

241```241```

242 242 

243**Code review**243**Code review**

244 244 

245```245```text theme={null}

246review my changes and suggest improvements246review my changes and suggest improvements

247```247```

248 248 

249<Tip>249<Tip>

250 **Remember**: Claude Code is your AI pair programmer. Talk to it like you would a helpful colleague - describe what you want to achieve, and it will help you get there.250 Talk to Claude like you would a helpful colleague. Describe what you want to achieve, and it will help you get there.

251</Tip>251</Tip>

252 252 

253## Essential commands253## Essential commands


282 <Accordion title="Use step-by-step instructions">282 <Accordion title="Use step-by-step instructions">

283 Break complex tasks into steps:283 Break complex tasks into steps:

284 284 

285 ```285 ```text theme={null}

286 1. create a new database table for user profiles286 1. create a new database table for user profiles

287 2. create an API endpoint to get and update user profiles287 2. create an API endpoint to get and update user profiles

288 3. build a webpage that allows users to see and edit their information288 3. build a webpage that allows users to see and edit their information


292 <Accordion title="Let Claude explore first">292 <Accordion title="Let Claude explore first">

293 Before making changes, let Claude understand your code:293 Before making changes, let Claude understand your code:

294 294 

295 ```295 ```text theme={null}

296 analyze the database schema296 analyze the database schema

297 ```297 ```

298 298 

299 ```299 ```text theme={null}

300 build a dashboard showing products that are most frequently returned by our UK customers300 build a dashboard showing products that are most frequently returned by our UK customers

301 ```301 ```

302 </Accordion>302 </Accordion>

Details

7> Continue a local Claude Code session from your phone, tablet, or any browser using Remote Control. Works with claude.ai/code and the Claude mobile app.7> Continue a local Claude Code session from your phone, tablet, or any browser using Remote Control. Works with claude.ai/code and the Claude mobile app.

8 8 

9<Note>9<Note>

10 Remote Control is available as a research preview on Pro and Max plans. It is not available on Team or Enterprise plans.10 Remote Control is available as a research preview on Max plans and will be rolling out to Pro plans soon. It is not available on Team or Enterprise plans.

11</Note>11</Note>

12 12 

13Remote Control connects [claude.ai/code](https://claude.ai/code) or the Claude app for [iOS](https://apps.apple.com/us/app/claude-by-anthropic/id6473753684) and [Android](https://play.google.com/store/apps/details?id=com.anthropic.claude) to a Claude Code session running on your machine. Start a task at your desk, then pick it up from your phone on the couch or a browser on another computer.13Remote Control connects [claude.ai/code](https://claude.ai/code) or the Claude app for [iOS](https://apps.apple.com/us/app/claude-by-anthropic/id6473753684) and [Android](https://play.google.com/store/apps/details?id=com.anthropic.claude) to a Claude Code session running on your machine. Start a task at your desk, then pick it up from your phone on the couch or a browser on another computer.


26 26 

27Before using Remote Control, confirm that your environment meets these conditions:27Before using Remote Control, confirm that your environment meets these conditions:

28 28 

29* **Subscription**: requires a Pro or Max plan. API keys are not supported.29* **Subscription**: requires a Max plan. Pro plan support is coming soon. API keys are not supported.

30* **Authentication**: run `claude` and use `/login` to sign in through claude.ai if you haven't already.30* **Authentication**: run `claude` and use `/login` to sign in through claude.ai if you haven't already.

31* **Workspace trust**: run `claude` in your project directory at least once to accept the workspace trust dialog.31* **Workspace trust**: run `claude` in your project directory at least once to accept the workspace trust dialog.

32 32 

sandboxing.md +1 −1

Details

89 89 

90You can enable sandboxing by running the `/sandbox` command:90You can enable sandboxing by running the `/sandbox` command:

91 91 

92```92```text theme={null}

93> /sandbox93> /sandbox

94```94```

95 95 

settings.md +3 −3

Details

278 278 

279**Default commit attribution:**279**Default commit attribution:**

280 280 

281```281```text theme={null}

282🤖 Generated with [Claude Code](https://claude.com/claude-code)282🤖 Generated with [Claude Code](https://claude.com/claude-code)

283 283 

284 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>284 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>


286 286 

287**Default pull request attribution:**287**Default pull request attribution:**

288 288 

289```289```text theme={null}

290🤖 Generated with [Claude Code](https://claude.com/claude-code)290🤖 Generated with [Claude Code](https://claude.com/claude-code)

291```291```

292 292 


326 326 

327Output newline-separated file paths to stdout (currently limited to 15):327Output newline-separated file paths to stdout (currently limited to 15):

328 328 

329```329```text theme={null}

330src/components/Button.tsx330src/components/Button.tsx

331src/components/Modal.tsx331src/components/Modal.tsx

332src/components/Form.tsx332src/components/Form.tsx

skills.md +7 −7

Details

58 58 

59 **Let Claude invoke it automatically** by asking something that matches the description:59 **Let Claude invoke it automatically** by asking something that matches the description:

60 60 

61 ```61 ```text theme={null}

62 How does this code work?62 How does this code work?

63 ```63 ```

64 64 

65 **Or invoke it directly** with the skill name:65 **Or invoke it directly** with the skill name:

66 66 

67 ```67 ```text theme={null}

68 /explain-code src/auth/login.ts68 /explain-code src/auth/login.ts

69 ```69 ```

70 70 


91 91 

92Each skill is a directory with `SKILL.md` as the entrypoint:92Each skill is a directory with `SKILL.md` as the entrypoint:

93 93 

94```94```text theme={null}

95my-skill/95my-skill/

96├── SKILL.md # Main instructions (required)96├── SKILL.md # Main instructions (required)

97├── template.md # Template for Claude to fill in97├── template.md # Template for Claude to fill in


213 213 

214Skills can include multiple files in their directory. This keeps `SKILL.md` focused on the essentials while letting Claude access detailed reference material only when needed. Large reference docs, API specifications, or example collections don't need to load into context every time the skill runs.214Skills can include multiple files in their directory. This keeps `SKILL.md` focused on the essentials while letting Claude access detailed reference material only when needed. Large reference docs, API specifications, or example collections don't need to load into context every time the skill runs.

215 215 

216```216```text theme={null}

217my-skill/217my-skill/

218├── SKILL.md (required - overview and navigation)218├── SKILL.md (required - overview and navigation)

219├── reference.md (detailed API docs - loaded when needed)219├── reference.md (detailed API docs - loaded when needed)


423 423 

424**Disable all skills** by denying the Skill tool in `/permissions`:424**Disable all skills** by denying the Skill tool in `/permissions`:

425 425 

426```426```text theme={null}

427# Add to deny rules:427# Add to deny rules:

428Skill428Skill

429```429```

430 430 

431**Allow or deny specific skills** using [permission rules](/en/permissions):431**Allow or deny specific skills** using [permission rules](/en/permissions):

432 432 

433```433```text theme={null}

434# Allow only specific skills434# Allow only specific skills

435Skill(commit)435Skill(commit)

436Skill(review-pr *)436Skill(review-pr *)


486 486 

487```bash487```bash

488python ~/.claude/skills/codebase-visualizer/scripts/visualize.py .488python ~/.claude/skills/codebase-visualizer/scripts/visualize.py .

489```489```text

490 490 

491This creates `codebase-map.html` in the current directory and opens it in your default browser.491This creates `codebase-map.html` in the current directory and opens it in your default browser.

492 492 

statusline.md +1 −1

Details

31 31 

32The `/statusline` command accepts natural language instructions describing what you want displayed. Claude Code generates a script file in `~/.claude/` and updates your settings automatically:32The `/statusline` command accepts natural language instructions describing what you want displayed. Claude Code generates a script file in `~/.claude/` and updates your settings automatically:

33 33 

34```34```text theme={null}

35/statusline show model name and context percentage with a progress bar35/statusline show model name and context percentage with a progress bar

36```36```

37 37 

sub-agents.md +8 −8

Details

84 <Step title="Open the subagents interface">84 <Step title="Open the subagents interface">

85 In Claude Code, run:85 In Claude Code, run:

86 86 

87 ```87 ```text theme={null}

88 /agents88 /agents

89 ```89 ```

90 </Step>90 </Step>


96 <Step title="Generate with Claude">96 <Step title="Generate with Claude">

97 Select **Generate with Claude**. When prompted, describe the subagent:97 Select **Generate with Claude**. When prompted, describe the subagent:

98 98 

99 ```99 ```text theme={null}

100 A code improvement agent that scans files and suggests improvements100 A code improvement agent that scans files and suggests improvements

101 for readability, performance, and best practices. It should explain101 for readability, performance, and best practices. It should explain

102 each issue, show the current code, and provide an improved version.102 each issue, show the current code, and provide an improved version.


120 <Step title="Save and try it out">120 <Step title="Save and try it out">

121 Save the subagent. It's available immediately (no restart needed). Try it:121 Save the subagent. It's available immediately (no restart needed). Try it:

122 122 

123 ```123 ```text theme={null}

124 Use the code-improver agent to suggest improvements in this project124 Use the code-improver agent to suggest improvements in this project

125 ```125 ```

126 126 


498 498 

499You can also request a specific subagent explicitly:499You can also request a specific subagent explicitly:

500 500 

501```501```text theme={null}

502Use the test-runner subagent to fix failing tests502Use the test-runner subagent to fix failing tests

503Have the code-reviewer subagent look at my recent changes503Have the code-reviewer subagent look at my recent changes

504```504```


525 525 

526One of the most effective uses for subagents is isolating operations that produce large amounts of output. Running tests, fetching documentation, or processing log files can consume significant context. By delegating these to a subagent, the verbose output stays in the subagent's context while only the relevant summary returns to your main conversation.526One of the most effective uses for subagents is isolating operations that produce large amounts of output. Running tests, fetching documentation, or processing log files can consume significant context. By delegating these to a subagent, the verbose output stays in the subagent's context while only the relevant summary returns to your main conversation.

527 527 

528```528```text theme={null}

529Use a subagent to run the test suite and report only the failing tests with their error messages529Use a subagent to run the test suite and report only the failing tests with their error messages

530```530```

531 531 


533 533 

534For independent investigations, spawn multiple subagents to work simultaneously:534For independent investigations, spawn multiple subagents to work simultaneously:

535 535 

536```536```text theme={null}

537Research the authentication, database, and API modules in parallel using separate subagents537Research the authentication, database, and API modules in parallel using separate subagents

538```538```

539 539 


549 549 

550For multi-step workflows, ask Claude to use subagents in sequence. Each subagent completes its task and returns results to Claude, which then passes relevant context to the next subagent.550For multi-step workflows, ask Claude to use subagents in sequence. Each subagent completes its task and returns results to Claude, which then passes relevant context to the next subagent.

551 551 

552```552```text theme={null}

553Use the code-reviewer subagent to find performance issues, then use the optimizer subagent to fix them553Use the code-reviewer subagent to find performance issues, then use the optimizer subagent to fix them

554```554```

555 555 


584 584 

585When a subagent completes, Claude receives its agent ID. To resume a subagent, ask Claude to continue the previous work:585When a subagent completes, Claude receives its agent ID. To resume a subagent, ask Claude to continue the previous work:

586 586 

587```587```text theme={null}

588Use the code-reviewer subagent to review the authentication module588Use the code-reviewer subagent to review the authentication module

589[Agent completes]589[Agent completes]

590 590 

Details

833function example() {833function example() {

834 return "hello";834 return "hello";

835}835}

836```836```text

837````837````

838 838 

839Instead of properly tagged blocks like:839Instead of properly tagged blocks like:


843function example() {843function example() {

844 return "hello";844 return "hello";

845}845}

846```846```text

847````847````

848 848 

849**Solutions:**849**Solutions:**

vs-code.md +18 −16

Details

14 14 

15## Prerequisites15## Prerequisites

16 16 

17Before installing, make sure you have:

18 

17* VS Code 1.98.0 or higher19* VS Code 1.98.0 or higher

18* An Anthropic account (you'll sign in when you first open the extension). If you're using a third-party provider like Amazon Bedrock or Google Vertex AI, see [Use third-party providers](#use-third-party-providers) instead.20* An Anthropic account (you'll sign in when you first open the extension). If you're using a third-party provider like Amazon Bedrock or Google Vertex AI, see [Use third-party providers](#use-third-party-providers) instead.

19 21 


47 Other ways to open Claude Code:49 Other ways to open Claude Code:

48 50 

49 * **Command Palette**: `Cmd+Shift+P` (Mac) or `Ctrl+Shift+P` (Windows/Linux), type "Claude Code", and select an option like "Open in New Tab"51 * **Command Palette**: `Cmd+Shift+P` (Mac) or `Ctrl+Shift+P` (Windows/Linux), type "Claude Code", and select an option like "Open in New Tab"

50 * **Status Bar**: Click **✱ Claude Code** in the bottom-right corner of the window. This works even when no file is open.52 * **Status Bar**: click **✱ Claude Code** in the bottom-right corner of the window. This works even when no file is open.

51 53 

52 When you first open the panel, a **Learn Claude Code** checklist appears. Work through each item by clicking **Show me**, or dismiss it with the X. To reopen it later, uncheck **Hide Onboarding** in VS Code settings under Extensions → Claude Code.54 When you first open the panel, a **Learn Claude Code** checklist appears. Work through each item by clicking **Show me**, or dismiss it with the X. To reopen it later, uncheck **Hide Onboarding** in VS Code settings under Extensions → Claude Code.

53 55 


81 83 

82The prompt box supports several features:84The prompt box supports several features:

83 85 

84* **Permission modes**: Click the mode indicator at the bottom of the prompt box to switch modes. In normal mode, Claude asks permission before each action. In Plan mode, Claude describes what it will do and waits for approval before making changes. In auto-accept mode, Claude makes edits without asking. Set the default in VS Code settings under `claudeCode.initialPermissionMode`.86* **Permission modes**: click the mode indicator at the bottom of the prompt box to switch modes. In normal mode, Claude asks permission before each action. In Plan mode, Claude describes what it will do and waits for approval before making changes. In auto-accept mode, Claude makes edits without asking. Set the default in VS Code settings under `claudeCode.initialPermissionMode`.

85* **Command menu**: Click `/` or type `/` to open the command menu. Options include attaching files, switching models, toggling extended thinking, and viewing plan usage (`/usage`). The Customize section provides access to MCP servers, hooks, memory, permissions, and plugins. Items with a terminal icon open in the integrated terminal.87* **Command menu**: click `/` or type `/` to open the command menu. Options include attaching files, switching models, toggling extended thinking, and viewing plan usage (`/usage`). The Customize section provides access to MCP servers, hooks, memory, permissions, and plugins. Items with a terminal icon open in the integrated terminal.

86* **Context indicator**: The prompt box shows how much of Claude's context window you're using. Claude automatically compacts when needed, or you can run `/compact` manually.88* **Context indicator**: the prompt box shows how much of Claude's context window you're using. Claude automatically compacts when needed, or you can run `/compact` manually.

87* **Extended thinking**: Lets Claude spend more time reasoning through complex problems. Toggle it on via the command menu (`/`). See [Extended thinking](/en/common-workflows#use-extended-thinking-thinking-mode) for details.89* **Extended thinking**: lets Claude spend more time reasoning through complex problems. Toggle it on via the command menu (`/`). See [Extended thinking](/en/common-workflows#use-extended-thinking-thinking-mode) for details.

88* **Multi-line input**: Press `Shift+Enter` to add a new line without sending. This also works in the "Other" free-text input of question dialogs.90* **Multi-line input**: press `Shift+Enter` to add a new line without sending. This also works in the "Other" free-text input of question dialogs.

89 91 

90### Reference files and folders92### Reference files and folders

91 93 

92Use @-mentions to give Claude context about specific files or folders. When you type `@` followed by a file or folder name, Claude reads that content and can answer questions about it or make changes to it. Claude Code supports fuzzy matching, so you can type partial names to find what you need:94Use @-mentions to give Claude context about specific files or folders. When you type `@` followed by a file or folder name, Claude reads that content and can answer questions about it or make changes to it. Claude Code supports fuzzy matching, so you can type partial names to find what you need:

93 95 

94```96```text theme={null}

95> Explain the logic in @auth (fuzzy matches auth.js, AuthService.ts, etc.)97> Explain the logic in @auth (fuzzy matches auth.js, AuthService.ts, etc.)

96> What's in @src/components/ (include a trailing slash for folders)98> What's in @src/components/ (include a trailing slash for folders)

97```99```


136 138 

137You can drag the Claude panel to reposition it anywhere in VS Code. Grab the panel's tab or title bar and drag it to:139You can drag the Claude panel to reposition it anywhere in VS Code. Grab the panel's tab or title bar and drag it to:

138 140 

139* **Secondary sidebar**: The right side of the window. Keeps Claude visible while you code.141* **Secondary sidebar**: the right side of the window. Keeps Claude visible while you code.

140* **Primary sidebar**: The left sidebar with icons for Explorer, Search, etc.142* **Primary sidebar**: the left sidebar with icons for Explorer, Search, etc.

141* **Editor area**: Opens Claude as a tab alongside your files. Useful for side tasks.143* **Editor area**: opens Claude as a tab alongside your files. Useful for side tasks.

142 144 

143<Tip>145<Tip>

144 Use the sidebar for your main Claude session and open additional tabs for side tasks. Claude remembers your preferred location. Note that the Spark icon only appears in the Activity Bar when the Claude panel is docked to the left. Since Claude defaults to the right side, use the Editor Toolbar icon to open Claude.146 Use the sidebar for your main Claude session and open additional tabs for side tasks. Claude remembers your preferred location. Note that the Spark icon only appears in the Activity Bar when the Claude panel is docked to the left. Since Claude defaults to the right side, use the Editor Toolbar icon to open Claude.


173 175 

174When you install a plugin, choose the installation scope:176When you install a plugin, choose the installation scope:

175 177 

176* **Install for you**: Available in all your projects (user scope)178* **Install for you**: available in all your projects (user scope)

177* **Install for this project**: Shared with project collaborators (project scope)179* **Install for this project**: shared with project collaborators (project scope)

178* **Install locally**: Only for you, only in this repository (local scope)180* **Install locally**: only for you, only in this repository (local scope)

179 181 

180### Manage marketplaces182### Manage marketplaces

181 183 


235 237 

236The extension has two types of settings:238The extension has two types of settings:

237 239 

238* **Extension settings** in VS Code: Control the extension's behavior within VS Code. Open with `Cmd+,` (Mac) or `Ctrl+,` (Windows/Linux), then go to Extensions → Claude Code. You can also type `/` and select **General Config** to open settings.240* **Extension settings** in VS Code: control the extension's behavior within VS Code. Open with `Cmd+,` (Mac) or `Ctrl+,` (Windows/Linux), then go to Extensions → Claude Code. You can also type `/` and select **General Config** to open settings.

239* **Claude Code settings** in `~/.claude/settings.json`: Shared between the extension and CLI. Use for allowed commands, environment variables, hooks, and MCP servers. See [Settings](/en/settings) for details.241* **Claude Code settings** in `~/.claude/settings.json`: shared between the extension and CLI. Use for allowed commands, environment variables, hooks, and MCP servers. See [Settings](/en/settings) for details.

240 242 

241<Tip>243<Tip>

242 Add `"$schema": "https://json.schemastore.org/claude-code-settings.json"` to your `settings.json` to get autocomplete and inline validation for all available settings directly in VS Code.244 Add `"$schema": "https://json.schemastore.org/claude-code-settings.json"` to your `settings.json` to get autocomplete and inline validation for all available settings directly in VS Code.


320 322 

321Claude can stage changes, write commit messages, and create pull requests based on your work:323Claude can stage changes, write commit messages, and create pull requests based on your work:

322 324 

323```325```text theme={null}

324> commit my changes with a descriptive message326> commit my changes with a descriptive message

325> create a pr for this feature327> create a pr for this feature

326> summarize the changes I've made to the auth module328> summarize the changes I've made to the auth module