SpyBara
Go Premium

Documentation 2026-01-07 21:01 UTC to 2026-01-08 21:02 UTC

13 files changed +465 −88. View all changes and history on the product overview
2026
Sat 31 03:42 Fri 30 18:07 Thu 29 21:03 Wed 28 15:06 Tue 27 21:01 Mon 26 21:03 Sun 25 03:34 Sat 24 03:29 Fri 23 21:01 Thu 22 21:03 Wed 21 21:05 Tue 20 21:03 Mon 19 21:01 Fri 16 21:01 Wed 14 06:02 Mon 12 21:02 Sun 11 18:02 Sat 10 21:01 Fri 9 21:01 Thu 8 21:02 Wed 7 21:01 Tue 6 21:01 Sat 3 18:02
Details

16* **Repositories not on your local machine**: Work on code you don't have checked out locally16* **Repositories not on your local machine**: Work on code you don't have checked out locally

17* **Backend changes**: Where Claude Code can write tests and then write code to pass those tests17* **Backend changes**: Where Claude Code can write tests and then write code to pass those tests

18 18 

19Claude Code is also available on the Claude iOS app. This is perfect for:19Claude Code is also available on the Claude iOS app for kicking off tasks on the go and monitoring work in progress.

20 20 

21* **On the go**: Kick off tasks while commuting or away from laptop21You 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.

22* **Monitoring**: Watch the trajectory and steer the agent's work

23 

24Developers can also move Claude Code sessions from the Claude app to their terminal to continue tasks locally.

25 22 

26## Who can use Claude Code on the web?23## Who can use Claude Code on the web?

27 24 


54 51 

55## Moving tasks between web and terminal52## Moving tasks between web and terminal

56 53 

54You 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.

55 

56<Note>

57 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.

58</Note>

59 

60### From terminal to web

61 

62Start a message with `&` inside Claude Code to send a task to run on the web:

63 

64```

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

66```

67 

68This 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.

69 

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

71 

72```bash theme={null}

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

74```

75 

76#### Tips for background tasks

77 

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

79 

80```bash theme={null}

81claude --permission-mode plan

82```

83 

84In 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:

85 

86```

87& Execute the migration plan we discussed

88```

89 

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

91 

92**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:

93 

94```

95& Fix the flaky test in auth.spec.ts

96& Update the API documentation

97& Refactor the logger to use structured output

98```

99 

100Monitor 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.

101 

57### From web to terminal102### From web to terminal

58 103 

59After starting a task on the web:104There are several ways to pull a web session into your terminal:

105 

106* **Using `/teleport`**: From within Claude Code, run `/teleport` (or `/tp`) to see an interactive picker of your web sessions. If you have uncommitted changes, you'll be prompted to stash them first.

107* **Using `--teleport`**: From the command line, run `claude --teleport` for an interactive session picker, or `claude --teleport <session-id>` to resume a specific session directly.

108* **From `/tasks`**: Run `/tasks` to see your background sessions, then press `t` to teleport into one

109* **From the web interface**: Click "Open in CLI" to copy a command you can paste into your terminal

60 110 

611. Click the "Open in CLI" button111When you teleport a session, Claude verifies you're in the correct repository, fetches and checks out the branch from the remote session, and loads the full conversation history into your terminal.

622. Paste and run the command in your terminal in a checkout of the repo112 

633. Any existing local changes will be stashed, and the remote session will be loaded113#### Requirements for teleporting

644. Continue working locally114 

115Teleport checks these requirements before resuming a session. If any requirement isn't met, you'll see an error or be prompted to resolve the issue.

116 

117| Requirement | Details |

118| ------------------ | ---------------------------------------------------------------------------------------------------------------------- |

119| Clean git state | Your working directory must have no uncommitted changes. Teleport prompts you to stash changes if needed. |

120| Correct repository | You must run `--teleport` from a checkout of the same repository, not a fork. |

121| Branch available | The branch from the web session must have been pushed to the remote. Teleport automatically fetches and checks it out. |

122| Same account | You must be authenticated to the same Claude.ai account used in the web session. |

65 123 

66## Cloud environment124## Cloud environment

67 125 


127 185 

128**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.186**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.

129 187 

188**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.

189 

130<Note>190<Note>

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

132 192 

Details

56| `--strict-mcp-config` | Only use MCP servers from `--mcp-config`, ignoring all other MCP configurations | `claude --strict-mcp-config --mcp-config ./mcp.json` |56| `--strict-mcp-config` | Only use MCP servers from `--mcp-config`, ignoring all other MCP configurations | `claude --strict-mcp-config --mcp-config ./mcp.json` |

57| `--system-prompt` | Replace the entire system prompt with custom text (works in both interactive and print modes) | `claude --system-prompt "You are a Python expert"` |57| `--system-prompt` | Replace the entire system prompt with custom text (works in both interactive and print modes) | `claude --system-prompt "You are a Python expert"` |

58| `--system-prompt-file` | Load system prompt from a file, replacing the default prompt (print mode only) | `claude -p --system-prompt-file ./custom-prompt.txt "query"` |58| `--system-prompt-file` | Load system prompt from a file, replacing the default prompt (print mode only) | `claude -p --system-prompt-file ./custom-prompt.txt "query"` |

59| `--tools` | Specify the list of available tools from the built-in set (use `""` to disable all, `"default"` for all, or tool names like `"Bash,Edit,Read"`) | `claude -p --tools "Bash,Edit,Read" "query"` |59| `--tools` | Restrict which built-in tools Claude can use (works in both interactive and print modes). Use `""` to disable all, `"default"` for all, or tool names like `"Bash,Edit,Read"` | `claude --tools "Bash,Edit,Read"` |

60| `--verbose` | Enable verbose logging, shows full turn-by-turn output (helpful for debugging in both print and interactive modes) | `claude --verbose` |60| `--verbose` | Enable verbose logging, shows full turn-by-turn output (helpful for debugging in both print and interactive modes) | `claude --verbose` |

61| `--version`, `-v` | Output the version number | `claude -v` |61| `--version`, `-v` | Output the version number | `claude -v` |

62 62 

Details

454 * Include screenshots of errors, UI designs, or diagrams for better context454 * Include screenshots of errors, UI designs, or diagrams for better context

455 * You can work with multiple images in a conversation455 * You can work with multiple images in a conversation

456 * Image analysis works with diagrams, screenshots, mockups, and more456 * Image analysis works with diagrams, screenshots, mockups, and more

457 * When Claude references images (for example, `[Image #1]`), `Cmd+Click` (Mac) or `Ctrl+Click` (Windows/Linux) the link to open the image in your default viewer

457</Tip>458</Tip>

458 459 

459***460***


509 Sonnet 4.5 and Opus 4.5 have thinking enabled by default. All other models have thinking disabled by default. Use `/model` to view or switch your current model.510 Sonnet 4.5 and Opus 4.5 have thinking enabled by default. All other models have thinking disabled by default. Use `/model` to view or switch your current model.

510</Note>511</Note>

511 512 

512You can configure thinking mode for Claude Code in two ways:513You can configure thinking mode for Claude Code in several ways:

513 514 

514| Scope | How to enable | Details |515| Scope | How to enable | Details |

515| --------------------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ |516| --------------------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ |

517| **Toggle shortcut** | Press `Option+T` (macOS) or `Alt+T` (Windows/Linux) | Toggle thinking on/off. May require [terminal configuration](/en/terminal-config) to enable Option key shortcuts |

516| **Global default** | Use `/config` to toggle thinking mode on | Sets your default across all projects.<br />Saved as `alwaysThinkingEnabled` in `~/.claude/settings.json` |518| **Global default** | Use `/config` to toggle thinking mode on | Sets your default across all projects.<br />Saved as `alwaysThinkingEnabled` in `~/.claude/settings.json` |

517| **Environment variable override** | Set [`MAX_THINKING_TOKENS`](/en/settings#environment-variables) environment variable | When set, applies a custom token budget to all requests, overriding your thinking mode configuration. Example: `export MAX_THINKING_TOKENS=1024` |519| **Environment variable override** | Set [`MAX_THINKING_TOKENS`](/en/settings#environment-variables) environment variable | When set, applies a custom token budget to all requests, overriding your thinking mode configuration. Example: `export MAX_THINKING_TOKENS=1024` |

518 520 

hooks.md +46 −3

Details

146 146 

147See the [plugin components reference](/en/plugins-reference#hooks) for details on creating plugin hooks.147See the [plugin components reference](/en/plugins-reference#hooks) for details on creating plugin hooks.

148 148 

149### Hooks in Skills, Agents, and Slash Commands

150 

151In addition to settings files and plugins, hooks can be defined directly in [Skills](/en/skills), [subagents](/en/sub-agents), and [slash commands](/en/slash-commands) using frontmatter. These hooks are scoped to the component's lifecycle and only run when that component is active.

152 

153**Supported events**: `PreToolUse`, `PostToolUse`, and `Stop`

154 

155**Example in a Skill**:

156 

157```yaml theme={null}

158---

159name: secure-operations

160description: Perform operations with security checks

161hooks:

162 PreToolUse:

163 - matcher: "Bash"

164 hooks:

165 - type: command

166 command: "./scripts/security-check.sh"

167---

168```

169 

170**Example in an agent**:

171 

172```yaml theme={null}

173---

174name: code-reviewer

175description: Review code changes

176hooks:

177 PostToolUse:

178 - matcher: "Edit|Write"

179 hooks:

180 - type: command

181 command: "./scripts/run-linter.sh"

182---

183```

184 

185Component-scoped hooks follow the same configuration format as settings-based hooks but are automatically cleaned up when the component finishes executing.

186 

187**Additional option for skills and slash commands:**

188 

189* `once`: Set to `true` to run the hook only once per session. After the first successful execution, the hook is removed. Note: This option is currently only supported for skills and slash commands, not for agents.

190 

149## Prompt-Based Hooks191## Prompt-Based Hooks

150 192 

151In addition to bash command hooks (`type: "command"`), Claude Code supports prompt-based hooks (`type: "prompt"`) that use an LLM to evaluate whether to allow or block an action. Prompt-based hooks are currently only supported for `Stop` and `SubagentStop` hooks, where they enable intelligent, context-aware decisions.193In addition to bash command hooks (`type: "command"`), Claude Code supports prompt-based hooks (`type: "prompt"`) that use an LLM to evaluate whether to allow or block an action. Prompt-based hooks are currently only supported for `Stop` and `SubagentStop` hooks, where they enable intelligent, context-aware decisions.


685 727 

686Additionally, hooks can modify tool inputs before execution using `updatedInput`:728Additionally, hooks can modify tool inputs before execution using `updatedInput`:

687 729 

688* `updatedInput` allows you to modify the tool's input parameters before the tool executes.730* `updatedInput` modifies the tool's input parameters before the tool executes

689* This is most useful with `"permissionDecision": "allow"` to modify and approve tool calls.731* Combine with `"permissionDecision": "allow"` to modify the input and auto-approve the tool call

732* Combine with `"permissionDecision": "ask"` to modify the input and show it to the user for confirmation

690 733 

691```json theme={null}734```json theme={null}

692{735{

693 "hookSpecificOutput": {736 "hookSpecificOutput": {

694 "hookEventName": "PreToolUse",737 "hookEventName": "PreToolUse",

695 "permissionDecision": "allow"738 "permissionDecision": "allow",

696 "permissionDecisionReason": "My reason here",739 "permissionDecisionReason": "My reason here",

697 "updatedInput": {740 "updatedInput": {

698 "field_to_modify": "new value"741 "field_to_modify": "new value"

iam.md +25 −3

Details

92 92 

93**Bash**93**Bash**

94 94 

95Bash permission rules support both prefix matching with `:*` and wildcard matching with `*`:

96 

95* `Bash(npm run build)` Matches the exact Bash command `npm run build`97* `Bash(npm run build)` Matches the exact Bash command `npm run build`

96* `Bash(npm run test:*)` Matches Bash commands starting with `npm run test`98* `Bash(npm run test:*)` Matches Bash commands starting with `npm run test`

97* `Bash(curl http://site.com/:*)` Matches curl commands that start with exactly `curl http://site.com/`99* `Bash(npm *)` Matches any command starting with `npm ` (e.g., `npm install`, `npm run build`)

100* `Bash(* install)` Matches any command ending with ` install` (e.g., `npm install`, `yarn install`)

101* `Bash(git * main)` Matches commands like `git checkout main`, `git merge main`

98 102 

99<Tip>103<Tip>

100 Claude Code is aware of shell operators (like `&&`) so a prefix match rule like `Bash(safe-cmd:*)` won't give it permission to run the command `safe-cmd && other-cmd`104 Claude Code is aware of shell operators (like `&&`) so a prefix match rule like `Bash(safe-cmd:*)` won't give it permission to run the command `safe-cmd && other-cmd`


103<Warning>107<Warning>

104 Important limitations of Bash permission patterns:108 Important limitations of Bash permission patterns:

105 109 

106 1. This tool uses **prefix matches**, not regex or glob patterns110 1. The `:*` wildcard only works at the end of a pattern for prefix matching

107 2. The wildcard `:*` only works at the end of a pattern to match any continuation111 2. The `*` wildcard can appear at any position and matches any sequence of characters

108 3. Patterns like `Bash(curl http://github.com/:*)` can be bypassed in many ways:112 3. Patterns like `Bash(curl http://github.com/:*)` can be bypassed in many ways:

109 * Options before URL: `curl -X GET http://github.com/...` won't match113 * Options before URL: `curl -X GET http://github.com/...` won't match

110 * Different protocol: `curl https://github.com/...` won't match114 * Different protocol: `curl https://github.com/...` won't match


151* `mcp__puppeteer__*` Wildcard syntax that also matches all tools from the `puppeteer` server155* `mcp__puppeteer__*` Wildcard syntax that also matches all tools from the `puppeteer` server

152* `mcp__puppeteer__puppeteer_navigate` Matches the `puppeteer_navigate` tool provided by the `puppeteer` server156* `mcp__puppeteer__puppeteer_navigate` Matches the `puppeteer_navigate` tool provided by the `puppeteer` server

153 157 

158**Task (Subagents)**

159 

160Use `Task(AgentName)` rules to control which [subagents](/en/sub-agents) Claude can use:

161 

162* `Task(Explore)` Matches the Explore subagent

163* `Task(Plan)` Matches the Plan subagent

164* `Task(Verify)` Matches the Verify subagent

165 

166Add these rules to the `deny` array in your [settings](/en/settings#permission-settings) or use the `--disallowedTools` CLI flag to disable specific agents. For example, to disable the Explore agent:

167 

168```json theme={null}

169{

170 "permissions": {

171 "deny": ["Task(Explore)"]

172 }

173}

174```

175 

154### Additional permission control with hooks176### Additional permission control with hooks

155 177 

156[Claude Code hooks](/en/hooks-guide) provide a way to register custom shell commands to perform permission evaluation at runtime. When Claude Code makes a tool call, PreToolUse hooks run before the permission system runs, and the hook output can determine whether to approve or deny the tool call in place of the permission system.178[Claude Code hooks](/en/hooks-guide) provide a way to register custom shell commands to perform permission evaluation at runtime. When Claude Code makes a tool call, PreToolUse hooks run before the permission system runs, and the hook output can determine whether to approve or deny the tool call in place of the permission system.

Details

5## Keyboard shortcuts5## Keyboard shortcuts

6 6 

7<Note>7<Note>

8 Keyboard shortcuts may vary by platform and terminal. Press `?` to see available shortcuts for your environment. For example, Option key combinations on macOS may require configuring your terminal to use Option as a meta/escape key.8 Keyboard shortcuts may vary by platform and terminal. Press `?` to see available shortcuts for your environment.

9 

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

11 

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

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

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

15 

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

9</Note>17</Note>

10 18 

11### General controls19### General controls

12 20 

13| Shortcut | Description | Context |21| Shortcut | Description | Context |

14| :-------------------------------------------- | :--------------------------------- | :---------------------------------------------------------- |22| :------------------------------------------------ | :--------------------------------- | :-------------------------------------------------------------------------------------------- |

15| `Ctrl+C` | Cancel current input or generation | Standard interrupt |23| `Ctrl+C` | Cancel current input or generation | Standard interrupt |

16| `Ctrl+D` | Exit Claude Code session | EOF signal |24| `Ctrl+D` | Exit Claude Code session | EOF signal |

17| `Ctrl+L` | Clear terminal screen | Keeps conversation history |25| `Ctrl+L` | Clear terminal screen | Keeps conversation history |

18| `Ctrl+O` | Toggle verbose output | Shows detailed tool usage and execution |26| `Ctrl+O` | Toggle verbose output | Shows detailed tool usage and execution |

19| `Ctrl+R` | Reverse search command history | Search through previous commands interactively |27| `Ctrl+R` | Reverse search command history | Search through previous commands interactively |

20| `Ctrl+V` (macOS/Linux) or `Alt+V` (Windows) | Paste image from clipboard | Pastes an image or path to an image file |28| `Ctrl+V` or `Cmd+V` (iTerm2) or `Alt+V` (Windows) | Paste image from clipboard | Pastes an image or path to an image file |

29| `Ctrl+B` | Background running tasks | Backgrounds bash commands and agents. Tmux users press twice |

30| `Left/Right arrows` | Cycle through dialog tabs | Navigate between tabs in permission dialogs and menus |

21| `Up/Down arrows` | Navigate command history | Recall previous inputs |31| `Up/Down arrows` | Navigate command history | Recall previous inputs |

22| `Esc` + `Esc` | Rewind the code/conversation | Restore the code and/or conversation to a previous point |32| `Esc` + `Esc` | Rewind the code/conversation | Restore the code and/or conversation to a previous point |

23| `Shift+Tab` or `Alt+M` (some configurations) | Toggle permission modes | Switch between Auto-Accept Mode, Plan Mode, and normal mode |33| `Shift+Tab` or `Alt+M` (some configurations) | Toggle permission modes | Switch between Auto-Accept Mode, Plan Mode, and normal mode |

24| `Option+P` (macOS) or `Alt+P` (Windows/Linux) | Switch model | Switch models without clearing your prompt |34| `Option+P` (macOS) or `Alt+P` (Windows/Linux) | Switch model | Switch models without clearing your prompt |

35| `Option+T` (macOS) or `Alt+T` (Windows/Linux) | Toggle extended thinking | Enable or disable extended thinking mode. Run `/terminal-setup` first to enable this shortcut |

36 

37### Text editing

38 

39| Shortcut | Description | Context |

40| :----------------------- | :--------------------------- | :------------------------------------------------------------------------------------------------------------ |

41| `Ctrl+K` | Delete to end of line | Stores deleted text for pasting |

42| `Ctrl+U` | Delete entire line | Stores deleted text for pasting |

43| `Ctrl+Y` | Paste deleted text | Paste text deleted with `Ctrl+K` or `Ctrl+U` |

44| `Alt+Y` (after `Ctrl+Y`) | Cycle paste history | After pasting, cycle through previously deleted text. Requires [Option as Meta](#keyboard-shortcuts) on macOS |

45| `Alt+B` | Move cursor back one word | Word navigation. Requires [Option as Meta](#keyboard-shortcuts) on macOS |

46| `Alt+F` | Move cursor forward one word | Word navigation. Requires [Option as Meta](#keyboard-shortcuts) on macOS |

47 

48### Theme and display

49 

50| Shortcut | Description | Context |

51| :------- | :----------------------------------------- | :----------------------------------------------------------------------------------------------------------- |

52| `Ctrl+T` | Toggle syntax highlighting for code blocks | Only works inside the `/theme` picker menu. Controls whether code in Claude's responses uses syntax coloring |

53 

54<Note>

55 Syntax highlighting is only available in the native build of Claude Code.

56</Note>

25 57 

26### Multiline input58### Multiline input

27 59 

28| Method | Shortcut | Context |60| Method | Shortcut | Context |

29| :--------------- | :------------- | :-------------------------------- |61| :--------------- | :------------- | :------------------------------------------------------ |

30| Quick escape | `\` + `Enter` | Works in all terminals |62| Quick escape | `\` + `Enter` | Works in all terminals |

31| macOS default | `Option+Enter` | Default on macOS |63| macOS default | `Option+Enter` | Default on macOS |

32| Terminal setup | `Shift+Enter` | After `/terminal-setup` |64| Shift+Enter | `Shift+Enter` | Works out of the box in iTerm2, WezTerm, Ghostty, Kitty |

33| Control sequence | `Ctrl+J` | Line feed character for multiline |65| Control sequence | `Ctrl+J` | Line feed character for multiline |

34| Paste mode | Paste directly | For code blocks, logs |66| Paste mode | Paste directly | For code blocks, logs |

35 67 

36<Tip>68<Tip>

37 Configure your preferred line break behavior in terminal settings. Run `/terminal-setup` to install Shift+Enter binding for iTerm2 and VS Code terminals.69 Shift+Enter works without configuration in iTerm2, WezTerm, Ghostty, and Kitty. For other terminals (VS Code, Alacritty, Zed, Warp), run `/terminal-setup` to install the binding.

38</Tip>70</Tip>

39 71 

40### Quick commands72### Quick commands


64### Navigation (NORMAL mode)96### Navigation (NORMAL mode)

65 97 

66| Command | Action |98| Command | Action |

67| :-------------- | :------------------------ |99| :-------------- | :-------------------------------------------------- |

68| `h`/`j`/`k`/`l` | Move left/down/up/right |100| `h`/`j`/`k`/`l` | Move left/down/up/right |

69| `w` | Next word |101| `w` | Next word |

70| `e` | End of word |102| `e` | End of word |


74| `^` | First non-blank character |106| `^` | First non-blank character |

75| `gg` | Beginning of input |107| `gg` | Beginning of input |

76| `G` | End of input |108| `G` | End of input |

109| `f{char}` | Jump to next occurrence of character |

110| `F{char}` | Jump to previous occurrence of character |

111| `t{char}` | Jump to just before next occurrence of character |

112| `T{char}` | Jump to just after previous occurrence of character |

113| `;` | Repeat last f/F/t/T motion |

114| `,` | Repeat last f/F/t/T motion in reverse |

77 115 

78### Editing (NORMAL mode)116### Editing (NORMAL mode)

79 117 


86| `cc` | Change line |124| `cc` | Change line |

87| `C` | Change to end of line |125| `C` | Change to end of line |

88| `cw`/`ce`/`cb` | Change word/to end/back |126| `cw`/`ce`/`cb` | Change word/to end/back |

127| `yy`/`Y` | Yank (copy) line |

128| `yw`/`ye`/`yb` | Yank word/to end/back |

129| `p` | Paste after cursor |

130| `P` | Paste before cursor |

131| `>>` | Indent line |

132| `<<` | Dedent line |

133| `J` | Join lines |

89| `.` | Repeat last change |134| `.` | Repeat last change |

90 135 

136### Text objects (NORMAL mode)

137 

138Text objects work with operators like `d`, `c`, and `y`:

139 

140| Command | Action |

141| :-------- | :--------------------------------------- |

142| `iw`/`aw` | Inner/around word |

143| `iW`/`aW` | Inner/around WORD (whitespace-delimited) |

144| `i"`/`a"` | Inner/around double quotes |

145| `i'`/`a'` | Inner/around single quotes |

146| `i(`/`a(` | Inner/around parentheses |

147| `i[`/`a[` | Inner/around brackets |

148| `i{`/`a{` | Inner/around braces |

149 

91## Command history150## Command history

92 151 

93Claude Code maintains command history for the current session:152Claude Code maintains command history for the current session:

mcp.md +4 −0

Details

315/mcp315/mcp

316```316```

317 317 

318### Dynamic tool updates

319 

320Claude Code supports MCP `list_changed` notifications, allowing MCP servers to dynamically update their available tools, prompts, and resources without requiring you to disconnect and reconnect. When an MCP server sends a `list_changed` notification, Claude Code automatically refreshes the available capabilities from that server.

321 

318<Tip>322<Tip>

319 Tips:323 Tips:

320 324 

quickstart.md +5 −5

Details

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

21 **macOS, Linux, WSL:**21 **macOS, Linux, WSL:**

22 22 

23 ```bash theme={null} theme={null}23 ```bash theme={null}

24 curl -fsSL https://claude.ai/install.sh | bash24 curl -fsSL https://claude.ai/install.sh | bash

25 ```25 ```

26 26 

27 **Windows PowerShell:**27 **Windows PowerShell:**

28 28 

29 ```powershell theme={null} theme={null}29 ```powershell theme={null}

30 irm https://claude.ai/install.ps1 | iex30 irm https://claude.ai/install.ps1 | iex

31 ```31 ```

32 32 

33 **Windows CMD:**33 **Windows CMD:**

34 34 

35 ```batch theme={null} theme={null}35 ```batch theme={null}

36 curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd36 curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd

37 ```37 ```

38 </Tab>38 </Tab>

39 39 

40 <Tab title="Homebrew">40 <Tab title="Homebrew">

41 ```sh theme={null} theme={null}41 ```sh theme={null}

42 brew install --cask claude-code42 brew install --cask claude-code

43 ```43 ```

44 </Tab>44 </Tab>


46 <Tab title="NPM">46 <Tab title="NPM">

47 If you have [Node.js 18 or newer installed](https://nodejs.org/en/download/):47 If you have [Node.js 18 or newer installed](https://nodejs.org/en/download/):

48 48 

49 ```sh theme={null} theme={null}49 ```sh theme={null}

50 npm install -g @anthropic-ai/claude-code50 npm install -g @anthropic-ai/claude-code

51 ```51 ```

52 </Tab>52 </Tab>

settings.md +7 −3

Details

144| `otelHeadersHelper` | Script to generate dynamic OpenTelemetry headers. Runs at startup and periodically (see [Dynamic headers](/en/monitoring-usage#dynamic-headers)) | `/bin/generate_otel_headers.sh` |144| `otelHeadersHelper` | Script to generate dynamic OpenTelemetry headers. Runs at startup and periodically (see [Dynamic headers](/en/monitoring-usage#dynamic-headers)) | `/bin/generate_otel_headers.sh` |

145| `statusLine` | Configure a custom status line to display context. See [`statusLine` documentation](/en/statusline) | `{"type": "command", "command": "~/.claude/statusline.sh"}` |145| `statusLine` | Configure a custom status line to display context. See [`statusLine` documentation](/en/statusline) | `{"type": "command", "command": "~/.claude/statusline.sh"}` |

146| `fileSuggestion` | Configure a custom script for `@` file autocomplete. See [File suggestion settings](#file-suggestion-settings) | `{"type": "command", "command": "~/.claude/file-suggestion.sh"}` |146| `fileSuggestion` | Configure a custom script for `@` file autocomplete. See [File suggestion settings](#file-suggestion-settings) | `{"type": "command", "command": "~/.claude/file-suggestion.sh"}` |

147| `respectGitignore` | Control whether the `@` file picker respects `.gitignore` patterns. When `true` (default), files matching `.gitignore` patterns are excluded from suggestions | `false` |

147| `outputStyle` | Configure an output style to adjust the system prompt. See [output styles documentation](/en/output-styles) | `"Explanatory"` |148| `outputStyle` | Configure an output style to adjust the system prompt. See [output styles documentation](/en/output-styles) | `"Explanatory"` |

148| `forceLoginMethod` | Use `claudeai` to restrict login to Claude.ai accounts, `console` to restrict login to Claude Console (API usage billing) accounts | `claudeai` |149| `forceLoginMethod` | Use `claudeai` to restrict login to Claude.ai accounts, `console` to restrict login to Claude Console (API usage billing) accounts | `claudeai` |

149| `forceLoginOrgUUID` | Specify the UUID of an organization to automatically select it during login, bypassing the organization selection step. Requires `forceLoginMethod` to be set | `"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"` |150| `forceLoginOrgUUID` | Specify the UUID of an organization to automatically select it during login, bypassing the organization selection step. Requires `forceLoginMethod` to be set | `"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"` |


156| `awsAuthRefresh` | Custom script that modifies the `.aws` directory (see [advanced credential configuration](/en/amazon-bedrock#advanced-credential-configuration)) | `aws sso login --profile myprofile` |157| `awsAuthRefresh` | Custom script that modifies the `.aws` directory (see [advanced credential configuration](/en/amazon-bedrock#advanced-credential-configuration)) | `aws sso login --profile myprofile` |

157| `awsCredentialExport` | Custom script that outputs JSON with AWS credentials (see [advanced credential configuration](/en/amazon-bedrock#advanced-credential-configuration)) | `/bin/generate_aws_grant.sh` |158| `awsCredentialExport` | Custom script that outputs JSON with AWS credentials (see [advanced credential configuration](/en/amazon-bedrock#advanced-credential-configuration)) | `/bin/generate_aws_grant.sh` |

158| `alwaysThinkingEnabled` | Enable [extended thinking](/en/common-workflows#use-extended-thinking) by default for all sessions. Typically configured via the `/config` command rather than editing directly | `true` |159| `alwaysThinkingEnabled` | Enable [extended thinking](/en/common-workflows#use-extended-thinking) by default for all sessions. Typically configured via the `/config` command rather than editing directly | `true` |

160| `language` | Configure Claude's preferred response language (e.g., `"japanese"`, `"spanish"`, `"french"`). Claude will respond in this language by default | `"japanese"` |

159 161 

160### Permission settings162### Permission settings

161 163 


688| `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS` | Set to `1` to disable Anthropic API-specific `anthropic-beta` headers. Use this if experiencing issues like "Unexpected value(s) for the `anthropic-beta` header" when using an LLM gateway with third-party providers |690| `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS` | Set to `1` to disable Anthropic API-specific `anthropic-beta` headers. Use this if experiencing issues like "Unexpected value(s) for the `anthropic-beta` header" when using an LLM gateway with third-party providers |

689| `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` | Equivalent of setting `DISABLE_AUTOUPDATER`, `DISABLE_BUG_COMMAND`, `DISABLE_ERROR_REPORTING`, and `DISABLE_TELEMETRY` |691| `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` | Equivalent of setting `DISABLE_AUTOUPDATER`, `DISABLE_BUG_COMMAND`, `DISABLE_ERROR_REPORTING`, and `DISABLE_TELEMETRY` |

690| `CLAUDE_CODE_DISABLE_TERMINAL_TITLE` | Set to `1` to disable automatic terminal title updates based on conversation context |692| `CLAUDE_CODE_DISABLE_TERMINAL_TITLE` | Set to `1` to disable automatic terminal title updates based on conversation context |

693| `CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS` | Override the default token limit for file reads. Useful when you need to read larger files in full |

694| `CLAUDE_CODE_HIDE_ACCOUNT_INFO` | Set to `1` to hide your email address and organization name from the Claude Code UI. Useful when streaming or recording |

691| `CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL` | Skip auto-installation of IDE extensions |695| `CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL` | Skip auto-installation of IDE extensions |

692| `CLAUDE_CODE_MAX_OUTPUT_TOKENS` | Set the maximum number of output tokens for most requests |696| `CLAUDE_CODE_MAX_OUTPUT_TOKENS` | Set the maximum number of output tokens for most requests |

693| `CLAUDE_CODE_OTEL_HEADERS_HELPER_DEBOUNCE_MS` | Interval for refreshing dynamic OpenTelemetry headers in milliseconds (default: 1740000 / 29 minutes). See [Dynamic headers](/en/monitoring-usage#dynamic-headers) |697| `CLAUDE_CODE_OTEL_HEADERS_HELPER_DEBOUNCE_MS` | Interval for refreshing dynamic OpenTelemetry headers in milliseconds (default: 1740000 / 29 minutes). See [Dynamic headers](/en/monitoring-usage#dynamic-headers) |

698| `CLAUDE_CODE_SHELL` | Override automatic shell detection. Useful when your login shell differs from your preferred working shell (for example, `bash` vs `zsh`) |

694| `CLAUDE_CODE_SHELL_PREFIX` | Command prefix to wrap all bash commands (for example, for logging or auditing). Example: `/path/to/logger.sh` will execute `/path/to/logger.sh <command>` |699| `CLAUDE_CODE_SHELL_PREFIX` | Command prefix to wrap all bash commands (for example, for logging or auditing). Example: `/path/to/logger.sh` will execute `/path/to/logger.sh <command>` |

695| `CLAUDE_CODE_SKIP_BEDROCK_AUTH` | Skip AWS authentication for Bedrock (for example, when using an LLM gateway) |700| `CLAUDE_CODE_SKIP_BEDROCK_AUTH` | Skip AWS authentication for Bedrock (for example, when using an LLM gateway) |

696| `CLAUDE_CODE_SKIP_FOUNDRY_AUTH` | Skip Azure authentication for Microsoft Foundry (for example, when using an LLM gateway) |701| `CLAUDE_CODE_SKIP_FOUNDRY_AUTH` | Skip Azure authentication for Microsoft Foundry (for example, when using an LLM gateway) |


717| `MCP_TIMEOUT` | Timeout in milliseconds for MCP server startup |722| `MCP_TIMEOUT` | Timeout in milliseconds for MCP server startup |

718| `MCP_TOOL_TIMEOUT` | Timeout in milliseconds for MCP tool execution |723| `MCP_TOOL_TIMEOUT` | Timeout in milliseconds for MCP tool execution |

719| `NO_PROXY` | List of domains and IPs to which requests will be directly issued, bypassing proxy |724| `NO_PROXY` | List of domains and IPs to which requests will be directly issued, bypassing proxy |

720| `SLASH_COMMAND_TOOL_CHAR_BUDGET` | Maximum number of characters for slash command metadata shown to [SlashCommand tool](/en/slash-commands#slashcommand-tool) (default: 15000) |725| `SLASH_COMMAND_TOOL_CHAR_BUDGET` | Maximum number of characters for slash command metadata shown to the [Skill tool](/en/slash-commands#skill-tool) (default: 15000) |

721| `USE_BUILTIN_RIPGREP` | Set to `0` to use system-installed `rg` instead of `rg` included with Claude Code |726| `USE_BUILTIN_RIPGREP` | Set to `0` to use system-installed `rg` instead of `rg` included with Claude Code |

722| `VERTEX_REGION_CLAUDE_3_5_HAIKU` | Override region for Claude 3.5 Haiku when using Vertex AI |727| `VERTEX_REGION_CLAUDE_3_5_HAIKU` | Override region for Claude 3.5 Haiku when using Vertex AI |

723| `VERTEX_REGION_CLAUDE_3_7_SONNET` | Override region for Claude 3.7 Sonnet when using Vertex AI |728| `VERTEX_REGION_CLAUDE_3_7_SONNET` | Override region for Claude 3.7 Sonnet when using Vertex AI |


741| **KillShell** | Kills a running background bash shell by its ID | No |746| **KillShell** | Kills a running background bash shell by its ID | No |

742| **NotebookEdit** | Modifies Jupyter notebook cells | Yes |747| **NotebookEdit** | Modifies Jupyter notebook cells | Yes |

743| **Read** | Reads the contents of files | No |748| **Read** | Reads the contents of files | No |

744| **Skill** | Executes a skill within the main conversation | Yes |749| **Skill** | Executes a [skill or slash command](/en/slash-commands#skill-tool) within the main conversation | Yes |

745| **SlashCommand** | Runs a [custom slash command](/en/slash-commands#slashcommand-tool) | Yes |

746| **Task** | Runs a sub-agent to handle complex, multi-step tasks | No |750| **Task** | Runs a sub-agent to handle complex, multi-step tasks | No |

747| **TodoWrite** | Creates and manages structured task lists | No |751| **TodoWrite** | Creates and manages structured task lists | No |

748| **WebFetch** | Fetches content from a specified URL | Yes |752| **WebFetch** | Fetches content from a specified URL | Yes |

skills.md +102 −16

Details

54 </Step>54 </Step>

55 55 

56 <Step title="Load and verify the Skill">56 <Step title="Load and verify the Skill">

57 Exit and restart Claude Code to load the new Skill. Then verify it appears in the list:57 Skills are automatically loaded when created or modified. Verify the Skill appears in the list:

58 58 

59 ```59 ```

60 What Skills are available?60 What Skills are available?


158You can use the following fields in the YAML frontmatter:158You can use the following fields in the YAML frontmatter:

159 159 

160| Field | Required | Description |160| Field | Required | Description |

161| :-------------- | :------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |161| :--------------- | :------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |

162| `name` | Yes | Skill name. Must use lowercase letters, numbers, and hyphens only (max 64 characters). Should match the directory name. |162| `name` | Yes | Skill name. Must use lowercase letters, numbers, and hyphens only (max 64 characters). Should match the directory name. |

163| `description` | Yes | What the Skill does and when to use it (max 1024 characters). Claude uses this to decide when to apply the Skill. |163| `description` | Yes | What the Skill does and when to use it (max 1024 characters). Claude uses this to decide when to apply the Skill. |

164| `allowed-tools` | No | Tools Claude can use without asking permission when this Skill is active. See [Restrict tool access](#restrict-tool-access-with-allowed-tools). |164| `allowed-tools` | No | Tools Claude can use without asking permission when this Skill is active. Supports comma-separated values or YAML-style lists. See [Restrict tool access](#restrict-tool-access-with-allowed-tools). |

165| `model` | No | [Model](https://docs.claude.com/en/docs/about-claude/models/overview) to use when this Skill is active (e.g., `claude-sonnet-4-20250514`). Defaults to the conversation's model. |165| `model` | No | [Model](https://docs.claude.com/en/docs/about-claude/models/overview) to use when this Skill is active (e.g., `claude-sonnet-4-20250514`). Defaults to the conversation's model. |

166| `context` | No | Set to `fork` to run the Skill in a forked sub-agent context with its own conversation history. |

167| `agent` | No | Specify which [agent type](/en/sub-agents#built-in-subagents) to use when `context: fork` is set (e.g., `Explore`, `Plan`, `general-purpose`, or a custom agent name from `.claude/agents/`). Defaults to `general-purpose` if not specified. Only applicable when combined with `context: fork`. |

168| `hooks` | No | Define hooks scoped to this Skill's lifecycle. Supports `PreToolUse`, `PostToolUse`, and `Stop` events. |

169| `user-invocable` | No | Controls whether the Skill appears in the slash command menu. Does not affect the [`Skill` tool](/en/slash-commands#skill-tool) or automatic discovery. Defaults to `true`. See [Control Skill visibility](#control-skill-visibility). |

166 170 

167See the [best practices guide](https://docs.claude.com/en/docs/agents-and-tools/agent-skills/best-practices) for complete authoring guidance including validation rules.171See the [best practices guide](https://docs.claude.com/en/docs/agents-and-tools/agent-skills/best-practices) for complete authoring guidance including validation rules.

168 172 

169### Update or delete a Skill173### Update or delete a Skill

170 174 

171To update a Skill, edit its `SKILL.md` file directly. To remove a Skill, delete its directory. Exit and restart Claude Code for changes to take effect.175To update a Skill, edit its `SKILL.md` file directly. To remove a Skill, delete its directory. Changes take effect immediately.

172 176 

173### Add supporting files with progressive disclosure177### Add supporting files with progressive disclosure

174 178 


230 234 

231### Restrict tool access with allowed-tools235### Restrict tool access with allowed-tools

232 236 

233Use the `allowed-tools` frontmatter field to limit which tools Claude can use when a Skill is active:237Use the `allowed-tools` frontmatter field to limit which tools Claude can use when a Skill is active. You can specify tools as a comma-separated string or a YAML list:

234 238 

235```yaml theme={null}239```yaml theme={null}

236---240---


238description: Read files without making changes. Use when you need read-only file access.242description: Read files without making changes. Use when you need read-only file access.

239allowed-tools: Read, Grep, Glob243allowed-tools: Read, Grep, Glob

240---244---

245```

241 246 

242# Safe File Reader247Or use YAML-style lists for better readability:

243 

244This Skill provides read-only file access.

245 248 

246## Instructions249```yaml theme={null}

2471. Use Read to view file contents250---

2482. Use Grep to search within files251name: reading-files-safely

2493. Use Glob to find files by pattern252description: Read files without making changes. Use when you need read-only file access.

253allowed-tools:

254 - Read

255 - Grep

256 - Glob

257---

250```258```

251 259 

252When this Skill is active, Claude can only use the specified tools (Read, Grep, Glob) without needing to ask for permission. This is useful for:260When this Skill is active, Claude can only use the specified tools (Read, Grep, Glob) without needing to ask for permission. This is useful for:


261 `allowed-tools` is only supported for Skills in Claude Code.269 `allowed-tools` is only supported for Skills in Claude Code.

262</Note>270</Note>

263 271 

264### Use Skills with subagents272### Run Skills in a forked context

273 

274Use `context: fork` to run a Skill in an isolated sub-agent context with its own conversation history. This is useful for Skills that perform complex multi-step operations without cluttering the main conversation:

275 

276```yaml theme={null}

277---

278name: code-analysis

279description: Analyze code quality and generate detailed reports

280context: fork

281---

282```

283 

284### Define hooks for Skills

285 

286Skills can define hooks that run during the Skill's lifecycle. Use the `hooks` field to specify `PreToolUse`, `PostToolUse`, or `Stop` handlers:

287 

288```yaml theme={null}

289---

290name: secure-operations

291description: Perform operations with additional security checks

292hooks:

293 PreToolUse:

294 - matcher: "Bash"

295 hooks:

296 - type: command

297 command: "./scripts/security-check.sh $TOOL_INPUT"

298 once: true

299---

300```

301 

302The `once: true` option runs the hook only once per session. After the first successful execution, the hook is removed.

265 303 

266[Subagents](/en/sub-agents) do not automatically inherit Skills from the main conversation. To give a custom subagent access to specific Skills, list them in the subagent's `skills` field in `.claude/agents/`:304Hooks defined in a Skill are scoped to that Skill's execution and are automatically cleaned up when the Skill finishes.

305 

306See [Hooks](/en/hooks) for the complete hook configuration format.

307 

308### Control Skill visibility

309 

310Skills can be invoked in three ways:

311 

3121. **Manual invocation**: You type `/skill-name` in the prompt

3132. **Programmatic invocation**: Claude calls it via the [`Skill` tool](/en/slash-commands#skill-tool)

3143. **Automatic discovery**: Claude reads the Skill's description and loads it when relevant to the conversation

315 

316The `user-invocable` field controls only manual invocation. When set to `false`, the Skill is hidden from the slash command menu but Claude can still invoke it programmatically or discover it automatically.

317 

318To block programmatic invocation via the `Skill` tool, use `disable-model-invocation: true` instead.

319 

320#### When to use each setting

321 

322| Setting | Slash menu | `Skill` tool | Auto-discovery | Use case |

323| :------------------------------- | :--------- | :----------- | :------------- | :-------------------------------------------------------------- |

324| `user-invocable: true` (default) | Visible | Allowed | Yes | Skills you want users to invoke directly |

325| `user-invocable: false` | Hidden | Allowed | Yes | Skills that Claude can use but users shouldn't invoke manually |

326| `disable-model-invocation: true` | Visible | Blocked | Yes | Skills you want users to invoke but not Claude programmatically |

327 

328#### Example: model-only Skill

329 

330Set `user-invocable: false` to hide a Skill from the slash menu while still allowing Claude to invoke it programmatically:

331 

332```yaml theme={null}

333---

334name: internal-review-standards

335description: Apply internal code review standards when reviewing pull requests

336user-invocable: false

337---

338```

339 

340With this setting, users won't see the Skill in the `/` menu, but Claude can still invoke it via the `Skill` tool or discover it automatically based on context.

341 

342### Skills and subagents

343 

344There are two ways Skills and subagents can work together:

345 

346#### Give a subagent access to Skills

347 

348[Subagents](/en/sub-agents) do not automatically inherit Skills from the main conversation. To give a custom subagent access to specific Skills, list them in the subagent's `skills` field:

267 349 

268```yaml theme={null}350```yaml theme={null}

269# .claude/agents/code-reviewer/AGENT.md351# .claude/agents/code-reviewer.md

270---352---

271name: code-reviewer353name: code-reviewer

272description: Review code for quality and best practices354description: Review code for quality and best practices


277The listed Skills are loaded into the subagent's context when it starts. If the `skills` field is omitted, no Skills are preloaded for that subagent.359The listed Skills are loaded into the subagent's context when it starts. If the `skills` field is omitted, no Skills are preloaded for that subagent.

278 360 

279<Note>361<Note>

280 Built-in agents (Explore, Plan, Verify) and the Task tool do not have access to your Skills. Only custom subagents you define in `.claude/agents/` with an explicit `skills` field can use Skills.362 Built-in agents (Explore, Plan, general-purpose) do not have access to your Skills. Only custom subagents you define in `.claude/agents/` with an explicit `skills` field can use Skills.

281</Note>363</Note>

282 364 

365#### Run a Skill in a subagent context

366 

367Use `context: fork` and `agent` to run a Skill in a forked subagent with its own separate context. See [Run Skills in a forked context](#run-skills-in-a-forked-context) for details.

368 

283### Distribute Skills369### Distribute Skills

284 370 

285You can share Skills in several ways:371You can share Skills in several ways:

slash-commands.md +74 −34

Details

30| `/model` | Select or change the AI model |30| `/model` | Select or change the AI model |

31| `/output-style [style]` | Set the output style directly or from a selection menu |31| `/output-style [style]` | Set the output style directly or from a selection menu |

32| `/permissions` | View or update [permissions](/en/iam#configuring-permissions) |32| `/permissions` | View or update [permissions](/en/iam#configuring-permissions) |

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

33| `/plugin` | Manage Claude Code plugins |34| `/plugin` | Manage Claude Code plugins |

34| `/pr-comments` | View pull request comments |35| `/pr-comments` | View pull request comments |

35| `/privacy-settings` | View and update your privacy settings |36| `/privacy-settings` | View and update your privacy settings |

36| `/release-notes` | View release notes |37| `/release-notes` | View release notes |

37| `/rename <name>` | Rename the current session for easier identification |38| `/rename <name>` | Rename the current session for easier identification |

39| `/remote-env` | Configure remote session environment (claude.ai subscribers) |

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

39| `/review` | Request code review |41| `/review` | Request code review |

40| `/rewind` | Rewind the conversation and/or code |42| `/rewind` | Rewind the conversation and/or code |


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

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

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

46| `/terminal-setup` | Install Shift+Enter key binding for newlines (iTerm2 and VSCode only) |48| `/teleport` | Resume a remote session from claude.ai by session ID, or open a picker (claude.ai subscribers) |

49| `/terminal-setup` | Install Shift+Enter key binding for newlines (VS Code, Alacritty, Zed, Warp) |

50| `/theme` | Change the color theme |

47| `/todos` | List current TODO items |51| `/todos` | List current TODO items |

48| `/usage` | For subscription plans only: show plan usage limits and rate limit status |52| `/usage` | For subscription plans only: show plan usage limits and rate limit status |

49| `/vim` | Enter vim mode for alternating insert and command modes |53| `/vim` | Enter vim mode for alternating insert and command modes |


52 56 

53Custom slash commands allow you to define frequently used prompts as Markdown files that Claude Code can execute. Commands are organized by scope (project-specific or personal) and support namespacing through directory structures.57Custom slash commands allow you to define frequently used prompts as Markdown files that Claude Code can execute. Commands are organized by scope (project-specific or personal) and support namespacing through directory structures.

54 58 

59<Tip>

60 Slash command autocomplete works anywhere in your input, not just at the beginning. Type `/` at any position to see available commands.

61</Tip>

62 

55### Syntax63### Syntax

56 64 

57```65```


200| `argument-hint` | The arguments expected for the slash command. Example: `argument-hint: add [tagId] \| remove [tagId] \| list`. This hint is shown to the user when auto-completing the slash command. | None |208| `argument-hint` | The arguments expected for the slash command. Example: `argument-hint: add [tagId] \| remove [tagId] \| list`. This hint is shown to the user when auto-completing the slash command. | None |

201| `description` | Brief description of the command | Uses the first line from the prompt |209| `description` | Brief description of the command | Uses the first line from the prompt |

202| `model` | Specific model string (see [Models overview](https://docs.claude.com/en/docs/about-claude/models/overview)) | Inherits from the conversation |210| `model` | Specific model string (see [Models overview](https://docs.claude.com/en/docs/about-claude/models/overview)) | Inherits from the conversation |

203| `disable-model-invocation` | Whether to prevent `SlashCommand` tool from calling this command | false |211| `disable-model-invocation` | Whether to prevent the `Skill` tool from calling this command | false |

212| `hooks` | Define hooks scoped to this command's execution. See [Define hooks for commands](#define-hooks-for-commands). | None |

204 213 

205For example:214For example:

206 215 


227Focus on security, performance, and code style.236Focus on security, performance, and code style.

228```237```

229 238 

239#### Define hooks for commands

240 

241Slash commands can define hooks that run during the command's execution. Use the `hooks` field to specify `PreToolUse`, `PostToolUse`, or `Stop` handlers:

242 

243```markdown theme={null}

244---

245description: Deploy to staging with validation

246hooks:

247 PreToolUse:

248 - matcher: "Bash"

249 hooks:

250 - type: command

251 command: "./scripts/validate-deploy.sh"

252 once: true

253---

254 

255Deploy the current branch to staging environment.

256```

257 

258The `once: true` option runs the hook only once per session. After the first successful execution, the hook is removed.

259 

260Hooks defined in a command are scoped to that command's execution and are automatically cleaned up when the command finishes.

261 

262See [Hooks](/en/hooks) for the complete hook configuration format.

263 

230## Plugin commands264## Plugin commands

231 265 

232[Plugins](/en/plugins) can provide custom slash commands that integrate seamlessly with Claude Code. Plugin commands work exactly like user-defined commands but are distributed through [plugin marketplaces](/en/plugin-marketplaces).266[Plugins](/en/plugins) can provide custom slash commands that integrate seamlessly with Claude Code. Plugin commands work exactly like user-defined commands but are distributed through [plugin marketplaces](/en/plugin-marketplaces).


345 379 

346See [MCP permission rules](/en/iam#tool-specific-permission-rules) for more details.380See [MCP permission rules](/en/iam#tool-specific-permission-rules) for more details.

347 381 

348## `SlashCommand` tool382## `Skill` tool

349 383 

350The `SlashCommand` tool allows Claude to execute [custom slash commands](/en/slash-commands#custom-slash-commands) programmatically384<Note>

351during a conversation. This gives Claude the ability to invoke custom commands385 In earlier versions of Claude Code, slash command invocation was provided by a separate `SlashCommand` tool. This has been merged into the `Skill` tool. If you have existing permission rules using `SlashCommand`, update them to use `Skill`.

352on your behalf when appropriate.386</Note>

353 387 

354To encourage Claude to use the `SlashCommand` tool, reference the command by name, including the slash, in your prompts or `CLAUDE.md` file. For example:388The `Skill` tool allows Claude to programmatically invoke both [custom slash commands](/en/slash-commands#custom-slash-commands) and [Agent Skills](/en/skills) during a conversation. This gives Claude the ability to use these capabilities on your behalf when appropriate.

355 389 

356```390### What the `Skill` tool can invoke

357> Run /write-unit-test when you are about to start writing tests.391 

358```392The `Skill` tool provides access to:

359 393 

360This tool puts each available custom slash command's metadata into context up to the character budget limit. You can use `/context` to monitor token usage and follow the operations below to manage context.394| Type | Location | Requirements |

395| :-------------------- | :------------------------------------------- | :--------------------------------------------- |

396| Custom slash commands | `.claude/commands/` or `~/.claude/commands/` | Must have `description` frontmatter |

397| Agent Skills | `.claude/skills/` or `~/.claude/skills/` | Must not have `disable-model-invocation: true` |

361 398 

362### `SlashCommand` tool supported commands399Built-in commands like `/compact` and `/init` are *not* available through this tool.

363 400 

364`SlashCommand` tool only supports custom slash commands that:401### Encourage Claude to use specific commands

402 

403To encourage Claude to use the `Skill` tool, reference the command by name, including the slash, in your prompts or `CLAUDE.md` file:

404 

405```

406> Run /write-unit-test when you are about to start writing tests.

407```

365 408 

366* Are user-defined. Built-in commands like `/compact` and `/init` are *not* supported.409This tool puts each available command's metadata into context up to the character budget limit. Use `/context` to monitor token usage.

367* Have the `description` frontmatter field populated. The description is used in the context.

368 410 

369For Claude Code versions >= 1.0.124, you can see which custom slash commands411To see which commands and Skills are available to the `Skill` tool, run `claude --debug` and trigger a query.

370`SlashCommand` tool can invoke by running `claude --debug` and triggering a query.

371 412 

372### Disable `SlashCommand` tool413### Disable the `Skill` tool

373 414 

374To prevent Claude from executing any slash commands via the tool:415To prevent Claude from programmatically invoking any commands or Skills:

375 416 

376```bash theme={null}417```bash theme={null}

377/permissions418/permissions

378# Add to deny rules: SlashCommand419# Add to deny rules: Skill

379```420```

380 421 

381This also removes the SlashCommand tool and command descriptions from context.422This removes the `Skill` tool and all command/Skill descriptions from context.

382 423 

383### Disable specific commands only424### Disable specific commands or Skills

384 425 

385To prevent a specific slash command from becoming available, add426To prevent a specific command or Skill from being invoked programmatically via the `Skill` tool, add `disable-model-invocation: true` to its frontmatter. This also removes the item's metadata from context.

386`disable-model-invocation: true` to the slash command's frontmatter.

387 427 

388This also removes the command's metadata from context.428<Note>

429 The `user-invocable` field in Skills only controls menu visibility, not `Skill` tool access. Use `disable-model-invocation: true` to block programmatic invocation. See [Control Skill visibility](/en/skills#control-skill-visibility) for details.

430</Note>

389 431 

390### `SlashCommand` permission rules432### `Skill` permission rules

391 433 

392The permission rules support:434The permission rules support:

393 435 

394* **Exact match**: `SlashCommand:/commit` (allows only `/commit` with no arguments)436* **Exact match**: `Skill(/commit)` (allows only `/commit` with no arguments)

395* **Prefix match**: `SlashCommand:/review-pr:*` (allows `/review-pr` with any arguments)437* **Prefix match**: `Skill(/review-pr:*)` (allows `/review-pr` with any arguments)

396 438 

397### Character budget limit439### Character budget limit

398 440 

399The `SlashCommand` tool includes a character budget to limit the size of command441The `Skill` tool includes a character budget to limit context usage. This prevents token overflow when many commands and Skills are available.

400descriptions shown to Claude. This prevents token overflow when many commands

401are available.

402 442 

403The budget includes each custom slash command's name, arguments, and description.443The budget includes each item's name, arguments, and description.

404 444 

405* **Default limit**: 15,000 characters445* **Default limit**: 15,000 characters

406* **Custom limit**: Set via `SLASH_COMMAND_TOOL_CHAR_BUDGET` environment variable446* **Custom limit**: Set via `SLASH_COMMAND_TOOL_CHAR_BUDGET` environment variable. The name is retained for backwards compatibility.

407 447 

408When the character budget is exceeded, Claude sees only a subset of the available commands. In `/context`, a warning shows "M of N commands".448When the budget is exceeded, Claude sees only a subset of available items. In `/context`, a warning shows how many are included.

409 449 

410## Skills vs slash commands450## Skills vs slash commands

411 451 

sub-agents.md +46 −0

Details

155| `model` | No | Model to use for this subagent. Can be a model alias (`sonnet`, `opus`, `haiku`) or `'inherit'` to use the main conversation's model. If omitted, defaults to the [configured subagent model](/en/model-config) |155| `model` | No | Model to use for this subagent. Can be a model alias (`sonnet`, `opus`, `haiku`) or `'inherit'` to use the main conversation's model. If omitted, defaults to the [configured subagent model](/en/model-config) |

156| `permissionMode` | No | Permission mode for the subagent. Valid values: `default`, `acceptEdits`, `dontAsk`, `bypassPermissions`, `plan`, `ignore`. Controls how the subagent handles permission requests |156| `permissionMode` | No | Permission mode for the subagent. Valid values: `default`, `acceptEdits`, `dontAsk`, `bypassPermissions`, `plan`, `ignore`. Controls how the subagent handles permission requests |

157| `skills` | No | Comma-separated list of skill names to auto-load when the subagent starts. Subagents do not inherit Skills from the parent conversation. If omitted, no Skills are preloaded. |157| `skills` | No | Comma-separated list of skill names to auto-load when the subagent starts. Subagents do not inherit Skills from the parent conversation. If omitted, no Skills are preloaded. |

158| `hooks` | No | Define hooks scoped to this subagent's lifecycle. Supports `PreToolUse`, `PostToolUse`, and `Stop` events. See [Define hooks for subagents](#define-hooks-for-subagents). |

158 159 

159### Model selection160### Model selection

160 161 


183 184 

184**MCP Tools**: Subagents can access MCP tools from configured MCP servers. When the `tools` field is omitted, subagents inherit all MCP tools available to the main thread.185**MCP Tools**: Subagents can access MCP tools from configured MCP servers. When the `tools` field is omitted, subagents inherit all MCP tools available to the main thread.

185 186 

187### Define hooks for subagents

188 

189Subagents can define hooks that run during the subagent's lifecycle. Use the `hooks` field to specify `PreToolUse`, `PostToolUse`, or `Stop` handlers:

190 

191```yaml theme={null}

192---

193name: code-reviewer

194description: Review code changes with automatic linting

195hooks:

196 PostToolUse:

197 - matcher: "Edit|Write"

198 hooks:

199 - type: command

200 command: "./scripts/run-linter.sh"

201---

202```

203 

204Hooks defined in a subagent are scoped to that subagent's execution and are automatically cleaned up when the subagent finishes.

205 

206See [Hooks](/en/hooks) for the complete hook configuration format.

207 

186## Managing subagents208## Managing subagents

187 209 

188### Using the /agents command (Recommended)210### Using the /agents command (Recommended)


225 Subagents created by manually adding files will be loaded the next time you start a Claude Code session. To create and use a subagent immediately without restarting, use the `/agents` command instead.247 Subagents created by manually adding files will be loaded the next time you start a Claude Code session. To create and use a subagent immediately without restarting, use the `/agents` command instead.

226</Note>248</Note>

227 249 

250### Disabling specific subagents

251 

252You can disable specific built-in or custom subagents using the `Task(AgentName)` permission rule syntax. Add these rules to the `deny` array in your [settings](/en/settings#permission-settings) or use the `--disallowedTools` CLI flag.

253 

254**Example settings.json configuration:**

255 

256```json theme={null}

257{

258 "permissions": {

259 "deny": ["Task(Explore)", "Task(Plan)"]

260 }

261}

262```

263 

264**Example CLI usage:**

265 

266```bash theme={null}

267claude --disallowedTools "Task(Explore)"

268```

269 

270This is useful when you want to prevent Claude from delegating tasks to specific subagents, either for security reasons or to enforce a particular workflow.

271 

272See [IAM documentation](/en/iam#tool-specific-permission-rules) for more details on permission rules.

273 

228## Using subagents effectively274## Using subagents effectively

229 275 

230### Automatic delegation276### Automatic delegation

Details

13You have several options for entering line breaks into Claude Code:13You have several options for entering line breaks into Claude Code:

14 14 

15* **Quick escape**: Type `\` followed by Enter to create a newline15* **Quick escape**: Type `\` followed by Enter to create a newline

16* **Keyboard shortcut**: Set up a keybinding to insert a newline16* **Shift+Enter**: Works out of the box in iTerm2, WezTerm, Ghostty, and Kitty

17* **Keyboard shortcut**: Set up a keybinding to insert a newline in other terminals

17 18 

18#### Set up Shift+Enter (VS Code or iTerm2):19**Set up Shift+Enter for other terminals**

19 20 

20Run `/terminal-setup` within Claude Code to automatically configure Shift+Enter.21Run `/terminal-setup` within Claude Code to automatically configure Shift+Enter for VS Code, Alacritty, Zed, and Warp.

21 22 

22#### Set up Option+Enter (VS Code, iTerm2 or macOS Terminal.app):23<Note>

24 The `/terminal-setup` command is only visible in terminals that require manual configuration. If you're using iTerm2, WezTerm, Ghostty, or Kitty, you won't see this command because Shift+Enter already works natively.

25</Note>

26 

27**Set up Option+Enter (VS Code, iTerm2 or macOS Terminal.app)**

23 28 

24**For Mac Terminal.app:**29**For Mac Terminal.app:**

25 30 


65The supported subset includes:70The supported subset includes:

66 71 

67* Mode switching: `Esc` (to NORMAL), `i`/`I`, `a`/`A`, `o`/`O` (to INSERT)72* Mode switching: `Esc` (to NORMAL), `i`/`I`, `a`/`A`, `o`/`O` (to INSERT)

68* Navigation: `h`/`j`/`k`/`l`, `w`/`e`/`b`, `0`/`$`/`^`, `gg`/`G`73* Navigation: `h`/`j`/`k`/`l`, `w`/`e`/`b`, `0`/`$`/`^`, `gg`/`G`, `f`/`F`/`t`/`T` with `;`/`,` repeat

69* Editing: `x`, `dw`/`de`/`db`/`dd`/`D`, `cw`/`ce`/`cb`/`cc`/`C`, `.` (repeat)74* Editing: `x`, `dw`/`de`/`db`/`dd`/`D`, `cw`/`ce`/`cb`/`cc`/`C`, `.` (repeat)

75* Yank/paste: `yy`/`Y`, `yw`/`ye`/`yb`, `p`/`P`

76* Text objects: `iw`/`aw`, `iW`/`aW`, `i"`/`a"`, `i'`/`a'`, `i(`/`a(`, `i[`/`a[`, `i{`/`a{`

77* Indentation: `>>`/`<<`

78* Line operations: `J` (join lines)

79 

80See [Interactive mode](/en/interactive-mode#vim-editor-mode) for the complete reference.

70 81 

71 82 

72---83---