SpyBara
Go Premium

Documentation 2026-01-19 21:01 UTC to 2026-01-20 21:03 UTC

28 files changed +931 −1,274. 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

61## See also61## See also

62 62 

63* [Interactive mode](/en/interactive-mode) - Keyboard shortcuts and session controls63* [Interactive mode](/en/interactive-mode) - Keyboard shortcuts and session controls

64* [Slash commands](/en/slash-commands) - Accessing checkpoints using `/rewind`64* [Built-in commands](/en/interactive-mode#built-in-commands) - Accessing checkpoints using `/rewind`

65* [CLI reference](/en/cli-reference) - Command-line options65* [CLI reference](/en/cli-reference) - Command-line options

66 66 

67 67 

chrome.md +3 −3

Details

28 28 

29* [Google Chrome](https://www.google.com/chrome/) browser29* [Google Chrome](https://www.google.com/chrome/) browser

30* [Claude in Chrome extension](https://chromewebstore.google.com/detail/claude/fcoeoabgfenejglbffodgkkbkcdhcgfn) version 1.0.36 or higher30* [Claude in Chrome extension](https://chromewebstore.google.com/detail/claude/fcoeoabgfenejglbffodgkkbkcdhcgfn) version 1.0.36 or higher

31* [Claude Code CLI](/en/quickstart#step-1:-install-claude-code) version 2.0.73 or higher31* [Claude Code CLI](/en/quickstart#step-1-install-claude-code) version 2.0.73 or higher

32* A paid Claude plan (Pro, Team, or Enterprise)32* A paid Claude plan (Pro, Team, or Enterprise)

33 33 

34## How the integration works34## How the integration works


47 47 

48<Steps>48<Steps>

49 <Step title="Update Claude Code">49 <Step title="Update Claude Code">

50 Chrome integration requires a recent version of Claude Code. If you installed using the [native installer](/en/quickstart#step-1:-install-claude-code), updates happen automatically. Otherwise, run:50 Chrome integration requires a recent version of Claude Code. If you installed using the [native installer](/en/quickstart#step-1-install-claude-code), updates happen automatically. Otherwise, run:

51 51 

52 ```bash theme={null}52 ```bash theme={null}

53 claude update53 claude update


67 </Step>67 </Step>

68</Steps>68</Steps>

69 69 

70You can also enable Chrome integration from within an existing session using the `/chrome` slash command.70You can also enable Chrome integration from within an existing session using the `/chrome` command.

71 71 

72## Try it out72## Try it out

73 73 

Details

142 142 

143* [Chrome extension](/en/chrome) - Browser automation and web testing143* [Chrome extension](/en/chrome) - Browser automation and web testing

144* [Interactive mode](/en/interactive-mode) - Shortcuts, input modes, and interactive features144* [Interactive mode](/en/interactive-mode) - Shortcuts, input modes, and interactive features

145* [Slash commands](/en/slash-commands) - Interactive session commands

146* [Quickstart guide](/en/quickstart) - Getting started with Claude Code145* [Quickstart guide](/en/quickstart) - Getting started with Claude Code

147* [Common workflows](/en/common-workflows) - Advanced workflows and patterns146* [Common workflows](/en/common-workflows) - Advanced workflows and patterns

148* [Settings](/en/settings) - Configuration options147* [Settings](/en/settings) - Configuration options

common-workflows.md +71 −110

Details

219 219 

220***220***

221 221 

222## Create custom skills and commands

223 

224Skills extend Claude's capabilities with reusable prompts and workflows. Create a skill once, then invoke it with `/skill-name` or let Claude use it automatically when relevant.

225 

226For the full reference, see the [Skills documentation](/en/skills).

227 

228### Create a skill Claude can use automatically

229 

230This skill teaches Claude how to analyze code performance. Because it has a description and no restrictions, Claude can load it automatically when you ask about optimization.

231 

232<Steps>

233 <Step title="Create a skills directory in your project">

234 ```bash theme={null}

235 mkdir -p .claude/skills/optimize

236 ```

237 </Step>

238 

239 <Step title="Create a SKILL.md file with frontmatter and instructions">

240 Create `.claude/skills/optimize/SKILL.md` with the following content:

241 

242 ```markdown .claude/skills/optimize/SKILL.md theme={null}

243 ---

244 name: optimize

245 description: Analyze code performance and suggest optimizations

246 ---

247 

248 Analyze the performance of this code and suggest three specific optimizations.

249 ```

250 </Step>

251 

252 <Step title="Use your custom skill">

253 Claude uses it automatically when relevant, or you can invoke it directly:

254 

255 ```

256 /optimize src/utils/parser.js

257 ```

258 </Step>

259</Steps>

260 

261### Create a skill for manual invocation

262 

263This skill runs tests and shows coverage. The `disable-model-invocation: true` field means Claude can't invoke it automatically—only you can trigger it with `/test-coverage`.

264 

265<Steps>

266 <Step title="Create a skill file">

267 Create `.claude/commands/test-coverage.md` with the following content:

268 

269 ```markdown .claude/commands/test-coverage.md theme={null}

270 ---

271 description: Run tests with coverage report

272 disable-model-invocation: true

273 ---

274 

275 Run the test suite with coverage enabled and summarize the results.

276 ```

277 </Step>

278 

279 <Step title="Use your skill">

280 ```

281 /test-coverage

282 ```

283 </Step>

284</Steps>

285 

286<Tip>

287 Skills can be scoped to a project, personal directory, or organization. They can also accept arguments with `$ARGUMENTS`. See the [Skills documentation](/en/skills) for details.

288</Tip>

289 

290***

291 

222## Use Plan Mode for safe code analysis292## Use Plan Mode for safe code analysis

223 293 

224Plan Mode instructs Claude to create a plan by analyzing the codebase with read-only operations, perfect for exploring codebases, planning complex changes, or reviewing code safely. In Plan Mode, Claude uses [`AskUserQuestion`](/en/settings#tools-available-to-claude) to gather requirements and clarify your goals before proposing a plan.294Plan Mode instructs Claude to create a plan by analyzing the codebase with read-only operations, perfect for exploring codebases, planning complex changes, or reviewing code safely. In Plan Mode, Claude uses [`AskUserQuestion`](/en/settings#tools-available-to-claude) to gather requirements and clarify your goals before proposing a plan.


826 896 

827***897***

828 898 

829## Create custom slash commands

830 

831Claude Code supports custom slash commands that you can create to quickly execute specific prompts or tasks.

832 

833For more details, see the [Slash commands](/en/slash-commands) reference page.

834 

835### Create project-specific commands

836 

837Suppose you want to create reusable slash commands for your project that all team members can use.

838 

839<Steps>

840 <Step title="Create a commands directory in your project">

841 ```bash theme={null}

842 mkdir -p .claude/commands

843 ```

844 </Step>

845 

846 <Step title="Create a Markdown file for each command">

847 ```bash theme={null}

848 echo "Analyze the performance of this code and suggest three specific optimizations:" > .claude/commands/optimize.md

849 ```

850 </Step>

851 

852 <Step title="Use your custom command in Claude Code">

853 ```

854 > /optimize

855 ```

856 </Step>

857</Steps>

858 

859<Tip>

860 Tips:

861 

862 * Command names are derived from the filename (for example, `optimize.md` becomes `/optimize`)

863 * You can organize commands in subdirectories (for example, `.claude/commands/frontend/component.md` creates `/component` with "(project:frontend)" shown in the description)

864 * Project commands are available to everyone who clones the repository

865 * The Markdown file content becomes the prompt sent to Claude when the command is invoked

866</Tip>

867 

868### Add command arguments with \$ARGUMENTS

869 

870Suppose you want to create flexible slash commands that can accept additional input from users.

871 

872<Steps>

873 <Step title="Create a command file with the $ARGUMENTS placeholder">

874 ```bash theme={null}

875 echo 'Find and fix issue #$ARGUMENTS. Follow these steps: 1.

876 Understand the issue described in the ticket 2. Locate the relevant code in

877 our codebase 3. Implement a solution that addresses the root cause 4. Add

878 appropriate tests 5. Prepare a concise PR description' >

879 .claude/commands/fix-issue.md

880 ```

881 </Step>

882 

883 <Step title="Use the command with an issue number">

884 In your Claude session, use the command with arguments.

885 

886 ```

887 > /fix-issue 123

888 ```

889 

890 This replaces \$ARGUMENTS with "123" in the prompt.

891 </Step>

892</Steps>

893 

894<Tip>

895 Tips:

896 

897 * The \$ARGUMENTS placeholder is replaced with any text that follows the command

898 * You can position \$ARGUMENTS anywhere in your command template

899 * Other useful applications: generating test cases for specific functions, creating documentation for components, reviewing code in particular files, or translating content to specified languages

900</Tip>

901 

902### Create personal slash commands

903 

904Suppose you want to create personal slash commands that work across all your projects.

905 

906<Steps>

907 <Step title="Create a commands directory in your home folder">

908 ```bash theme={null}

909 mkdir -p ~/.claude/commands

910 ```

911 </Step>

912 

913 <Step title="Create a Markdown file for each command">

914 ```bash theme={null}

915 echo "Review this code for security vulnerabilities, focusing on:" >

916 ~/.claude/commands/security-review.md

917 ```

918 </Step>

919 

920 <Step title="Use your personal custom command">

921 ```

922 > /security-review

923 ```

924 </Step>

925</Steps>

926 

927<Tip>

928 Tips:

929 

930 * Personal commands show "(user)" in their description when listed with `/help`

931 * Personal commands are only available to you and not shared with your team

932 * Personal commands work across all your projects

933 * You can use these for consistent workflows across different codebases

934</Tip>

935 

936***

937 

938## Ask Claude about its capabilities899## Ask Claude about its capabilities

939 900 

940Claude has built-in access to its documentation and can answer questions about its own features and limitations.901Claude has built-in access to its documentation and can answer questions about its own features and limitations.


950```911```

951 912 

952```913```

953> what slash commands are available?914> what skills are available?

954```915```

955 916 

956```917```

costs.md +103 −56

Details

1# Manage costs effectively1# Manage costs effectively

2 2 

3> Learn how to track and optimize token usage and costs when using Claude Code.3> Track token usage, set team spend limits, and reduce Claude Code costs with context management, model selection, extended thinking settings, and preprocessing hooks.

4 4 

5Claude Code consumes tokens for each interaction. The average cost is \$6 per developer per day, with daily costs remaining below \$12 for 90% of users.5Claude Code consumes tokens for each interaction. Costs vary based on codebase size, query complexity, and conversation length. The average cost is \$6 per developer per day, with daily costs remaining below \$12 for 90% of users.

6 6 

7For team usage, Claude Code charges by API token consumption. On average, Claude Code costs \~\$100-200/developer per month with Sonnet 4.5 though there is large variance depending on how many instances users are running and whether they're using it in automation.7For team usage, Claude Code charges by API token consumption. On average, Claude Code costs \~\$100-200/developer per month with Sonnet 4.5 though there is large variance depending on how many instances users are running and whether they're using it in automation.

8 8 

9This page covers how to [track your costs](#track-your-costs), [manage costs for teams](#managing-costs-for-teams), and [reduce token usage](#reduce-token-usage).

10 

9## Track your costs11## Track your costs

10 12 

11### Using the `/cost` command13### Using the `/cost` command

12 14 

13<Note>15<Note>

14 The `/cost` command is not intended for Claude Max and Pro subscribers.16 The `/cost` command shows API token usage and is intended for API users. Claude Max and Pro subscribers have usage included in their subscription, so `/cost` data isn't relevant for billing purposes. Subscribers can use `/stats` to view usage patterns.

15</Note>17</Note>

16 18 

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


23Total code changes: 0 lines added, 0 lines removed25Total code changes: 0 lines added, 0 lines removed

24```26```

25 27 

26### Additional tracking options28## Managing costs for teams

27 29 

28Check [historical usage](https://support.claude.com/en/articles/9534590-cost-and-usage-reporting-in-console) in the Claude Console (requires Admin or Billing role) and set [workspace spend limits](https://support.claude.com/en/articles/9796807-creating-and-managing-workspaces) for the Claude Code workspace (requires Admin role).30When using Claude API, you can [set workspace spend limits](https://platform.claude.com/docs/en/build-with-claude/workspaces#workspace-limits) on the total Claude Code workspace spend. Admins can [view cost and usage reporting](https://platform.claude.com/docs/en/build-with-claude/workspaces#usage-and-cost-tracking) in the Console.

29 31 

30<Note>32<Note>

31 When you first authenticate Claude Code with your Claude Console account, a workspace called "Claude Code" is automatically created for you. This workspace provides centralized cost tracking and management for all Claude Code usage in your organization. You cannot create API keys for this workspace - it is exclusively for Claude Code authentication and usage.33 When you first authenticate Claude Code with your Claude Console account, a workspace called "Claude Code" is automatically created for you. This workspace provides centralized cost tracking and management for all Claude Code usage in your organization. You cannot create API keys for this workspace; it is exclusively for Claude Code authentication and usage.

32</Note>34</Note>

33 35 

34## Managing costs for teams36On Bedrock, Vertex, and Foundry, Claude Code does not send metrics from your cloud. To get cost metrics, several large enterprises reported using [LiteLLM](/en/llm-gateway#litellm-configuration), which is an open-source tool that helps companies [track spend by key](https://docs.litellm.ai/docs/proxy/virtual_keys#tracking-spend). This project is unaffiliated with Anthropic and we have not audited its security.

35 

36When using Claude API, you can limit the total Claude Code workspace spend. To configure, [follow these instructions](https://support.claude.com/en/articles/9796807-creating-and-managing-workspaces). Admins can view cost and usage reporting by [following these instructions](https://support.claude.com/en/articles/9534590-cost-and-usage-reporting-in-console).

37 

38On Bedrock and Vertex, Claude Code does not send metrics from your cloud. In order to get cost metrics, several large enterprises reported using [LiteLLM](/en/third-party-integrations#litellm), which is an open-source tool that helps companies [track spend by key](https://docs.litellm.ai/docs/proxy/virtual_keys#tracking-spend). This project is unaffiliated with Anthropic and we have not audited its security.

39 37 

40### Rate limit recommendations38### Rate limit recommendations

41 39 


60 58 

61## Reduce token usage59## Reduce token usage

62 60 

63* **Compact conversations:**61Token costs scale with context size: the more context Claude processes, the more tokens you use. Claude Code automatically optimizes costs through prompt caching (which reduces costs for repeated content like system prompts) and auto-compaction (which summarizes conversation history when approaching context limits).

64 62 

65 * Claude uses auto-compact by default when context reaches approximately 95% capacity. To trigger compaction earlier, set [`CLAUDE_AUTOCOMPACT_PCT_OVERRIDE`](/en/settings#environment-variables) to a lower percentage (for example, `50`)63The following strategies help you keep context small and reduce per-message costs.

66 * Toggle auto-compact: Run `/config` and navigate to "Auto-compact enabled"

67 * Use `/compact` manually when context gets large

68 * Add custom instructions: `/compact Focus on code samples and API usage`

69 * Customize compaction by adding to CLAUDE.md:

70 64 

71 ```markdown theme={null}65### Manage context proactively

72 # Summary instructions

73 66 

74 When you are using compact, please focus on test output and code changes67Use `/cost` to check your current token usage, or [configure your status line](/en/statusline#context-window-usage) to display it continuously.

75 ```

76 68 

77* **Write specific queries:** Avoid vague requests that trigger unnecessary scanning69* **Clear between tasks**: Use `/clear` to start fresh when switching to unrelated work. Stale context wastes tokens on every subsequent message. Use `/rename` before clearing so you can easily find the session later, then `/resume` to return to it.

70* **Add custom compaction instructions**: `/compact Focus on code samples and API usage` tells Claude what to preserve during summarization.

78 71 

79* **Break down complex tasks:** Split large tasks into focused interactions72You can also customize compaction behavior in your CLAUDE.md:

80 73 

81* **Clear history between tasks:** Use `/clear` to reset context74```markdown theme={null}

75# Compact instructions

82 76 

83Costs can vary significantly based on:77When you are using compact, please focus on test output and code changes

78```

84 79 

85* Size of codebase being analyzed80### Choose the right model

86* Complexity of queries

87* Number of files being searched or modified

88* Length of conversation history

89* Frequency of compacting conversations

90 81 

91## Background token usage82Sonnet handles most coding tasks well and costs less than Opus. Reserve Opus for complex architectural decisions or multi-step reasoning. Use `/model` to switch models mid-session, or set a default in `/config`. For simple subagent tasks, specify `model: haiku` in your [subagent configuration](/en/sub-agents#choose-a-model).

92 83 

93Claude Code uses tokens for some background functionality even when idle:84### Reduce MCP server overhead

94 85 

95* **Conversation summarization**: Background jobs that summarize previous conversations for the `claude --resume` feature86Each MCP server adds tool definitions to your context, even when idle. Run `/context` to see what's consuming space.

96* **Command processing**: Some commands like `/cost` may generate requests to check status

97 87 

98These background processes consume a small amount of tokens (typically under \$0.04 per session) even without active interaction.88* **Prefer CLI tools when available**: Tools like `gh`, `aws`, `gcloud`, and `sentry-cli` are more context-efficient than MCP servers because they don't add persistent tool definitions. Claude can run CLI commands directly without the overhead.

89* **Disable unused servers**: Run `/mcp` to see configured servers and disable any you're not actively using.

90* **Tool search is automatic**: When MCP tool descriptions exceed 10% of your context window, Claude Code automatically defers them and loads tools on-demand via [tool search](/en/mcp#scale-with-mcp-tool-search). Since deferred tools only enter context when actually used, a lower threshold means fewer idle tool definitions consuming space. Set a lower threshold with `ENABLE_TOOL_SEARCH=auto:<N>` (for example, `auto:5` triggers when tools exceed 5% of your context window).

99 91 

100## Tracking version changes and updates92### Offload processing to hooks and skills

101 93 

102### Current version information94Custom [hooks](/en/hooks) can preprocess data before Claude sees it. Instead of Claude reading a 10,000-line log file to find errors, a hook can grep for `ERROR` and return only matching lines, reducing context from tens of thousands of tokens to hundreds.

103 95 

104To check your current Claude Code version and installation details:96A [skill](/en/skills) can give Claude domain knowledge so it doesn't have to explore. For example, a "codebase-overview" skill could describe your project's architecture, key directories, and naming conventions. When Claude invokes the skill, it gets this context immediately instead of spending tokens reading multiple files to understand the structure.

105 97 

106```bash theme={null}98For example, this PreToolUse hook filters test output to show only failures:

107claude doctor

108```

109 99 

110This command shows your version, installation type, and system information.100<Tabs>

101 <Tab title="settings.json">

102 Add this to your [settings.json](/en/settings#settings-files) to run the hook before every Bash command:

111 103 

112### Understanding changes in Claude Code behavior104 ```json theme={null}

105 {

106 "hooks": {

107 "PreToolUse": [

108 {

109 "matcher": "Bash",

110 "hooks": [

111 {

112 "type": "command",

113 "command": "~/.claude/hooks/filter-test-output.sh"

114 }

115 ]

116 }

117 ]

118 }

119 }

120 ```

121 </Tab>

122 

123 <Tab title="filter-test-output.sh">

124 The hook calls this script, which checks if the command is a test runner and modifies it to show only failures:

125 

126 ```bash theme={null}

127 #!/bin/bash

128 input=$(cat)

129 cmd=$(echo "$input" | jq -r '.tool_input.command')

130 

131 # If running tests, filter to show only failures

132 if [[ "$cmd" =~ ^(npm test|pytest|go test) ]]; then

133 filtered_cmd="$cmd 2>&1 | grep -A 5 -E '(FAIL|ERROR|error:)' | head -100"

134 echo "{\"hookSpecificOutput\":{\"hookEventName\":\"PreToolUse\",\"permissionDecision\":\"allow\",\"updatedInput\":{\"command\":\"$filtered_cmd\"}}}"

135 else

136 echo "{}"

137 fi

138 ```

139 </Tab>

140</Tabs>

113 141 

114Claude Code regularly receives updates that may change how features work, including cost reporting:142### Move instructions from CLAUDE.md to skills

115 143 

116* **Version tracking**: Use `claude doctor` to see your current version144Your [CLAUDE.md](/en/memory) file is loaded into context at session start. If it contains detailed instructions for specific workflows (like PR reviews or database migrations), those tokens are present even when you're doing unrelated work. [Skills](/en/skills) load on-demand only when invoked, so moving specialized instructions into skills keeps your base context smaller. Aim to keep CLAUDE.md under \~500 lines by including only essentials.

117* **Behavior changes**: Features like `/cost` may display information differently across versions

118* **Documentation access**: Claude always has access to the latest documentation, which can help explain current feature behavior

119 145 

120### When cost reporting changes146### Adjust extended thinking

121 147 

122If you notice changes in how costs are displayed (such as the `/cost` command showing different information):148Extended thinking is enabled by default with a budget of 31,999 tokens because it significantly improves performance on complex planning and reasoning tasks. However, thinking tokens are billed as output tokens, so for simpler tasks where deep reasoning isn't needed, you can reduce costs by disabling it in `/config` or lowering the budget (for example, `MAX_THINKING_TOKENS=8000`).

123 149 

1241. **Verify your version**: Run `claude doctor` to confirm your current version150### Delegate verbose operations to subagents

1252. **Consult documentation**: Ask Claude directly about current feature behavior, as it has access to up-to-date documentation

1263. **Contact support**: For specific billing questions, contact Anthropic support through your Console account

127 151 

128<Note>152Running tests, fetching documentation, or processing log files can consume significant context. Delegate these to [subagents](/en/sub-agents#isolate-high-volume-operations) so the verbose output stays in the subagent's context while only a summary returns to your main conversation.

129 For team deployments, we recommend starting with a small pilot group to153 

130 establish usage patterns before wider rollout.154### Write specific prompts

131</Note>155 

156Vague requests like "improve this codebase" trigger broad scanning. Specific requests like "add input validation to the login function in auth.ts" let Claude work efficiently with minimal file reads.

157 

158### Work efficiently on complex tasks

159 

160For longer or more complex work, these habits help avoid wasted tokens from going down the wrong path:

161 

162* **Use plan mode for complex tasks**: Press Shift+Tab to enter [plan mode](/en/plan-mode) before implementation. Claude explores the codebase and proposes an approach for your approval, preventing expensive re-work when the initial direction is wrong.

163* **Course-correct early**: If Claude starts heading the wrong direction, press Escape to stop immediately. Use `/rewind` or double-tap Escape to restore conversation and code to a previous checkpoint.

164* **Give verification targets**: Include test cases, paste screenshots, or define expected output in your prompt. When Claude can verify its own work, it catches issues before you need to request fixes.

165* **Test incrementally**: Write one file, test it, then continue. This catches issues early when they're cheap to fix.

166 

167## Background token usage

168 

169Claude Code uses tokens for some background functionality even when idle:

170 

171* **Conversation summarization**: Background jobs that summarize previous conversations for the `claude --resume` feature

172* **Command processing**: Some commands like `/cost` may generate requests to check status

173 

174These background processes consume a small amount of tokens (typically under \$0.04 per session) even without active interaction.

175 

176## Understanding changes in Claude Code behavior

177 

178Claude Code regularly receives updates that may change how features work, including cost reporting. Run `claude --version` to check your current version. For specific billing questions, contact Anthropic support through your [Console account](https://platform.claude.com/login). For team deployments, start with a small pilot group to establish usage patterns before wider rollout.

132 179 

133 180 

134---181---

Details

2 2 

3> Find and install plugins from marketplaces to extend Claude Code with new commands, agents, and capabilities.3> Find and install plugins from marketplaces to extend Claude Code with new commands, agents, and capabilities.

4 4 

5Plugins extend Claude Code with custom commands, agents, hooks, and MCP servers. Plugin marketplaces are catalogs that help you discover and install these extensions without building them yourself.5Plugins extend Claude Code with skills, agents, hooks, and MCP servers. Plugin marketplaces are catalogs that help you discover and install these extensions without building them yourself.

6 6 

7Looking to create and distribute your own marketplace? See [Create and distribute a plugin marketplace](/en/plugin-marketplaces).7Looking to create and distribute your own marketplace? See [Create and distribute a plugin marketplace](/en/plugin-marketplaces).

8 8 


362* **Marketplace not loading**: Verify the URL is accessible and that `.claude-plugin/marketplace.json` exists at the path362* **Marketplace not loading**: Verify the URL is accessible and that `.claude-plugin/marketplace.json` exists at the path

363* **Plugin installation failures**: Check that plugin source URLs are accessible and repositories are public (or you have access)363* **Plugin installation failures**: Check that plugin source URLs are accessible and repositories are public (or you have access)

364* **Files not found after installation**: Plugins are copied to a cache, so paths referencing files outside the plugin directory won't work364* **Files not found after installation**: Plugins are copied to a cache, so paths referencing files outside the plugin directory won't work

365* **Plugin Skills not appearing**: Clear the cache with `rm -rf ~/.claude/plugins/cache`, restart Claude Code, and reinstall the plugin. See [Plugin Skills not appearing](/en/skills#plugin-skills-not-appearing-after-installation) for details.365* **Plugin skills not appearing**: Clear the cache with `rm -rf ~/.claude/plugins/cache`, restart Claude Code, and reinstall the plugin.

366 366 

367For detailed troubleshooting with solutions, see [Troubleshooting](/en/plugin-marketplaces#troubleshooting) in the marketplace guide. For debugging tools, see [Debugging and development tools](/en/plugins-reference#debugging-and-development-tools).367For detailed troubleshooting with solutions, see [Troubleshooting](/en/plugin-marketplaces#troubleshooting) in the marketplace guide. For debugging tools, see [Debugging and development tools](/en/plugins-reference#debugging-and-development-tools).

368 368 

369## Next steps369## Next steps

370 370 

371* **Build your own plugins**: See [Plugins](/en/plugins) to create custom commands, agents, and hooks371* **Build your own plugins**: See [Plugins](/en/plugins) to create skills, agents, and hooks

372* **Create a marketplace**: See [Create a plugin marketplace](/en/plugin-marketplaces) to distribute plugins to your team or community372* **Create a marketplace**: See [Create a plugin marketplace](/en/plugin-marketplaces) to distribute plugins to your team or community

373* **Technical reference**: See [Plugins reference](/en/plugins-reference) for complete specifications373* **Technical reference**: See [Plugins reference](/en/plugins-reference) for complete specifications

374 374 

Details

156 # Responds to @claude mentions in comments156 # Responds to @claude mentions in comments

157```157```

158 158 

159### Using slash commands159### Using skills

160 160 

161```yaml theme={null}161```yaml theme={null}

162name: Code Review162name: Code Review


266Key features:266Key features:

267 267 

268* **Unified prompt interface** - Use `prompt` for all instructions268* **Unified prompt interface** - Use `prompt` for all instructions

269* **Slash commands** - Pre-built prompts like `/review` or `/fix`269* **Commands** - Prebuilt prompts like `/review` or `/fix`

270* **CLI passthrough** - Any Claude Code CLI argument via `claude_args`270* **CLI passthrough** - Any Claude Code CLI argument via `claude_args`

271* **Flexible triggers** - Works with any GitHub event271* **Flexible triggers** - Works with any GitHub event

272 272 


624The Claude Code Action v1 uses a simplified configuration:624The Claude Code Action v1 uses a simplified configuration:

625 625 

626| Parameter | Description | Required |626| Parameter | Description | Required |

627| ------------------- | ----------------------------------------------- | -------- |627| ------------------- | ------------------------------------------------------ | -------- |

628| `prompt` | Instructions for Claude (text or slash command) | No\* |628| `prompt` | Instructions for Claude (text or skill like `/review`) | No\* |

629| `claude_args` | CLI arguments passed to Claude Code | No |629| `claude_args` | CLI arguments passed to Claude Code | No |

630| `anthropic_api_key` | Claude API key | Yes\*\* |630| `anthropic_api_key` | Claude API key | Yes\*\* |

631| `github_token` | GitHub token for API access | No |631| `github_token` | GitHub token for API access | No |

headless.md +1 −1

Details

94The `--allowedTools` flag uses [permission rule syntax](/en/settings#permission-rule-syntax). The `:*` suffix enables prefix matching, so `Bash(git diff:*)` allows any command starting with `git diff`.94The `--allowedTools` flag uses [permission rule syntax](/en/settings#permission-rule-syntax). The `:*` suffix enables prefix matching, so `Bash(git diff:*)` allows any command starting with `git diff`.

95 95 

96<Note>96<Note>

97 [Slash commands](/en/slash-commands) like `/commit` are only available in interactive mode. In `-p` mode, describe the task you want to accomplish instead.97 User-invoked [skills](/en/skills) like `/commit` and [built-in commands](/en/interactive-mode#built-in-commands) are only available in interactive mode. In `-p` mode, describe the task you want to accomplish instead.

98</Note>98</Note>

99 99 

100### Customize the system prompt100### Customize the system prompt

hooks.md +4 −4

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 Commands149### Hooks in skills and agents

150 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.151In addition to settings files and plugins, hooks can be defined directly in [skills](/en/skills) and [subagents](/en/sub-agents) using frontmatter. These hooks are scoped to the component's lifecycle and only run when that component is active.

152 152 

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

154 154 


184 184 

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

186 186 

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

188 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.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, not for agents.

190 190 

191## Prompt-Based Hooks191## Prompt-Based Hooks

192 192 

hooks-guide.md +1 −1

Details

64 64 

65### Step 1: Open hooks configuration65### Step 1: Open hooks configuration

66 66 

67Run the `/hooks` [slash command](/en/slash-commands) and select67Run the `/hooks` command and select

68the `PreToolUse` hook event.68the `PreToolUse` hook event.

69 69 

70`PreToolUse` hooks run before tool calls and can block them while providing70`PreToolUse` hooks run before tool calls and can block them while providing

iam.md +3 −1

Details

104By default, Claude has access to files in the directory where it was launched. You can extend this access:104By default, Claude has access to files in the directory where it was launched. You can extend this access:

105 105 

106* **During startup**: Use `--add-dir <path>` CLI argument106* **During startup**: Use `--add-dir <path>` CLI argument

107* **During session**: Use `/add-dir` slash command107* **During session**: Use `/add-dir` command

108* **Persistent configuration**: Add to `additionalDirectories` in [settings files](/en/settings#settings-files)108* **Persistent configuration**: Add to `additionalDirectories` in [settings files](/en/settings#settings-files)

109 109 

110Files in additional directories follow the same permission rules as the original working directory - they become readable without prompts, and file editing permissions follow the current permission mode.110Files in additional directories follow the same permission rules as the original working directory - they become readable without prompts, and file editing permissions follow the current permission mode.


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

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

125 125 

126The key difference between `:*` and `*`: the `:*` suffix enforces a word boundary, requiring the prefix to be followed by a space or end-of-string. For example, `Bash(ls:*)` matches `ls -la` but not `lsof`. In contrast, `Bash(ls*)` with a bare `*` matches both `ls -la` and `lsof` because `*` has no word boundary constraint.

127 

126<Tip>128<Tip>

127 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`129 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`

128</Tip>130</Tip>

Details

73### Quick commands73### Quick commands

74 74 

75| Shortcut | Description | Notes |75| Shortcut | Description | Notes |

76| :----------- | :---------------- | :------------------------------------------------------------ |76| :----------- | :---------------- | :------------------------------------------------------------------- |

77| `/` at start | Slash command | See [slash commands](/en/slash-commands) |77| `/` at start | Command or skill | See [built-in commands](#built-in-commands) and [skills](/en/skills) |

78| `!` at start | Bash mode | Run commands directly and add execution output to the session |78| `!` at start | Bash mode | Run commands directly and add execution output to the session |

79| `@` | File path mention | Trigger file path autocomplete |79| `@` | File path mention | Trigger file path autocomplete |

80 80 

81## Built-in commands

82 

83Built-in commands are shortcuts for common actions. The table below covers commonly used commands but not all available options. Type `/` in Claude Code to see the full list, or type `/` followed by any letters to filter.

84 

85To create your own commands you can invoke with `/`, see [skills](/en/skills).

86 

87| Command | Purpose |

88| :------------------------ | :-------------------------------------------------------------------------------------------------------------------------- |

89| `/clear` | Clear conversation history |

90| `/compact [instructions]` | Compact conversation with optional focus instructions |

91| `/config` | Open the Settings interface (Config tab) |

92| `/context` | Visualize current context usage as a colored grid |

93| `/cost` | Show token usage statistics. See [cost tracking guide](/en/costs#using-the-cost-command) for subscription-specific details. |

94| `/doctor` | Checks the health of your Claude Code installation |

95| `/exit` | Exit the REPL |

96| `/export [filename]` | Export the current conversation to a file or clipboard |

97| `/help` | Get usage help |

98| `/init` | Initialize project with `CLAUDE.md` guide |

99| `/mcp` | Manage MCP server connections and OAuth authentication |

100| `/memory` | Edit `CLAUDE.md` memory files |

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

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

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

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

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

106| `/rewind` | Rewind the conversation and/or code |

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

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

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

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

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

112| `/theme` | Change the color theme |

113| `/todos` | List current TODO items |

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

115 

116### MCP prompts

117 

118MCP servers can expose prompts that appear as commands. These use the format `/mcp__<server>__<prompt>` and are dynamically discovered from connected servers. See [MCP prompts](/en/mcp#use-mcp-prompts-as-commands) for details.

119 

81## Vim editor mode120## Vim editor mode

82 121 

83Enable vim-style editing with `/vim` command or configure permanently via `/config`.122Enable vim-style editing with `/vim` command or configure permanently via `/config`.


223 262 

224## See also263## See also

225 264 

226* [Slash commands](/en/slash-commands) - Interactive session commands265* [Skills](/en/skills) - Custom prompts and workflows

227* [Checkpointing](/en/checkpointing) - Rewind Claude's edits and restore previous states266* [Checkpointing](/en/checkpointing) - Rewind Claude's edits and restore previous states

228* [CLI reference](/en/cli-reference) - Command-line flags and options267* [CLI reference](/en/cli-reference) - Command-line flags and options

229* [Settings](/en/settings) - Configuration options268* [Settings](/en/settings) - Configuration options

mcp.md +2 −2

Details

857}857}

858```858```

859 859 

860## Use MCP prompts as slash commands860## Use MCP prompts as commands

861 861 

862MCP servers can expose prompts that become available as slash commands in Claude Code.862MCP servers can expose prompts that become available as commands in Claude Code.

863 863 

864### Execute MCP prompts864### Execute MCP prompts

865 865 

memory.md +1 −1

Details

56 56 

57## Directly edit memories with `/memory`57## Directly edit memories with `/memory`

58 58 

59Use the `/memory` slash command during a session to open any memory file in your system editor for more extensive additions or organization.59Use the `/memory` command during a session to open any memory file in your system editor for more extensive additions or organization.

60 60 

61## Set up project memory61## Set up project memory

62 62 

Details

103settings like the model to use, the tools they have available, and some context103settings like the model to use, the tools they have available, and some context

104about when to use the agent.104about when to use the agent.

105 105 

106### Output Styles vs. [Custom Slash Commands](/en/slash-commands)106### Output Styles vs. [Skills](/en/skills)

107 107 

108You can think of output styles as "stored system prompts" and custom slash108Output styles modify how Claude responds (formatting, tone, structure) and are always active once selected. Skills are task-specific prompts that you invoke with `/skill-name` or that Claude loads automatically when relevant. Use output styles for consistent formatting preferences; use skills for reusable workflows and tasks.

109commands as "stored prompts".

110 109 

111 110 

112---111---

Details

19 19 

20## Walkthrough: create a local marketplace20## Walkthrough: create a local marketplace

21 21 

22This example creates a marketplace with one plugin: a `/review` command for code reviews. You'll create the directory structure, add a slash command, create the plugin manifest and marketplace catalog, then install and test it.22This example creates a marketplace with one plugin: a `/review` skill for code reviews. You'll create the directory structure, add a skill, create the plugin manifest and marketplace catalog, then install and test it.

23 23 

24<Steps>24<Steps>

25 <Step title="Create the directory structure">25 <Step title="Create the directory structure">

26 ```bash theme={null}26 ```bash theme={null}

27 mkdir -p my-marketplace/.claude-plugin27 mkdir -p my-marketplace/.claude-plugin

28 mkdir -p my-marketplace/plugins/review-plugin/.claude-plugin28 mkdir -p my-marketplace/plugins/review-plugin/.claude-plugin

29 mkdir -p my-marketplace/plugins/review-plugin/commands29 mkdir -p my-marketplace/plugins/review-plugin/skills/review

30 ```30 ```

31 </Step>31 </Step>

32 32 

33 <Step title="Create the plugin command">33 <Step title="Create the skill">

34 Create a Markdown file that defines what the `/review` command does.34 Create a `SKILL.md` file that defines what the `/review` skill does.

35 

36 ```markdown my-marketplace/plugins/review-plugin/skills/review/SKILL.md theme={null}

37 ---

38 description: Review code for bugs, security, and performance

39 disable-model-invocation: true

40 ---

35 41 

36 ```markdown my-marketplace/plugins/review-plugin/commands/review.md theme={null}

37 Review the code I've selected or the recent changes for:42 Review the code I've selected or the recent changes for:

38 - Potential bugs or edge cases43 - Potential bugs or edge cases

39 - Security concerns44 - Security concerns


50 ```json my-marketplace/plugins/review-plugin/.claude-plugin/plugin.json theme={null}55 ```json my-marketplace/plugins/review-plugin/.claude-plugin/plugin.json theme={null}

51 {56 {

52 "name": "review-plugin",57 "name": "review-plugin",

53 "description": "Adds a /review command for quick code reviews",58 "description": "Adds a /review skill for quick code reviews",

54 "version": "1.0.0"59 "version": "1.0.0"

55 }60 }

56 ```61 ```


69 {74 {

70 "name": "review-plugin",75 "name": "review-plugin",

71 "source": "./plugins/review-plugin",76 "source": "./plugins/review-plugin",

72 "description": "Adds a /review command for quick code reviews"77 "description": "Adds a /review skill for quick code reviews"

73 }78 }

74 ]79 ]

75 }80 }


438* For GitHub sources: `repo` is required, and `ref` or `path` must also match if specified in the allowlist443* For GitHub sources: `repo` is required, and `ref` or `path` must also match if specified in the allowlist

439* For URL sources: the full URL must match exactly444* For URL sources: the full URL must match exactly

440 445 

441Because `strictKnownMarketplaces` is set in [managed settings](/en/settings#settings-file-locations), individual users and project configurations cannot override these restrictions.446Because `strictKnownMarketplaces` is set in [managed settings](/en/settings#settings-files), individual users and project configurations cannot override these restrictions.

442 447 

443For complete configuration details including all supported source types and comparison with `extraKnownMarketplaces`, see the [strictKnownMarketplaces reference](/en/settings#strictknownmarketplaces).448For complete configuration details including all supported source types and comparison with `extraKnownMarketplaces`, see the [strictKnownMarketplaces reference](/en/settings#strictknownmarketplaces).

444 449 

plugins.md +29 −31

Details

1# Create plugins1# Create plugins

2 2 

3> Create custom plugins to extend Claude Code with slash commands, agents, hooks, Skills, and MCP servers.3> Create custom plugins to extend Claude Code with skills, agents, hooks, and MCP servers.

4 4 

5Plugins let you extend Claude Code with custom functionality that can be shared across projects and teams. This guide covers creating your own plugins with slash commands, agents, Skills, hooks, and MCP servers.5Plugins let you extend Claude Code with custom functionality that can be shared across projects and teams. This guide covers creating your own plugins with skills, agents, hooks, and MCP servers.

6 6 

7Looking to install existing plugins? See [Discover and install plugins](/en/discover-plugins). For complete technical specifications, see [Plugins reference](/en/plugins-reference).7Looking to install existing plugins? See [Discover and install plugins](/en/discover-plugins). For complete technical specifications, see [Plugins reference](/en/plugins-reference).

8 8 

9## When to use plugins vs standalone configuration9## When to use plugins vs standalone configuration

10 10 

11Claude Code supports two ways to add custom slash commands, agents, and hooks:11Claude Code supports two ways to add custom skills, agents, and hooks:

12 12 

13| Approach | Slash command names | Best for |13| Approach | Skill names | Best for |

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

15| **Standalone** (`.claude/` directory) | `/hello` | Personal workflows, project-specific customizations, quick experiments |15| **Standalone** (`.claude/` directory) | `/hello` | Personal workflows, project-specific customizations, quick experiments |

16| **Plugins** (directories with `.claude-plugin/plugin.json`) | `/plugin-name:hello` | Sharing with teammates, distributing to community, versioned releases, reusable across projects |16| **Plugins** (directories with `.claude-plugin/plugin.json`) | `/plugin-name:hello` | Sharing with teammates, distributing to community, versioned releases, reusable across projects |


19 19 

20* You're customizing Claude Code for a single project20* You're customizing Claude Code for a single project

21* The configuration is personal and doesn't need to be shared21* The configuration is personal and doesn't need to be shared

22* You're experimenting with slash commands or hooks before packaging them22* You're experimenting with skills or hooks before packaging them

23* You want short slash command names like `/hello` or `/review`23* You want short skill names like `/hello` or `/review`

24 24 

25**Use plugins when**:25**Use plugins when**:

26 26 

27* You want to share functionality with your team or community27* You want to share functionality with your team or community

28* You need the same slash commands/agents across multiple projects28* You need the same skills/agents across multiple projects

29* You want version control and easy updates for your extensions29* You want version control and easy updates for your extensions

30* You're distributing through a marketplace30* You're distributing through a marketplace

31* You're okay with namespaced slash commands like `/my-plugin:hello` (namespacing prevents conflicts between plugins)31* You're okay with namespaced skills like `/my-plugin:hello` (namespacing prevents conflicts between plugins)

32 32 

33<Tip>33<Tip>

34 Start with standalone configuration in `.claude/` for quick iteration, then [convert to a plugin](#convert-existing-configurations-to-plugins) when you're ready to share.34 Start with standalone configuration in `.claude/` for quick iteration, then [convert to a plugin](#convert-existing-configurations-to-plugins) when you're ready to share.


36 36 

37## Quickstart37## Quickstart

38 38 

39This quickstart walks you through creating a plugin with a custom slash command. You'll create a manifest (the configuration file that defines your plugin), add a slash command, and test it locally using the `--plugin-dir` flag.39This quickstart walks you through creating a plugin with a custom skill. You'll create a manifest (the configuration file that defines your plugin), add a skill, and test it locally using the `--plugin-dir` flag.

40 40 

41### Prerequisites41### Prerequisites

42 42 


51 51 

52<Steps>52<Steps>

53 <Step title="Create the plugin directory">53 <Step title="Create the plugin directory">

54 Every plugin lives in its own directory containing a manifest and your custom commands, agents, or hooks. Create one now:54 Every plugin lives in its own directory containing a manifest and your skills, agents, or hooks. Create one now:

55 55 

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

57 mkdir my-first-plugin57 mkdir my-first-plugin


81 ```81 ```

82 82 

83 | Field | Purpose |83 | Field | Purpose |

84 | :------------ | :--------------------------------------------------------------------------------------------------------------------- |84 | :------------ | :----------------------------------------------------------------------------------------------------- |

85 | `name` | Unique identifier and slash command namespace. Slash commands are prefixed with this (e.g., `/my-first-plugin:hello`). |85 | `name` | Unique identifier and skill namespace. Skills are prefixed with this (e.g., `/my-first-plugin:hello`). |

86 | `description` | Shown in the plugin manager when browsing or installing plugins. |86 | `description` | Shown in the plugin manager when browsing or installing plugins. |

87 | `version` | Track releases using [semantic versioning](/en/plugins-reference#version-management). |87 | `version` | Track releases using [semantic versioning](/en/plugins-reference#version-management). |

88 | `author` | Optional. Helpful for attribution. |88 | `author` | Optional. Helpful for attribution. |


90 For additional fields like `homepage`, `repository`, and `license`, see the [full manifest schema](/en/plugins-reference#plugin-manifest-schema).90 For additional fields like `homepage`, `repository`, and `license`, see the [full manifest schema](/en/plugins-reference#plugin-manifest-schema).

91 </Step>91 </Step>

92 92 

93 <Step title="Add a slash command">93 <Step title="Add a skill">

94 Slash commands are Markdown files in the `commands/` directory. The filename becomes the slash command name, prefixed with the plugin's namespace (`hello.md` in a plugin named `my-first-plugin` creates `/my-first-plugin:hello`). The Markdown content tells Claude how to respond when someone runs the slash command.94 Skills live in the `skills/` directory. Each skill is a folder containing a `SKILL.md` file. The folder name becomes the skill name, prefixed with the plugin's namespace (`hello/` in a plugin named `my-first-plugin` creates `/my-first-plugin:hello`).

95 95 

96 Create a `commands` directory in your plugin folder:96 Create a skill directory in your plugin folder:

97 97 

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

99 mkdir my-first-plugin/commands99 mkdir -p my-first-plugin/skills/hello

100 ```100 ```

101 101 

102 Then create `my-first-plugin/commands/hello.md` with this content:102 Then create `my-first-plugin/skills/hello/SKILL.md` with this content:

103 103 

104 ```markdown my-first-plugin/commands/hello.md theme={null}104 ```markdown my-first-plugin/skills/hello/SKILL.md theme={null}

105 ---105 ---

106 description: Greet the user with a friendly message106 description: Greet the user with a friendly message

107 disable-model-invocation: true

107 ---108 ---

108 109 

109 # Hello Command

110 

111 Greet the user warmly and ask how you can help them today.110 Greet the user warmly and ask how you can help them today.

112 ```111 ```

113 </Step>112 </Step>


128 You'll see Claude respond with a greeting. Run `/help` to see your command listed under the plugin namespace.127 You'll see Claude respond with a greeting. Run `/help` to see your command listed under the plugin namespace.

129 128 

130 <Note>129 <Note>

131 **Why namespacing?** Plugin slash commands are always namespaced (like `/greet:hello`) to prevent conflicts when multiple plugins have commands with the same name.130 **Why namespacing?** Plugin skills are always namespaced (like `/greet:hello`) to prevent conflicts when multiple plugins have skills with the same name.

132 131 

133 To change the namespace prefix, update the `name` field in `plugin.json`.132 To change the namespace prefix, update the `name` field in `plugin.json`.

134 </Note>133 </Note>

135 </Step>134 </Step>

136 135 

137 <Step title="Add slash command arguments">136 <Step title="Add skill arguments">

138 Make your slash command dynamic by accepting user input. The `$ARGUMENTS` placeholder captures any text the user provides after the slash command.137 Make your skill dynamic by accepting user input. The `$ARGUMENTS` placeholder captures any text the user provides after the skill name.

139 138 

140 Update your `hello.md` file:139 Update your `hello.md` file:

141 140 


155 /my-first-plugin:hello Alex154 /my-first-plugin:hello Alex

156 ```155 ```

157 156 

158 Claude will greet you by name. For more argument options like `$1`, `$2` for individual parameters, see [Slash commands](/en/slash-commands).157 Claude will greet you by name. For more on passing arguments to skills, see [Skills](/en/skills#pass-arguments-to-skills).

159 </Step>158 </Step>

160</Steps>159</Steps>

161 160 

162You've successfully created and tested a plugin with these key components:161You've successfully created and tested a plugin with these key components:

163 162 

164* **Plugin manifest** (`.claude-plugin/plugin.json`): describes your plugin's metadata163* **Plugin manifest** (`.claude-plugin/plugin.json`): describes your plugin's metadata

165* **Commands directory** (`commands/`): contains your custom slash commands164* **Commands directory** (`commands/`): contains your custom skills

166* **Command arguments** (`$ARGUMENTS`): captures user input for dynamic behavior165* **Skill arguments** (`$ARGUMENTS`): captures user input for dynamic behavior

167 166 

168<Tip>167<Tip>

169 The `--plugin-dir` flag is useful for development and testing. When you're ready to share your plugin with others, see [Create and distribute a plugin marketplace](/en/plugin-marketplaces).168 The `--plugin-dir` flag is useful for development and testing. When you're ready to share your plugin with others, see [Create and distribute a plugin marketplace](/en/plugin-marketplaces).


171 170 

172## Plugin structure overview171## Plugin structure overview

173 172 

174You've created a plugin with a slash command, but plugins can include much more: custom agents, Skills, hooks, MCP servers, and LSP servers.173You've created a plugin with a skill, but plugins can include much more: custom agents, hooks, MCP servers, and LSP servers.

175 174 

176<Warning>175<Warning>

177 **Common mistake**: Don't put `commands/`, `agents/`, `skills/`, or `hooks/` inside the `.claude-plugin/` directory. Only `plugin.json` goes inside `.claude-plugin/`. All other directories must be at the plugin root level.176 **Common mistake**: Don't put `commands/`, `agents/`, `skills/`, or `hooks/` inside the `.claude-plugin/` directory. Only `plugin.json` goes inside `.claude-plugin/`. All other directories must be at the plugin root level.


180| Directory | Location | Purpose |179| Directory | Location | Purpose |

181| :---------------- | :---------- | :---------------------------------------------- |180| :---------------- | :---------- | :---------------------------------------------- |

182| `.claude-plugin/` | Plugin root | Contains only `plugin.json` manifest (required) |181| `.claude-plugin/` | Plugin root | Contains only `plugin.json` manifest (required) |

183| `commands/` | Plugin root | Slash commands as Markdown files |182| `commands/` | Plugin root | Skills as Markdown files |

184| `agents/` | Plugin root | Custom agent definitions |183| `agents/` | Plugin root | Custom agent definitions |

185| `skills/` | Plugin root | Agent Skills with `SKILL.md` files |184| `skills/` | Plugin root | Agent Skills with `SKILL.md` files |

186| `hooks/` | Plugin root | Event handlers in `hooks.json` |185| `hooks/` | Plugin root | Event handlers in `hooks.json` |


302 301 

303## Convert existing configurations to plugins302## Convert existing configurations to plugins

304 303 

305If you already have custom commands, Skills, or hooks in your `.claude/` directory, you can convert them into a plugin for easier sharing and distribution.304If you already have skills or hooks in your `.claude/` directory, you can convert them into a plugin for easier sharing and distribution.

306 305 

307### Migration steps306### Migration steps

308 307 


401* [Create and distribute a marketplace](/en/plugin-marketplaces): package and share your plugins400* [Create and distribute a marketplace](/en/plugin-marketplaces): package and share your plugins

402* [Plugins reference](/en/plugins-reference): complete technical specifications401* [Plugins reference](/en/plugins-reference): complete technical specifications

403* Dive deeper into specific plugin components:402* Dive deeper into specific plugin components:

404 * [Slash commands](/en/slash-commands): command development details403 * [Skills](/en/skills): skill development details

405 * [Subagents](/en/sub-agents): agent configuration and capabilities404 * [Subagents](/en/sub-agents): agent configuration and capabilities

406 * [Agent Skills](/en/skills): extend Claude's capabilities

407 * [Hooks](/en/hooks): event handling and automation405 * [Hooks](/en/hooks): event handling and automation

408 * [MCP](/en/mcp): external tool integration406 * [MCP](/en/mcp): external tool integration

409 407 

Details

10 10 

11## Plugin components reference11## Plugin components reference

12 12 

13This section documents the five types of components that plugins can provide.13This section documents the types of components that plugins can provide.

14 14 

15### Commands15### Skills

16 

17Plugins add skills to Claude Code, creating `/name` shortcuts that you or Claude can invoke.

18 

19**Location**: `skills/` or `commands/` directory in plugin root

20 

21**File format**: Skills are directories with `SKILL.md`; commands are simple markdown files

22 

23**Skill structure**:

16 24 

17Plugins add custom slash commands that integrate seamlessly with Claude Code's command system.25```

26skills/

27├── pdf-processor/

28│ ├── SKILL.md

29│ ├── reference.md (optional)

30│ └── scripts/ (optional)

31└── code-reviewer/

32 └── SKILL.md

33```

18 34 

19**Location**: `commands/` directory in plugin root35**Integration behavior**:

20 36 

21**File format**: Markdown files with frontmatter37* Skills and commands are automatically discovered when the plugin is installed

38* Claude can invoke them automatically based on task context

39* Skills can include supporting files alongside SKILL.md

22 40 

23For complete details on plugin command structure, invocation patterns, and features, see [Plugin commands](/en/slash-commands#plugin-commands).41For complete details, see [Skills](/en/skills).

24 42 

25### Agents43### Agents

26 44 


58* Agents can be invoked manually by users76* Agents can be invoked manually by users

59* Plugin agents work alongside built-in Claude agents77* Plugin agents work alongside built-in Claude agents

60 78 

61### Skills

62 

63Plugins can provide Agent Skills that extend Claude's capabilities. Skills are model-invoked—Claude autonomously decides when to use them based on the task context.

64 

65**Location**: `skills/` directory in plugin root

66 

67**File format**: Directories containing `SKILL.md` files with frontmatter

68 

69**Skill structure**:

70 

71```

72skills/

73├── pdf-processor/

74│ ├── SKILL.md

75│ ├── reference.md (optional)

76│ └── scripts/ (optional)

77└── code-reviewer/

78 └── SKILL.md

79```

80 

81**Integration behavior**:

82 

83* Plugin Skills are automatically discovered when the plugin is installed

84* Claude autonomously invokes Skills based on matching task context

85* Skills can include supporting files alongside SKILL.md

86 

87For SKILL.md format and complete Skill authoring guidance, see:

88 

89* [Use Skills in Claude Code](/en/skills)

90* [Agent Skills overview](https://docs.claude.com/en/docs/agents-and-tools/agent-skills/overview#skill-structure)

91 

92### Hooks79### Hooks

93 80 

94Plugins can provide event handlers that respond to Claude Code events automatically.81Plugins can provide event handlers that respond to Claude Code events automatically.


479### File locations reference466### File locations reference

480 467 

481| Component | Default Location | Purpose |468| Component | Default Location | Purpose |

482| :-------------- | :--------------------------- | :------------------------------- |469| :-------------- | :--------------------------- | :---------------------------------------------------------- |

483| **Manifest** | `.claude-plugin/plugin.json` | Required metadata file |470| **Manifest** | `.claude-plugin/plugin.json` | Required metadata file |

484| **Commands** | `commands/` | Slash command Markdown files |471| **Commands** | `commands/` | Skill Markdown files (legacy; use `skills/` for new skills) |

485| **Agents** | `agents/` | Subagent Markdown files |472| **Agents** | `agents/` | Subagent Markdown files |

486| **Skills** | `skills/` | Agent Skills with SKILL.md files |473| **Skills** | `skills/` | Skills with `<name>/SKILL.md` structure |

487| **Hooks** | `hooks/hooks.json` | Hook configuration |474| **Hooks** | `hooks/hooks.json` | Hook configuration |

488| **MCP servers** | `.mcp.json` | MCP server definitions |475| **MCP servers** | `.mcp.json` | MCP server definitions |

489| **LSP servers** | `.lsp.json` | Language server configurations |476| **LSP servers** | `.lsp.json` | Language server configurations |


735 722 

736* [Plugins](/en/plugins) - Tutorials and practical usage723* [Plugins](/en/plugins) - Tutorials and practical usage

737* [Plugin marketplaces](/en/plugin-marketplaces) - Creating and managing marketplaces724* [Plugin marketplaces](/en/plugin-marketplaces) - Creating and managing marketplaces

738* [Slash commands](/en/slash-commands) - Command development details725* [Skills](/en/skills) - Skill development details

739* [Subagents](/en/sub-agents) - Agent configuration and capabilities726* [Subagents](/en/sub-agents) - Agent configuration and capabilities

740* [Agent Skills](/en/skills) - Extend Claude's capabilities

741* [Hooks](/en/hooks) - Event handling and automation727* [Hooks](/en/hooks) - Event handling and automation

742* [MCP](/en/mcp) - External tool integration728* [MCP](/en/mcp) - External tool integration

743* [Settings](/en/settings) - Configuration options for plugins729* [Settings](/en/settings) - Configuration options for plugins

quickstart.md +2 −2

Details

135```135```

136 136 

137```137```

138> how do I use slash commands in Claude Code?138> how do I create custom skills in Claude Code?

139```139```

140 140 

141```141```


305 * Press `?` to see all available keyboard shortcuts305 * Press `?` to see all available keyboard shortcuts

306 * Use Tab for command completion306 * Use Tab for command completion

307 * Press ↑ for command history307 * Press ↑ for command history

308 * Type `/` to see all slash commands308 * Type `/` to see all commands and skills

309 </Accordion>309 </Accordion>

310</AccordionGroup>310</AccordionGroup>

311 311 

sandboxing.md +1 −1

Details

60 60 

61### Enable sandboxing61### Enable sandboxing

62 62 

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

64 64 

65```65```

66> /sandbox66> /sandbox

security.md +1 −1

Details

87 87 

88## IDE security88## IDE security

89 89 

90See [here](/en/vs-code#security) for more information on the security of running Claude Code in an IDE.90See [VS Code security and privacy](/en/vs-code#security-and-privacy) for more information on running Claude Code in an IDE.

91 91 

92## Cloud execution security92## Cloud execution security

93 93 

settings.md +10 −10

Details

156| `strictKnownMarketplaces` | When set in managed-settings.json, allowlist of plugin marketplaces users can add. Undefined = no restrictions, empty array = lockdown. Applies to marketplace additions only. See [Managed marketplace restrictions](/en/plugin-marketplaces#managed-marketplace-restrictions) | `[{ "source": "github", "repo": "acme-corp/plugins" }]` |156| `strictKnownMarketplaces` | When set in managed-settings.json, allowlist of plugin marketplaces users can add. Undefined = no restrictions, empty array = lockdown. Applies to marketplace additions only. See [Managed marketplace restrictions](/en/plugin-marketplaces#managed-marketplace-restrictions) | `[{ "source": "github", "repo": "acme-corp/plugins" }]` |

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| `awsAuthRefresh` | Custom script that modifies the `.aws` directory (see [advanced credential configuration](/en/amazon-bedrock#advanced-credential-configuration)) | `aws sso login --profile myprofile` |

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| `awsCredentialExport` | Custom script that outputs JSON with AWS credentials (see [advanced credential configuration](/en/amazon-bedrock#advanced-credential-configuration)) | `/bin/generate_aws_grant.sh` |

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

160| `plansDirectory` | Customize where plan files are stored. Path is relative to project root. Default: `~/.claude/plans` | `"./plans"` |160| `plansDirectory` | Customize where plan files are stored. Path is relative to project root. Default: `~/.claude/plans` | `"./plans"` |

161| `showTurnDuration` | Show turn duration messages after responses (e.g., "Cooked for 1m 6s"). Set to `false` to hide these messages | `true` |161| `showTurnDuration` | Show turn duration messages after responses (e.g., "Cooked for 1m 6s"). Set to `false` to hide these messages | `true` |

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


218Two wildcard syntaxes are available for Bash rules:218Two wildcard syntaxes are available for Bash rules:

219 219 

220| Wildcard | Position | Behavior | Example |220| Wildcard | Position | Behavior | Example |

221| :------- | :------------------ | :---------------------------------------------------------------------- | :-------------------------------------------------------- |221| :------- | :------------------ | :----------------------------------------------------------------------------------------------- | :------------------------------------------- |

222| `:*` | End of pattern only | **Prefix matching** - matches commands starting with the prefix | `Bash(npm run:*)` matches `npm run test`, `npm run build` |222| `:*` | End of pattern only | **Prefix matching** with word boundary. The prefix must be followed by a space or end-of-string. | `Bash(ls:*)` matches `ls -la` but not `lsof` |

223| `*` | Anywhere in pattern | **Glob matching** - matches any sequence of characters at that position | `Bash(* install)` matches `npm install`, `yarn install` |223| `*` | Anywhere in pattern | **Glob matching** with no word boundary. Matches any sequence of characters at that position. | `Bash(ls*)` matches both `ls -la` and `lsof` |

224 224 

225**Prefix matching with `:*`**225**Prefix matching with `:*`**

226 226 


258```258```

259 259 

260<Warning>260<Warning>

261 Bash permission rules use pattern matching and can be bypassed using shell features like command flags, variables, or redirects. For example, `Bash(curl:*)` can be bypassed with `curl -X GET` reordered to `curl http://example.com -X GET`. Do not rely on Bash deny rules as a security boundary.261 Bash permission patterns that try to constrain command arguments are fragile. For example, `Bash(curl http://github.com/:*)` intends to restrict curl to GitHub URLs, but won't match `curl -X GET http://github.com/...` (flags before URL), `curl https://github.com/...` (different protocol), or commands using shell variables. Do not rely on argument-constraining patterns as a security boundary. See [Bash permission limitations](/en/iam#tool-specific-permission-rules) for alternatives.

262</Warning>262</Warning>

263 263 

264For detailed information about tool-specific permission patterns—including Read, Edit, WebFetch, MCP, Task rules, and Bash permission limitations—see [Tool-specific permission rules](/en/iam#tool-specific-permission-rules).264For detailed information about tool-specific permission patterns—including Read, Edit, WebFetch, MCP, Task rules, and Bash permission limitations—see [Tool-specific permission rules](/en/iam#tool-specific-permission-rules).


433 433 

434* **Memory files (`CLAUDE.md`)**: Contain instructions and context that Claude loads at startup434* **Memory files (`CLAUDE.md`)**: Contain instructions and context that Claude loads at startup

435* **Settings files (JSON)**: Configure permissions, environment variables, and tool behavior435* **Settings files (JSON)**: Configure permissions, environment variables, and tool behavior

436* **Slash commands**: Custom commands that can be invoked during a session with `/command-name`436* **Skills**: Custom prompts that can be invoked with `/skill-name` or loaded by Claude automatically

437* **MCP servers**: Extend Claude Code with additional tools and integrations437* **MCP servers**: Extend Claude Code with additional tools and integrations

438* **Precedence**: Higher-level configurations (Managed) override lower-level ones (User/Project)438* **Precedence**: Higher-level configurations (Managed) override lower-level ones (User/Project)

439* **Inheritance**: Settings are merged, with more specific settings adding to or overriding broader ones439* **Inheritance**: Settings are merged, with more specific settings adding to or overriding broader ones


473 473 

474## Plugin configuration474## Plugin configuration

475 475 

476Claude Code supports a plugin system that lets you extend functionality with custom commands, agents, hooks, and MCP servers. Plugins are distributed through marketplaces and can be configured at both user and repository levels.476Claude Code supports a plugin system that lets you extend functionality with skills, agents, hooks, and MCP servers. Plugins are distributed through marketplaces and can be configured at both user and repository levels.

477 477 

478### Plugin settings478### Plugin settings

479 479 


827| `MCP_TIMEOUT` | Timeout in milliseconds for MCP server startup |827| `MCP_TIMEOUT` | Timeout in milliseconds for MCP server startup |

828| `MCP_TOOL_TIMEOUT` | Timeout in milliseconds for MCP tool execution |828| `MCP_TOOL_TIMEOUT` | Timeout in milliseconds for MCP tool execution |

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

830| `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) |830| `SLASH_COMMAND_TOOL_CHAR_BUDGET` | Maximum number of characters for skill metadata shown to the [Skill tool](/en/skills#control-who-invokes-a-skill) (default: 15000). Legacy name kept for backwards compatibility. |

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

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

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


852| **MCPSearch** | Searches for and loads MCP tools when [tool search](/en/mcp#scale-with-mcp-tool-search) is enabled | No |852| **MCPSearch** | Searches for and loads MCP tools when [tool search](/en/mcp#scale-with-mcp-tool-search) is enabled | No |

853| **NotebookEdit** | Modifies Jupyter notebook cells | Yes |853| **NotebookEdit** | Modifies Jupyter notebook cells | Yes |

854| **Read** | Reads the contents of files | No |854| **Read** | Reads the contents of files | No |

855| **Skill** | Executes a [skill or slash command](/en/slash-commands#skill-tool) within the main conversation | Yes |855| **Skill** | Executes a [skill](/en/skills#control-who-invokes-a-skill) within the main conversation | Yes |

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

857| **TodoWrite** | Creates and manages structured task lists | No |857| **TodoWrite** | Creates and manages structured task lists | No |

858| **WebFetch** | Fetches content from a specified URL | Yes |858| **WebFetch** | Fetches content from a specified URL | Yes |


937* [Identity and Access Management](/en/iam#configuring-permissions) - Permission system overview and how allow/ask/deny rules interact937* [Identity and Access Management](/en/iam#configuring-permissions) - Permission system overview and how allow/ask/deny rules interact

938* [Tool-specific permission rules](/en/iam#tool-specific-permission-rules) - Detailed patterns for Bash, Read, Edit, WebFetch, MCP, and Task tools, including security limitations938* [Tool-specific permission rules](/en/iam#tool-specific-permission-rules) - Detailed patterns for Bash, Read, Edit, WebFetch, MCP, and Task tools, including security limitations

939* [Managed settings](/en/iam#managed-settings) - Managed policy configuration for organizations939* [Managed settings](/en/iam#managed-settings) - Managed policy configuration for organizations

940* [Troubleshooting](/en/troubleshooting#auto-updater-issues) - Solutions for common configuration issues940* [Troubleshooting](/en/troubleshooting) - Solutions for common configuration issues

941 941 

942 942 

943---943---

setup.md +1 −1

Details

184 184 

185<Warning>185<Warning>

186 Do NOT use `sudo npm install -g` as this can lead to permission issues and security risks.186 Do NOT use `sudo npm install -g` as this can lead to permission issues and security risks.

187 If you encounter permission errors, see [configure Claude Code](/en/troubleshooting#linux-permission-issues) for recommended solutions.187 If you encounter permission errors, see [troubleshooting permission errors](/en/troubleshooting#command-not-found-claude-or-permission-errors) for recommended solutions.

188</Warning>188</Warning>

189 189 

190## Windows setup190## Windows setup

skills.md +413 −353

Details

1# Agent Skills1# Extend Claude with skills

2 2 

3> Create, manage, and share Skills to extend Claude's capabilities in Claude Code.3> Create, manage, and share skills to extend Claude's capabilities in Claude Code. Includes custom slash commands.

4 4 

5This guide shows you how to create, use, and manage Agent Skills in Claude Code. For background on how Skills work across Claude products, see [What are Skills?](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview).5Skills extend what Claude can do. Create a `SKILL.md` file with instructions, and Claude adds it to its toolkit. Claude uses skills when relevant, or you can invoke one directly with `/skill-name`.

6 6 

7A Skill is a markdown file that teaches Claude how to do something specific: reviewing PRs using your team's standards, generating commit messages in your preferred format, or querying your company's database schema. When you ask Claude something that matches a Skill's purpose, Claude automatically applies it.7<Note>

8 For built-in commands like `/help` and `/compact`, see [interactive mode](/en/interactive-mode#built-in-commands).

8 9 

9## Create your first Skill10 **Custom slash commands have been merged into skills.** A file at `.claude/commands/review.md` and a skill at `.claude/skills/review/SKILL.md` both create `/review` and work the same way. Your existing `.claude/commands/` files keep working. Skills add optional features: a directory for supporting files, frontmatter to [control whether you or Claude invokes them](#control-who-invokes-a-skill), and the ability for Claude to load them automatically when relevant.

11</Note>

10 12 

11This example creates a personal Skill that teaches Claude to explain code using visual diagrams and analogies. Unlike Claude's default explanations, this Skill ensures every explanation includes an ASCII diagram and a real-world analogy.13Claude Code skills follow the [Agent Skills](https://agentskills.io) open standard, which works across multiple AI tools. Claude Code extends the standard with additional features like [invocation control](#control-who-invokes-a-skill), [subagent execution](#run-skills-in-a-subagent), and [dynamic context injection](#inject-dynamic-context).

12 14 

13<Steps>15## Getting started

14 <Step title="Check available Skills">

15 Before creating a Skill, see what Skills Claude already has access to:

16 16 

17 ```17### Create your first skill

18 What Skills are available?

19 ```

20 18 

21 Claude will list any Skills currently loaded. You may see none, or you may see Skills from plugins or your organization.19This example creates a skill that teaches Claude to explain code using visual diagrams and analogies. Since it uses default frontmatter, Claude can load it automatically when you ask how something works, or you can invoke it directly with `/explain-code`.

22 </Step>

23 20 

24 <Step title="Create the Skill directory">21<Steps>

25 Create a directory for the Skill in your personal Skills folder. Personal Skills are available across all your projects. (You can also create [project Skills](#where-skills-live) in `.claude/skills/` to share with your team.)22 <Step title="Create the skill directory">

23 Create a directory for the skill in your personal skills folder. Personal skills are available across all your projects.

26 24 

27 ```bash theme={null}25 ```bash theme={null}

28 mkdir -p ~/.claude/skills/explaining-code26 mkdir -p ~/.claude/skills/explain-code

29 ```27 ```

30 </Step>28 </Step>

31 29 

32 <Step title="Write SKILL.md">30 <Step title="Write SKILL.md">

33 Every Skill needs a `SKILL.md` file. The file starts with YAML metadata between `---` markers and must include a `name` and `description`, followed by Markdown instructions that Claude follows when the Skill is active.31 Every skill needs a `SKILL.md` file with two parts: YAML frontmatter (between `---` markers) that tells Claude when to use the skill, and markdown content with instructions Claude follows when the skill is invoked. The `name` field becomes the `/slash-command`, and the `description` helps Claude decide when to load it automatically.

34 

35 The `description` is especially important, because Claude uses it to decide when to apply the Skill.

36 32 

37 Create `~/.claude/skills/explaining-code/SKILL.md`:33 Create `~/.claude/skills/explain-code/SKILL.md`:

38 34 

39 ```yaml theme={null}35 ```yaml theme={null}

40 ---36 ---

41 name: explaining-code37 name: explain-code

42 description: Explains code with visual diagrams and analogies. Use when explaining how code works, teaching about a codebase, or when the user asks "how does this work?"38 description: Explains code with visual diagrams and analogies. Use when explaining how code works, teaching about a codebase, or when the user asks "how does this work?"

43 ---39 ---

44 40 


53 ```49 ```

54 </Step>50 </Step>

55 51 

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

57 Skills are automatically loaded when created or modified. Verify the Skill appears in the list:53 You can test it two ways:

54 

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

58 56 

59 ```57 ```

60 What Skills are available?58 How does this code work?

61 ```59 ```

62 60 

63 You should see `explaining-code` in the list with its description.61 **Or invoke it directly** with the skill name:

64 </Step>

65 

66 <Step title="Test the Skill">

67 Open any file in your project and ask Claude a question that matches the Skill's description:

68 62 

69 ```63 ```

70 How does this code work?64 /explain-code src/auth/login.ts

71 ```65 ```

72 66 

73 Claude should ask to use the `explaining-code` Skill, then include an analogy and ASCII diagram in its explanation. If the Skill doesn't trigger, try rephrasing to include more keywords from the description, like "explain how this works."67 Either way, Claude should include an analogy and ASCII diagram in its explanation.

74 </Step>68 </Step>

75</Steps>69</Steps>

76 70 

77The rest of this guide covers how Skills work, configuration options, and troubleshooting.71### Where skills live

78 72 

79## How Skills work73Where you store a skill determines who can use it:

80 74 

81Skills are **model-invoked**: Claude decides which Skills to use based on your request. You don't need to explicitly call a Skill. Claude automatically applies relevant Skills when your request matches their description.75| Location | Path | Applies to |

76| :--------- | :----------------------------------------------- | :----------------------------- |

77| Enterprise | See [managed settings](/en/iam#managed-settings) | All users in your organization |

78| Personal | `~/.claude/skills/<skill-name>/SKILL.md` | All your projects |

79| Project | `.claude/skills/<skill-name>/SKILL.md` | This project only |

80| Plugin | `<plugin>/skills/<skill-name>/SKILL.md` | Where plugin is enabled |

82 81 

83When you send a request, Claude follows these steps to find and use relevant Skills:82Project skills override personal skills with the same name. If you have files in `.claude/commands/`, those work the same way but a skill takes precedence over a command with the same name.

84 83 

85<Steps>84#### Automatic discovery from nested directories

86 <Step title="Discovery">

87 At startup, Claude loads only the name and description of each available Skill. This keeps startup fast while giving Claude enough context to know when each Skill might be relevant.

88 </Step>

89 85 

90 <Step title="Activation">86When you work with files in subdirectories, Claude Code automatically discovers skills from nested `.claude/skills/` directories. For example, if you're editing a file in `packages/frontend/`, Claude Code also looks for skills in `packages/frontend/.claude/skills/`. This supports monorepo setups where packages have their own skills.

91 When your request matches a Skill's description, Claude asks to use the Skill. You'll see a confirmation prompt before the full `SKILL.md` is loaded into context. Since Claude reads these descriptions to find relevant Skills, [write descriptions](#skill-not-triggering) that include keywords users would naturally say.

92 </Step>

93 87 

94 <Step title="Execution">88Each skill is a directory with `SKILL.md` as the entrypoint:

95 Claude follows the Skill's instructions, loading referenced files or running bundled scripts as needed.

96 </Step>

97</Steps>

98 89 

99### Where Skills live90```

91my-skill/

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

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

94├── examples/

95│ └── sample.md # Example output showing expected format

96└── scripts/

97 └── validate.sh # Script Claude can execute

98```

100 99 

101Where you store a Skill determines who can use it:100The `SKILL.md` contains the main instructions and is required. Other files are optional and let you build more powerful skills: templates for Claude to fill in, example outputs showing the expected format, scripts Claude can execute, or detailed reference documentation. Reference these files from your `SKILL.md` so Claude knows what they contain and when to load them. See [Add supporting files](#add-supporting-files) for more details.

102 101 

103| Location | Path | Applies to |102<Note>

104| :--------- | :----------------------------------------------- | :-------------------------------- |103 Files in `.claude/commands/` still work and support the same [frontmatter](#frontmatter-reference). Skills are recommended since they support additional features like supporting files.

105| Enterprise | See [managed settings](/en/iam#managed-settings) | All users in your organization |104</Note>

106| Personal | `~/.claude/skills/` | You, across all projects |

107| Project | `.claude/skills/` | Anyone working in this repository |

108| Plugin | Bundled with [plugins](/en/plugins) | Anyone with the plugin installed |

109 105 

110If two Skills have the same name, the higher row wins: managed overrides personal, personal overrides project, and project overrides plugin.106## Configure skills

111 107 

112#### Automatic discovery from nested directories108Skills are configured through YAML frontmatter at the top of `SKILL.md` and the markdown content that follows.

113 109 

114When you work with files in subdirectories, Claude Code automatically discovers Skills from nested `.claude/skills/` directories. For example, if you're editing a file in `packages/frontend/`, Claude Code also looks for Skills in `packages/frontend/.claude/skills/`. This supports monorepo setups where packages have their own Skills.110### Types of skill content

115 111 

116### When to use Skills versus other options112Skill files can contain any instructions, but thinking about how you want to invoke them helps guide what to include:

117 113 

118Claude Code offers several ways to customize behavior. The key difference: **Skills are triggered automatically by Claude** based on your request, while slash commands require you to type `/command` explicitly.114**Reference content** adds knowledge Claude applies to your current work. Conventions, patterns, style guides, domain knowledge. This content runs inline so Claude can use it alongside your conversation context.

119 115 

120| Use this | When you want to... | When it runs |116```yaml theme={null}

121| :--------------------------------------- | :------------------------------------------------------------------------- | :----------------------------------------- |117---

122| **Skills** | Give Claude specialized knowledge (e.g., "review PRs using our standards") | Claude chooses when relevant |118name: api-conventions

123| **[Slash commands](/en/slash-commands)** | Create reusable prompts (e.g., `/deploy staging`) | You type `/command` to run it |119description: API design patterns for this codebase

124| **[CLAUDE.md](/en/memory)** | Set project-wide instructions (e.g., "use TypeScript strict mode") | Loaded into every conversation |120---

125| **[Subagents](/en/sub-agents)** | Delegate tasks to a separate context with its own tools | Claude delegates, or you invoke explicitly |

126| **[Hooks](/en/hooks)** | Run scripts on events (e.g., lint on file save) | Fires on specific tool events |

127| **[MCP servers](/en/mcp)** | Connect Claude to external tools and data sources | Claude calls MCP tools as needed |

128 121 

129**Skills vs. subagents**: Skills add knowledge to the current conversation. Subagents run in a separate context with their own tools. Use Skills for guidance and standards; use subagents when you need isolation or different tool access.122When writing API endpoints:

123- Use RESTful naming conventions

124- Return consistent error formats

125- Include request validation

126```

130 127 

131**Skills vs. MCP**: Skills tell Claude *how* to use tools; MCP *provides* the tools. For example, an MCP server connects Claude to your database, while a Skill teaches Claude your data model and query patterns.128**Task content** gives Claude step-by-step instructions for a specific action, like deployments, commits, or code generation. These are often actions you want to invoke directly with `/skill-name` rather than letting Claude decide when to run them. Add `disable-model-invocation: true` to prevent Claude from triggering it automatically.

132 129 

133<Note>130```yaml theme={null}

134 For a deep dive into the architecture and real-world applications of Agent Skills, read [Equipping agents for the real world with Agent Skills](https://www.anthropic.com/engineering/equipping-agents-for-the-real-world-with-agent-skills).131---

135</Note>132name: deploy

133description: Deploy the application to production

134context: fork

135disable-model-invocation: true

136---

136 137 

137## Configure Skills138Deploy the application:

1391. Run the test suite

1402. Build the application

1413. Push to the deployment target

142```

138 143 

139This section covers Skill file structure, supporting files, tool restrictions, and distribution options.144Your `SKILL.md` can contain anything, but thinking through how you want the skill invoked (by you, by Claude, or both) and where you want it to run (inline or in a subagent) helps guide what to include. For complex skills, you can also [add supporting files](#add-supporting-files) to keep the main skill focused.

140 145 

141### Write SKILL.md146### Frontmatter reference

142 147 

143The `SKILL.md` file is the only required file in a Skill. It has two parts: YAML metadata (the section between `---` markers) at the top, and Markdown instructions that tell Claude how to use the Skill:148Beyond the markdown content, you can configure skill behavior using YAML frontmatter fields between `---` markers at the top of your `SKILL.md` file:

144 149 

145```yaml theme={null}150```yaml theme={null}

146---151---

147name: your-skill-name152name: my-skill

148description: Brief description of what this Skill does and when to use it153description: What this skill does

154disable-model-invocation: true

155allowed-tools: Read, Grep

149---156---

150 157 

151# Your Skill Name158Your skill instructions here...

152 

153## Instructions

154Provide clear, step-by-step guidance for Claude.

155 

156## Examples

157Show concrete examples of using this Skill.

158```159```

159 160 

160#### Available metadata fields161All fields are optional. Only `description` is recommended so Claude knows when to use the skill.

161 

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

163 162 

164| Field | Required | Description |163| Field | Required | Description |

165| :--------------- | :------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |164| :------------------------- | :---------- | :---------------------------------------------------------------------------------------------------------------------------------------------------- |

166| `name` | Yes | Skill name. Must use lowercase letters, numbers, and hyphens only (max 64 characters). Should match the directory name. |165| `name` | No | Display name for the skill. If omitted, uses the directory name. Lowercase letters, numbers, and hyphens only (max 64 characters). |

167| `description` | Yes | What the Skill does and when to use it (max 1024 characters). Claude uses this to decide when to apply the Skill. |166| `description` | Recommended | What the skill does and when to use it. Claude uses this to decide when to apply the skill. If omitted, uses the first paragraph of markdown content. |

168| `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). |167| `argument-hint` | No | Hint shown during autocomplete to indicate expected arguments. Example: `[issue-number]` or `[filename] [format]`. |

169| `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. |168| `disable-model-invocation` | No | Set to `true` to prevent Claude from automatically loading this skill. Use for workflows you want to trigger manually with `/name`. Default: `false`. |

170| `context` | No | Set to `fork` to run the Skill in a forked sub-agent context with its own conversation history. |169| `user-invocable` | No | Set to `false` to hide from the `/` menu. Use for background knowledge users shouldn't invoke directly. Default: `true`. |

171| `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`. |170| `allowed-tools` | No | Tools Claude can use without asking permission when this skill is active. |

172| `hooks` | No | Define hooks scoped to this Skill's lifecycle. Supports `PreToolUse`, `PostToolUse`, and `Stop` events. |171| `model` | No | Model to use when this skill is active. |

173| `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). |172| `context` | No | Set to `fork` to run in a forked subagent context. |

173| `agent` | No | Which subagent type to use when `context: fork` is set. |

174| `hooks` | No | Hooks scoped to this skill's lifecycle. See [Hooks](/en/hooks) for configuration format. |

174 175 

175#### Available string substitutions176#### Available string substitutions

176 177 

177Skills support string substitution for dynamic values in the Skill content:178Skills support string substitution for dynamic values in the skill content:

178 179 

179| Variable | Description |180| Variable | Description |

180| :--------------------- | :------------------------------------------------------------------------------------------------------------------------------------------- |181| :--------------------- | :------------------------------------------------------------------------------------------------------------------------------------------- |

181| `$ARGUMENTS` | All arguments passed when invoking the Skill. If `$ARGUMENTS` is not present in the content, arguments are appended as `ARGUMENTS: <value>`. |182| `$ARGUMENTS` | All arguments passed when invoking the skill. If `$ARGUMENTS` is not present in the content, arguments are appended as `ARGUMENTS: <value>`. |

182| `${CLAUDE_SESSION_ID}` | The current session ID. Useful for logging, creating session-specific files, or correlating Skill output with sessions. |183| `${CLAUDE_SESSION_ID}` | The current session ID. Useful for logging, creating session-specific files, or correlating skill output with sessions. |

183 184 

184**Example using substitutions:**185**Example using substitutions:**

185 186 


194$ARGUMENTS195$ARGUMENTS

195```196```

196 197 

197See the [best practices guide](https://docs.claude.com/en/docs/agents-and-tools/agent-skills/best-practices) for complete authoring guidance including validation rules.198### Add supporting files

198 

199### Update or delete a Skill

200 

201To update a Skill, edit its `SKILL.md` file directly. To remove a Skill, delete its directory. Changes take effect immediately.

202 

203### Add supporting files with progressive disclosure

204 

205Skills share Claude's context window with conversation history, other Skills, and your request. To keep context focused, use **progressive disclosure**: put essential information in `SKILL.md` and detailed reference material in separate files that Claude reads only when needed.

206 199 

207This approach lets you bundle comprehensive documentation, examples, and scripts without consuming context upfront. Claude loads additional files only when the task requires them.200Skills 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.

208 

209<Tip>Keep `SKILL.md` under 500 lines for optimal performance. If your content exceeds this, split detailed reference material into separate files.</Tip>

210 

211#### Example: multi-file Skill structure

212 

213Claude discovers supporting files through links in your `SKILL.md`. The following example shows a Skill with detailed documentation in separate files and utility scripts that Claude can execute without reading:

214 201 

215```202```

216my-skill/203my-skill/


221 └── helper.py (utility script - executed, not loaded)208 └── helper.py (utility script - executed, not loaded)

222```209```

223 210 

224The `SKILL.md` file references these supporting files so Claude knows they exist:211Reference supporting files from `SKILL.md` so Claude knows what each file contains and when to load it:

225 

226````markdown theme={null}

227## Overview

228 

229[Essential instructions here]

230 212 

213```markdown theme={null}

231## Additional resources214## Additional resources

232 215 

233- For complete API details, see [reference.md](reference.md)216- For complete API details, see [reference.md](reference.md)

234- For usage examples, see [examples.md](examples.md)217- For usage examples, see [examples.md](examples.md)

235 

236## Utility scripts

237 

238To validate input files, run the helper script. It checks for required fields and returns any validation errors:

239```bash

240python scripts/helper.py input.txt

241```218```

242````

243 

244<Tip>Keep references one level deep. Link directly from `SKILL.md` to reference files. Deeply nested references (file A links to file B which links to file C) may result in Claude partially reading files.</Tip>

245 

246**Bundle utility scripts for zero-context execution.** Scripts in your Skill directory can be executed without loading their contents into context. Claude runs the script and only the output consumes tokens. This is useful for:

247 219 

248* Complex validation logic that would be verbose to describe in prose220<Tip>Keep `SKILL.md` under 500 lines. Move detailed reference material to separate files.</Tip>

249* Data processing that's more reliable as tested code than generated code

250* Operations that benefit from consistency across uses

251 221 

252In `SKILL.md`, tell Claude to run the script rather than read it:222### Control who invokes a skill

253 223 

254```markdown theme={null}224By default, both you and Claude can invoke any skill. You can type `/skill-name` to invoke it directly, and Claude can load it automatically when relevant to your conversation. Two frontmatter fields let you restrict this:

255Run the validation script to check the form:

256python scripts/validate_form.py input.pdf

257```

258 225 

259For complete guidance on structuring Skills, see the [best practices guide](https://docs.claude.com/en/docs/agents-and-tools/agent-skills/best-practices#progressive-disclosure-patterns).226* **`disable-model-invocation: true`**: Only you can invoke the skill. Use this for workflows with side effects or that you want to control timing, like `/commit`, `/deploy`, or `/send-slack-message`. You don't want Claude deciding to deploy because your code looks ready.

260 227 

261### Restrict tool access with allowed-tools228* **`user-invocable: false`**: Only Claude can invoke the skill. Use this for background knowledge that isn't actionable as a command. A `legacy-system-context` skill explains how an old system works. Claude should know this when relevant, but `/legacy-system-context` isn't a meaningful action for users to take.

262 229 

263Use 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:230This example creates a deploy skill that only you can trigger. The `disable-model-invocation: true` field prevents Claude from running it automatically:

264 231 

265```yaml theme={null}232```yaml theme={null}

266---233---

267name: reading-files-safely234name: deploy

268description: Read files without making changes. Use when you need read-only file access.235description: Deploy the application to production

269allowed-tools: Read, Grep, Glob236disable-model-invocation: true

270---237---

271```

272 238 

273Or use YAML-style lists for better readability:239Deploy $ARGUMENTS to production:

274 240 

275```yaml theme={null}2411. Run the test suite

276name: reading-files-safely2422. Build the application

277description: Read files without making changes. Use when you need read-only file access.2433. Push to the deployment target

278allowed-tools:2444. Verify the deployment succeeded

279 - Read

280 - Grep

281 - Glob

282```245```

283 246 

284When this Skill is active, Claude can only use the specified tools (Read, Grep, Glob) without needing to ask for permission. This is useful for:247Here's how the two fields affect invocation and context loading:

285 

286* Read-only Skills that shouldn't modify files

287* Skills with limited scope: for example, only data analysis, no file writing

288* Security-sensitive workflows where you want to restrict capabilities

289 248 

290If `allowed-tools` is omitted, the Skill doesn't restrict tools. Claude uses its standard permission model and may ask you to approve tool usage.249| Frontmatter | You can invoke | Claude can invoke | When loaded into context |

250| :------------------------------- | :------------- | :---------------- | :----------------------------------------------------------- |

251| (default) | Yes | Yes | Description always in context, full skill loads when invoked |

252| `disable-model-invocation: true` | Yes | No | Description not in context, full skill loads when you invoke |

253| `user-invocable: false` | No | Yes | Description always in context, full skill loads when invoked |

291 254 

292<Note>255<Note>

293 `allowed-tools` is only supported for Skills in Claude Code.256 In a regular session, skill descriptions are loaded into context so Claude knows what's available, but full skill content only loads when invoked. [Subagents with preloaded skills](/en/sub-agents#preload-skills-into-subagents) work differently: the full skill content is injected at startup.

294</Note>257</Note>

295 258 

296### Run Skills in a forked context259### Restrict tool access

297 260 

298Use `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:261Use the `allowed-tools` field to limit which tools Claude can use when a skill is active. This skill creates a read-only mode where Claude can explore files but not modify them:

299 262 

300```yaml theme={null}263```yaml theme={null}

301---264---

302name: code-analysis265name: safe-reader

303description: Analyze code quality and generate detailed reports266description: Read files without making changes

304context: fork267allowed-tools: Read, Grep, Glob

305---268---

306```269```

307 270 

308### Define hooks for Skills271### Pass arguments to skills

309 272 

310Skills can define hooks that run during the Skill's lifecycle. Use the `hooks` field to specify `PreToolUse`, `PostToolUse`, or `Stop` handlers:273Both you and Claude can pass arguments when invoking a skill. Arguments are available via the `$ARGUMENTS` placeholder.

274 

275This skill fixes a GitHub issue by number. The `$ARGUMENTS` placeholder gets replaced with whatever follows the skill name:

311 276 

312```yaml theme={null}277```yaml theme={null}

313---278---

314name: secure-operations279name: fix-issue

315description: Perform operations with additional security checks280description: Fix a GitHub issue

316hooks:281disable-model-invocation: true

317 PreToolUse:

318 - matcher: "Bash"

319 hooks:

320 - type: command

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

322 once: true

323---282---

324```

325 283 

326The `once: true` option runs the hook only once per session. After the first successful execution, the hook is removed.284Fix GitHub issue $ARGUMENTS following our coding standards.

327 285 

328Hooks defined in a Skill are scoped to that Skill's execution and are automatically cleaned up when the Skill finishes.2861. Read the issue description

329 2872. Understand the requirements

330See [Hooks](/en/hooks) for the complete hook configuration format.2883. Implement the fix

331 2894. Write tests

332### Control Skill visibility2905. Create a commit

333 291```

334Skills can be invoked in three ways:

335 

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

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

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

339 292 

340The `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.293When you run `/fix-issue 123`, Claude receives "Fix GitHub issue 123 following our coding standards..."

341 294 

342To block programmatic invocation via the `Skill` tool, use `disable-model-invocation: true` instead.295If you invoke a skill with arguments but the skill doesn't include `$ARGUMENTS`, Claude Code appends `ARGUMENTS: <your input>` to the end of the skill content so Claude still sees what you typed.

343 296 

344#### When to use each setting297## Advanced patterns

345 298 

346| Setting | Slash menu | `Skill` tool | Auto-discovery | Use case |299### Inject dynamic context

347| :------------------------------- | :--------- | :----------- | :------------- | :-------------------------------------------------------------- |

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

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

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

351 300 

352#### Example: model-only Skill301The `!`command\`\` syntax runs shell commands before the skill content is sent to Claude. The command output replaces the placeholder, so Claude receives actual data, not the command itself.

353 302 

354Set `user-invocable: false` to hide a Skill from the slash menu while still allowing Claude to invoke it programmatically:303This skill summarizes a pull request by fetching live PR data with the GitHub CLI. The `!`gh pr diff\`\` and other commands run first, and their output gets inserted into the prompt:

355 304 

356```yaml theme={null}305```yaml theme={null}

357---306---

358name: internal-review-standards307name: pr-summary

359description: Apply internal code review standards when reviewing pull requests308description: Summarize changes in a pull request

360user-invocable: false309context: fork

310agent: Explore

311allowed-tools: Bash(gh:*)

361---312---

362```

363 

364With 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.

365 313 

366### Skills and subagents314## Pull request context

315- PR diff: !`gh pr diff`

316- PR comments: !`gh pr view --comments`

317- Changed files: !`gh pr diff --name-only`

367 318 

368There are two ways Skills and subagents can work together:319## Your task

369 320Summarize this pull request...

370#### Give a subagent access to Skills

371 

372[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:

373 

374```yaml theme={null}

375# .claude/agents/code-reviewer.md

376name: code-reviewer

377description: Review code for quality and best practices

378skills: pr-review, security-check

379```321```

380 322 

381The full content of each listed Skill is injected into the subagent's context at startup, not just made available for invocation. If the `skills` field is omitted, no Skills are loaded for that subagent.323When this skill runs:

382 324 

383<Note>3251. Each `!`command\`\` executes immediately (before Claude sees anything)

384 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.3262. The output replaces the placeholder in the skill content

385</Note>3273. Claude receives the fully-rendered prompt with actual PR data

386 328 

387#### Run a Skill in a subagent context329This is preprocessing, not something Claude executes. Claude only sees the final result.

388 330 

389Use `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.331<Tip>

332 To enable [extended thinking](/en/common-workflows#use-extended-thinking-thinking-mode) in a skill, include the word "ultrathink" anywhere in your skill content.

333</Tip>

390 334 

391### Distribute Skills335### Run skills in a subagent

392 336 

393You can share Skills in several ways:337Add `context: fork` to your frontmatter when you want a skill to run in isolation. The skill content becomes the prompt that drives the subagent. It won't have access to your conversation history.

394 338 

395* **Project Skills**: Commit `.claude/skills/` to version control. Anyone who clones the repository gets the Skills.339<Warning>

396* **Plugins**: To share Skills across multiple repositories, create a `skills/` directory in your [plugin](/en/plugins) with Skill folders containing `SKILL.md` files. Distribute through a [plugin marketplace](/en/plugin-marketplaces).340 `context: fork` only makes sense for skills with explicit instructions. If your skill contains guidelines like "use these API conventions" without a task, the subagent receives the guidelines but no actionable prompt, and returns without meaningful output.

397* **Managed**: Administrators can deploy Skills organization-wide through [managed settings](/en/iam#managed-settings). See [Where Skills live](#where-skills-live) for managed Skill paths.341</Warning>

398 342 

399## Examples343Skills and [subagents](/en/sub-agents) work together in two directions:

400 344 

401These examples show common Skill patterns, from minimal single-file Skills to multi-file Skills with supporting documentation and scripts.345| Approach | System prompt | Task | Also loads |

346| :--------------------------- | :---------------------------------------- | :-------------------------- | :--------------------------- |

347| Skill with `context: fork` | From agent type (`Explore`, `Plan`, etc.) | SKILL.md content | CLAUDE.md |

348| Subagent with `skills` field | Subagent's markdown body | Claude's delegation message | Preloaded skills + CLAUDE.md |

402 349 

403### Simple Skill (single file)350With `context: fork`, you write the task in your skill and pick an agent type to execute it. For the inverse (defining a custom subagent that uses skills as reference material), see [Subagents](/en/sub-agents#preload-skills-into-subagents).

404 351 

405A minimal Skill needs only a `SKILL.md` file with frontmatter and instructions. This example helps Claude generate commit messages by examining staged changes:352#### Example: Research skill using Explore agent

406 353 

407```354This skill runs research in a forked Explore agent. The skill content becomes the task, and the agent provides read-only tools optimized for codebase exploration:

408commit-helper/

409└── SKILL.md

410```

411 355 

412```yaml theme={null}356```yaml theme={null}

413---357---

414name: generating-commit-messages358name: deep-research

415description: Generates clear commit messages from git diffs. Use when writing commit messages or reviewing staged changes.359description: Research a topic thoroughly

360context: fork

361agent: Explore

416---362---

417 363 

418# Generating Commit Messages364Research $ARGUMENTS thoroughly:

419 

420## Instructions

421 365 

4221. Run `git diff --staged` to see changes3661. Find relevant files using Glob and Grep

4232. I'll suggest a commit message with:3672. Read and analyze the code

424 - Summary under 50 characters3683. Summarize findings with specific file references

425 - Detailed description

426 - Affected components

427 

428## Best practices

429 

430- Use present tense

431- Explain what and why, not how

432```369```

433 370 

434### Use multiple files371When this skill runs:

435 372 

436For complex Skills, use progressive disclosure to keep the main `SKILL.md` focused while providing detailed documentation in supporting files. This PDF processing Skill includes reference docs, utility scripts, and uses `allowed-tools` to restrict Claude to specific tools:3731. A new isolated context is created

3742. The subagent receives the skill content as its prompt ("Research \$ARGUMENTS thoroughly...")

3753. The `agent` field determines the execution environment (model, tools, and permissions)

3764. Results are summarized and returned to your main conversation

437 377 

438```378The `agent` field specifies which subagent configuration to use. Options include built-in agents (`Explore`, `Plan`, `general-purpose`) or any custom subagent from `.claude/agents/`. If omitted, uses `general-purpose`.

439pdf-processing/

440├── SKILL.md # Overview and quick start

441├── FORMS.md # Form field mappings and filling instructions

442├── REFERENCE.md # API details for pypdf and pdfplumber

443└── scripts/

444 ├── fill_form.py # Utility to populate form fields

445 └── validate.py # Checks PDFs for required fields

446```

447 379 

448**`SKILL.md`**:380### Restrict Claude's skill access

449 381 

450````yaml theme={null}382By default, Claude can invoke any skill that doesn't have `disable-model-invocation: true` set. Built-in commands like `/compact` and `/init` are not available through the Skill tool.

451name: pdf-processing

452description: Extract text, fill forms, merge PDFs. Use when working with PDF files, forms, or document extraction. Requires pypdf and pdfplumber packages.

453allowed-tools: Read, Bash(python:*)

454 383 

455# PDF Processing384Three ways to control which skills Claude can invoke:

456 385 

457## Quick start386**Disable all skills** by denying the Skill tool in `/permissions`:

458 387 

459Extract text:388```

460```python389# Add to deny rules:

461import pdfplumber390Skill

462with pdfplumber.open("doc.pdf") as pdf:

463 text = pdf.pages[0].extract_text()

464```391```

465 392 

466For form filling, see [FORMS.md](FORMS.md).393**Allow or deny specific skills** using [permission rules](/en/iam):

467For detailed API reference, see [REFERENCE.md](REFERENCE.md).

468 394 

469## Requirements395```

396# Allow only specific skills

397Skill(commit)

398Skill(review-pr:*)

470 399 

471Packages must be installed in your environment:400# Deny specific skills

472```bash401Skill(deploy:*)

473pip install pypdf pdfplumber

474```402```

475````403 

404Permission syntax: `Skill(name)` for exact match, `Skill(name:*)` for prefix match with any arguments.

405 

406**Hide individual skills** by adding `disable-model-invocation: true` to their frontmatter. This removes the skill from Claude's context entirely.

476 407 

477<Note>408<Note>

478 If your Skill requires external packages, list them in the description. Packages must be installed in your environment before Claude can use them.409 The `user-invocable` field only controls menu visibility, not Skill tool access. Use `disable-model-invocation: true` to block programmatic invocation.

479</Note>410</Note>

480 411 

481## Troubleshooting412## Share skills

482 

483### View and test Skills

484 413 

485To see which Skills Claude has access to, ask Claude a question like "What Skills are available?" Claude loads all available Skill names and descriptions into the context window when a conversation starts, so it can list the Skills it currently has access to.414Skills can be distributed at different scopes depending on your audience:

486 415 

487To test a specific Skill, ask Claude to do a task that matches the Skill's description. For example, if your Skill has the description "Reviews pull requests for code quality", ask Claude to "Review the changes in my current branch." Claude automatically uses the Skill when the request matches its description.416* **Project skills**: Commit `.claude/skills/` to version control

417* **Plugins**: Create a `skills/` directory in your [plugin](/en/plugins)

418* **Managed**: Deploy organization-wide through [managed settings](/en/iam#managed-settings)

488 419 

489### Skill not triggering420### Generate visual output

490 421 

491The description field is how Claude decides whether to use your Skill. Vague descriptions like "Helps with documents" don't give Claude enough information to match your Skill to relevant requests.422Skills can bundle and run scripts in any language, giving Claude capabilities beyond what's possible in a single prompt. One powerful pattern is generating visual output: interactive HTML files that open in your browser for exploring data, debugging, or creating reports.

492 423 

493A good description answers two questions:424This example creates a codebase explorer: an interactive tree view where you can expand and collapse directories, see file sizes at a glance, and identify file types by color.

494 425 

4951. **What does this Skill do?** List the specific capabilities.426Create the Skill directory:

4962. **When should Claude use it?** Include trigger terms users would mention.

497 427 

498```yaml theme={null}428```bash theme={null}

499description: Extract text and tables from PDF files, fill forms, merge documents. Use when working with PDF files or when the user mentions PDFs, forms, or document extraction.429mkdir -p ~/.claude/skills/codebase-visualizer/scripts

500```430```

501 431 

502This description works because it names specific actions (extract, fill, merge) and includes keywords users would say (PDF, forms, document extraction).432Create `~/.claude/skills/codebase-visualizer/SKILL.md`. The description tells Claude when to activate this Skill, and the instructions tell Claude to run the bundled script:

503 

504### Skill doesn't load

505 433 

506**Check the file path.** Skills must be in the correct directory with the exact filename `SKILL.md` (case-sensitive):434````yaml theme={null}

507 435---

508| Type | Path |436name: codebase-visualizer

509| :--------- | :---------------------------------------------------------------------- |437description: Generate an interactive collapsible tree visualization of your codebase. Use when exploring a new repo, understanding project structure, or identifying large files.

510| Personal | `~/.claude/skills/my-skill/SKILL.md` |438allowed-tools: Bash(python:*)

511| Project | `.claude/skills/my-skill/SKILL.md` |439---

512| Enterprise | See [Where Skills live](#where-skills-live) for platform-specific paths |

513| Plugin | `skills/my-skill/SKILL.md` inside the plugin directory |

514 440 

515**Check the YAML syntax.** Invalid YAML in the frontmatter prevents the Skill from loading. The frontmatter must start with `---` on line 1 (no blank lines before it), end with `---` before the Markdown content, and use spaces for indentation (not tabs).441# Codebase Visualizer

516 442 

517**Run debug mode.** Use `claude --debug` to see Skill loading errors.443Generate an interactive HTML tree view that shows your project's file structure with collapsible directories.

518 444 

519### Skill has errors445## Usage

520 446 

521**Check dependencies are installed.** If your Skill uses external packages, they must be installed in your environment before Claude can use them.447Run the visualization script from your project root:

522 448 

523**Check script permissions.** Scripts need execute permissions: `chmod +x scripts/*.py`449```bash

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

451```

524 452 

525**Check file paths.** Use forward slashes (Unix style) in all paths. Use `scripts/helper.py`, not `scripts\helper.py`.453This creates `codebase-map.html` in the current directory and opens it in your default browser.

526 454 

527### Multiple Skills conflict455## What the visualization shows

528 456 

529If Claude uses the wrong Skill or seems confused between similar Skills, the descriptions are probably too similar. Make each description distinct by using specific trigger terms.457- **Collapsible directories**: Click folders to expand/collapse

458- **File sizes**: Displayed next to each file

459- **Colors**: Different colors for different file types

460- **Directory totals**: Shows aggregate size of each folder

461````

530 462 

531For example, instead of two Skills with "data analysis" in both descriptions, differentiate them: one for "sales data in Excel files and CRM exports" and another for "log files and system metrics". The more specific your trigger terms, the easier it is for Claude to match the right Skill to your request.463Create `~/.claude/skills/codebase-visualizer/scripts/visualize.py`. This script scans a directory tree and generates a self-contained HTML file with:

464 

465* A **summary sidebar** showing file count, directory count, total size, and number of file types

466* A **bar chart** breaking down the codebase by file type (top 8 by size)

467* A **collapsible tree** where you can expand and collapse directories, with color-coded file type indicators

468 

469The script requires Python but uses only built-in libraries, so there are no packages to install:

470 

471```python expandable theme={null}

472#!/usr/bin/env python3

473"""Generate an interactive collapsible tree visualization of a codebase."""

474 

475import json

476import sys

477import webbrowser

478from pathlib import Path

479from collections import Counter

480 

481IGNORE = {'.git', 'node_modules', '__pycache__', '.venv', 'venv', 'dist', 'build'}

482 

483def scan(path: Path, stats: dict) -> dict:

484 result = {"name": path.name, "children": [], "size": 0}

485 try:

486 for item in sorted(path.iterdir()):

487 if item.name in IGNORE or item.name.startswith('.'):

488 continue

489 if item.is_file():

490 size = item.stat().st_size

491 ext = item.suffix.lower() or '(no ext)'

492 result["children"].append({"name": item.name, "size": size, "ext": ext})

493 result["size"] += size

494 stats["files"] += 1

495 stats["extensions"][ext] += 1

496 stats["ext_sizes"][ext] += size

497 elif item.is_dir():

498 stats["dirs"] += 1

499 child = scan(item, stats)

500 if child["children"]:

501 result["children"].append(child)

502 result["size"] += child["size"]

503 except PermissionError:

504 pass

505 return result

506 

507def generate_html(data: dict, stats: dict, output: Path) -> None:

508 ext_sizes = stats["ext_sizes"]

509 total_size = sum(ext_sizes.values()) or 1

510 sorted_exts = sorted(ext_sizes.items(), key=lambda x: -x[1])[:8]

511 colors = {

512 '.js': '#f7df1e', '.ts': '#3178c6', '.py': '#3776ab', '.go': '#00add8',

513 '.rs': '#dea584', '.rb': '#cc342d', '.css': '#264de4', '.html': '#e34c26',

514 '.json': '#6b7280', '.md': '#083fa1', '.yaml': '#cb171e', '.yml': '#cb171e',

515 '.mdx': '#083fa1', '.tsx': '#3178c6', '.jsx': '#61dafb', '.sh': '#4eaa25',

516 }

517 lang_bars = "".join(

518 f'<div class="bar-row"><span class="bar-label">{ext}</span>'

519 f'<div class="bar" style="width:{(size/total_size)*100}%;background:{colors.get(ext,"#6b7280")}"></div>'

520 f'<span class="bar-pct">{(size/total_size)*100:.1f}%</span></div>'

521 for ext, size in sorted_exts

522 )

523 def fmt(b):

524 if b < 1024: return f"{b} B"

525 if b < 1048576: return f"{b/1024:.1f} KB"

526 return f"{b/1048576:.1f} MB"

527 

528 html = f'''<!DOCTYPE html>

529<html><head>

530 <meta charset="utf-8"><title>Codebase Explorer</title>

531 <style>

532 body {{ font: 14px/1.5 system-ui, sans-serif; margin: 0; background: #1a1a2e; color: #eee; }}

533 .container {{ display: flex; height: 100vh; }}

534 .sidebar {{ width: 280px; background: #252542; padding: 20px; border-right: 1px solid #3d3d5c; overflow-y: auto; flex-shrink: 0; }}

535 .main {{ flex: 1; padding: 20px; overflow-y: auto; }}

536 h1 {{ margin: 0 0 10px 0; font-size: 18px; }}

537 h2 {{ margin: 20px 0 10px 0; font-size: 14px; color: #888; text-transform: uppercase; }}

538 .stat {{ display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #3d3d5c; }}

539 .stat-value {{ font-weight: bold; }}

540 .bar-row {{ display: flex; align-items: center; margin: 6px 0; }}

541 .bar-label {{ width: 55px; font-size: 12px; color: #aaa; }}

542 .bar {{ height: 18px; border-radius: 3px; }}

543 .bar-pct {{ margin-left: 8px; font-size: 12px; color: #666; }}

544 .tree {{ list-style: none; padding-left: 20px; }}

545 details {{ cursor: pointer; }}

546 summary {{ padding: 4px 8px; border-radius: 4px; }}

547 summary:hover {{ background: #2d2d44; }}

548 .folder {{ color: #ffd700; }}

549 .file {{ display: flex; align-items: center; padding: 4px 8px; border-radius: 4px; }}

550 .file:hover {{ background: #2d2d44; }}

551 .size {{ color: #888; margin-left: auto; font-size: 12px; }}

552 .dot {{ width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; }}

553 </style>

554</head><body>

555 <div class="container">

556 <div class="sidebar">

557 <h1>📊 Summary</h1>

558 <div class="stat"><span>Files</span><span class="stat-value">{stats["files"]:,}</span></div>

559 <div class="stat"><span>Directories</span><span class="stat-value">{stats["dirs"]:,}</span></div>

560 <div class="stat"><span>Total size</span><span class="stat-value">{fmt(data["size"])}</span></div>

561 <div class="stat"><span>File types</span><span class="stat-value">{len(stats["extensions"])}</span></div>

562 <h2>By file type</h2>

563 {lang_bars}

564 </div>

565 <div class="main">

566 <h1>📁 {data["name"]}</h1>

567 <ul class="tree" id="root"></ul>

568 </div>

569 </div>

570 <script>

571 const data = {json.dumps(data)};

572 const colors = {json.dumps(colors)};

573 function fmt(b) {{ if (b < 1024) return b + ' B'; if (b < 1048576) return (b/1024).toFixed(1) + ' KB'; return (b/1048576).toFixed(1) + ' MB'; }}

574 function render(node, parent) {{

575 if (node.children) {{

576 const det = document.createElement('details');

577 det.open = parent === document.getElementById('root');

578 det.innerHTML = `<summary><span class="folder">📁 ${{node.name}}</span><span class="size">${{fmt(node.size)}}</span></summary>`;

579 const ul = document.createElement('ul'); ul.className = 'tree';

580 node.children.sort((a,b) => (b.children?1:0)-(a.children?1:0) || a.name.localeCompare(b.name));

581 node.children.forEach(c => render(c, ul));

582 det.appendChild(ul);

583 const li = document.createElement('li'); li.appendChild(det); parent.appendChild(li);

584 }} else {{

585 const li = document.createElement('li'); li.className = 'file';

586 li.innerHTML = `<span class="dot" style="background:${{colors[node.ext]||'#6b7280'}}"></span>${{node.name}}<span class="size">${{fmt(node.size)}}</span>`;

587 parent.appendChild(li);

588 }}

589 }}

590 data.children.forEach(c => render(c, document.getElementById('root')));

591 </script>

592</body></html>'''

593 output.write_text(html)

594 

595if __name__ == '__main__':

596 target = Path(sys.argv[1] if len(sys.argv) > 1 else '.').resolve()

597 stats = {"files": 0, "dirs": 0, "extensions": Counter(), "ext_sizes": Counter()}

598 data = scan(target, stats)

599 out = Path('codebase-map.html')

600 generate_html(data, stats, out)

601 print(f'Generated {out.absolute()}')

602 webbrowser.open(f'file://{out.absolute()}')

603```

532 604 

533### Plugin Skills not appearing605To test, open Claude Code in any project and ask "Visualize this codebase." Claude runs the script, generates `codebase-map.html`, and opens it in your browser.

534 606 

535**Symptom**: You installed a plugin from a marketplace, but its Skills don't appear when you ask Claude "What Skills are available?"607This pattern works for any visual output: dependency graphs, test coverage reports, API documentation, or database schema visualizations. The bundled script does the heavy lifting while Claude handles orchestration.

536 608 

537**Solution**: Clear the plugin cache and reinstall:609## Troubleshooting

538 610 

539```bash theme={null}611### Skill not triggering

540rm -rf ~/.claude/plugins/cache

541```

542 612 

543Then restart Claude Code and reinstall the plugin:613If Claude doesn't use your skill when expected:

544 614 

545```shell theme={null}6151. Check the description includes keywords users would naturally say

546/plugin install plugin-name@marketplace-name6162. Verify the skill appears in `What skills are available?`

547```6173. Try rephrasing your request to match the description more closely

6184. Invoke it directly with `/skill-name` if the skill is user-invocable

548 619 

549This forces Claude Code to re-download and re-register the plugin's Skills.620### Skill triggers too often

550 621 

551**If Skills still don't appear**, verify the plugin's directory structure is correct. Skills must be in a `skills/` directory at the plugin root:622If Claude uses your skill when you don't want it:

552 623 

553```6241. Make the description more specific

554my-plugin/6252. Add `disable-model-invocation: true` if you only want manual invocation

555├── .claude-plugin/

556│ └── plugin.json

557└── skills/

558 └── my-skill/

559 └── SKILL.md

560```

561 626 

562## Next steps627### Claude doesn't see all my skills

563 628 

564<CardGroup cols={2}>629Skill descriptions are loaded into context so Claude knows what's available. If you have many skills, they may exceed the character budget (default 15,000 characters). Run `/context` to check for a warning about excluded skills.

565 <Card title="Authoring best practices" icon="lightbulb" href="https://docs.claude.com/en/docs/agents-and-tools/agent-skills/best-practices">

566 Write Skills that Claude can use effectively

567 </Card>

568 630 

569 <Card title="Agent Skills overview" icon="book" href="https://docs.claude.com/en/docs/agents-and-tools/agent-skills/overview">631To increase the limit, set the `SLASH_COMMAND_TOOL_CHAR_BUDGET` environment variable.

570 Learn how Skills work across Claude products

571 </Card>

572 632 

573 <Card title="Use Skills in the Agent SDK" icon="cube" href="https://docs.claude.com/en/docs/agent-sdk/skills">633## Related resources

574 Use Skills programmatically with TypeScript and Python

575 </Card>

576 634 

577 <Card title="Get started with Agent Skills" icon="rocket" href="https://docs.claude.com/en/docs/agents-and-tools/agent-skills/quickstart">635* **[Subagents](/en/sub-agents)**: delegate tasks to specialized agents

578 Create your first Skill636* **[Plugins](/en/plugins)**: package and distribute skills with other extensions

579 </Card>637* **[Hooks](/en/hooks)**: automate workflows around tool events

580</CardGroup>638* **[Memory](/en/memory)**: manage CLAUDE.md files for persistent context

639* **[Interactive mode](/en/interactive-mode#built-in-commands)**: built-in commands and shortcuts

640* **[Permissions](/en/iam)**: control tool and skill access

581 641 

582 642 

583---643---

slash-commands.md +0 −546 deleted

File Deleted View Diff

1# Slash commands

2 

3> Control Claude's behavior during an interactive session with slash commands.

4 

5## Built-in slash commands

6 

7| Command | Purpose |

8| :------------------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

9| `/add-dir` | Add additional working directories |

10| `/agents` | Manage custom AI subagents for specialized tasks |

11| `/bashes` | List and manage background tasks |

12| `/bug` | Report bugs (sends conversation to Anthropic) |

13| `/clear` | Clear conversation history |

14| `/compact [instructions]` | Compact conversation with optional focus instructions |

15| `/config` | Open the Settings interface (Config tab). Type to search and filter settings |

16| `/context` | Visualize current context usage as a colored grid |

17| `/cost` | Show token usage statistics. See [cost tracking guide](/en/costs#using-the-cost-command) for subscription-specific details. |

18| `/doctor` | Run diagnostics to check installation health, detect configuration issues (invalid settings, MCP errors, keybinding problems), and identify context usage warnings (large CLAUDE.md files, high MCP token usage) |

19| `/exit` | Exit the REPL |

20| `/export [filename]` | Export the current conversation to a file or clipboard |

21| `/help` | Get usage help |

22| `/hooks` | Manage hook configurations for tool events |

23| `/ide` | Manage IDE integrations and show status |

24| `/init` | Initialize project with `CLAUDE.md` guide |

25| `/install-github-app` | Set up Claude GitHub Actions for a repository |

26| `/login` | Switch Anthropic accounts |

27| `/logout` | Sign out from your Anthropic account |

28| `/mcp` | Manage MCP server connections and OAuth authentication |

29| `/memory` | Edit `CLAUDE.md` memory files |

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

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

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

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

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

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

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

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

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

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

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

41| `/review` | Request code review |

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

43| `/sandbox` | Enable sandboxed bash tool with filesystem and network isolation for safer, more autonomous execution |

44| `/security-review` | Complete a security review of pending changes on the current branch |

45| `/stats` | Visualize daily usage, session history, streaks, and model preferences. Press `r` to cycle date ranges (Last 7 days, Last 30 days, All time) |

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

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

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 |

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

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

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

54 

55## Custom slash commands

56 

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.

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 

63### Syntax

64 

65```

66/<command-name> [arguments]

67```

68 

69#### Parameters

70 

71| Parameter | Description |

72| :--------------- | :---------------------------------------------------------------- |

73| `<command-name>` | Name derived from the Markdown filename (without `.md` extension) |

74| `[arguments]` | Optional arguments passed to the command |

75 

76### Command types

77 

78#### Project commands

79 

80Commands stored in your repository and shared with your team. When listed in `/help`, these commands show "(project)" after their description.

81 

82**Location**: `.claude/commands/`

83 

84The following example creates the `/optimize` command:

85 

86```bash theme={null}

87# Create a project command

88mkdir -p .claude/commands

89echo "Analyze this code for performance issues and suggest optimizations:" > .claude/commands/optimize.md

90```

91 

92#### Personal commands

93 

94Commands available across all your projects. When listed in `/help`, these commands show "(user)" after their description.

95 

96**Location**: `~/.claude/commands/`

97 

98The following example creates the `/security-review` command:

99 

100```bash theme={null}

101# Create a personal command

102mkdir -p ~/.claude/commands

103echo "Review this code for security vulnerabilities:" > ~/.claude/commands/security-review.md

104```

105 

106### Features

107 

108#### Namespacing

109 

110Use subdirectories to group related commands. Subdirectories appear in the command description but don't affect the command name.

111 

112For example:

113 

114* `.claude/commands/frontend/component.md` creates `/component` with description "(project:frontend)"

115* `~/.claude/commands/component.md` creates `/component` with description "(user)"

116 

117If a project command and user command share the same name, the project command takes precedence and the user command is silently ignored. For example, if both `.claude/commands/deploy.md` and `~/.claude/commands/deploy.md` exist, `/deploy` runs the project version.

118 

119Commands in different subdirectories can share names since the subdirectory appears in the description to distinguish them. For example, `.claude/commands/frontend/test.md` and `.claude/commands/backend/test.md` both create `/test`, but show as "(project:frontend)" and "(project:backend)" respectively.

120 

121#### Arguments

122 

123Pass dynamic values to commands using argument placeholders:

124 

125##### All arguments with `$ARGUMENTS`

126 

127The `$ARGUMENTS` placeholder captures all arguments passed to the command:

128 

129```bash theme={null}

130# Command definition

131echo 'Fix issue #$ARGUMENTS following our coding standards' > .claude/commands/fix-issue.md

132 

133# Usage

134> /fix-issue 123 high-priority

135# $ARGUMENTS becomes: "123 high-priority"

136```

137 

138##### Individual arguments with `$1`, `$2`, etc.

139 

140Access specific arguments individually using positional parameters (similar to shell scripts):

141 

142```bash theme={null}

143# Command definition

144echo 'Review PR #$1 with priority $2 and assign to $3' > .claude/commands/review-pr.md

145 

146# Usage

147> /review-pr 456 high alice

148# $1 becomes "456", $2 becomes "high", $3 becomes "alice"

149```

150 

151Use positional arguments when you need to:

152 

153* Access arguments individually in different parts of your command

154* Provide defaults for missing arguments

155* Build more structured commands with specific parameter roles

156 

157#### Bash command execution

158 

159Execute bash commands before the slash command runs using the `!` prefix. The output is included in the command context. You *must* include `allowed-tools` with the `Bash` tool, but you can choose the specific bash commands to allow.

160 

161For example:

162 

163```markdown theme={null}

164allowed-tools: Bash(git add:*), Bash(git status:*), Bash(git commit:*)

165description: Create a git commit

166 

167## Context

168 

169- Current git status: !`git status`

170- Current git diff (staged and unstaged changes): !`git diff HEAD`

171- Current branch: !`git branch --show-current`

172- Recent commits: !`git log --oneline -10`

173 

174## Your task

175 

176Based on the above changes, create a single git commit.

177```

178 

179#### File references

180 

181Include file contents in commands using the `@` prefix to [reference files](/en/common-workflows#reference-files-and-directories).

182 

183For example:

184 

185```markdown theme={null}

186# Reference a specific file

187 

188Review the implementation in @src/utils/helpers.js

189 

190# Reference multiple files

191 

192Compare @src/old-version.js with @src/new-version.js

193```

194 

195#### Thinking mode

196 

197Slash commands can trigger extended thinking by including [extended thinking keywords](/en/common-workflows#use-extended-thinking).

198 

199### Frontmatter

200 

201Command files support frontmatter, useful for specifying metadata about the command:

202 

203| Frontmatter | Purpose | Default |

204| :------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :---------------------------------- |

205| `allowed-tools` | List of tools the command can use | Inherits from the conversation |

206| `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 |

207| `context` | Set to `fork` to run the command in a forked sub-agent context with its own conversation history. | Inline (no fork) |

208| `agent` | Specify which [agent type](/en/sub-agents#built-in-subagents) to use when `context: fork` is set. Only applicable when combined with `context: fork`. | `general-purpose` |

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

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

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 |

213 

214For example:

215 

216```markdown theme={null}

217allowed-tools: Bash(git add:*), Bash(git status:*), Bash(git commit:*)

218argument-hint: [message]

219description: Create a git commit

220model: claude-3-5-haiku-20241022

221 

222Create a git commit with message: $ARGUMENTS

223```

224 

225Example using positional arguments:

226 

227```markdown theme={null}

228argument-hint: [pr-number] [priority] [assignee]

229description: Review pull request

230 

231Review PR #$1 with priority $2 and assign to $3.

232Focus on security, performance, and code style.

233```

234 

235#### Define hooks for commands

236 

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

238 

239```markdown theme={null}

240description: Deploy to staging with validation

241hooks:

242 PreToolUse:

243 - matcher: "Bash"

244 hooks:

245 - type: command

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

247 once: true

248 

249Deploy the current branch to staging environment.

250```

251 

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

253 

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

255 

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

257 

258## Plugin commands

259 

260[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).

261 

262### How plugin commands work

263 

264Plugin commands are:

265 

266* **Namespaced**: Commands can use the format `/plugin-name:command-name` to avoid conflicts (plugin prefix is optional unless there are name collisions)

267* **Automatically available**: Once a plugin is installed and enabled, its commands appear in `/help`

268* **Fully integrated**: Support all command features (arguments, frontmatter, bash execution, file references)

269 

270### Plugin command structure

271 

272**Location**: `commands/` directory in plugin root

273 

274**File format**: Markdown files with frontmatter

275 

276**Basic command structure**:

277 

278```markdown theme={null}

279description: Brief description of what the command does

280 

281# Command Name

282 

283Detailed instructions for Claude on how to execute this command.

284Include specific guidance on parameters, expected outcomes, and any special considerations.

285```

286 

287**Advanced command features**:

288 

289* **Arguments**: Use placeholders like `{arg1}` in command descriptions

290* **Subdirectories**: Organize commands in subdirectories for namespacing

291* **Bash integration**: Commands can execute shell scripts and programs

292* **File references**: Commands can reference and modify project files

293 

294### Invocation patterns

295 

296```shell Direct command (when no conflicts) theme={null}

297/command-name

298```

299 

300```shell Plugin-prefixed (when needed for disambiguation) theme={null}

301/plugin-name:command-name

302```

303 

304```shell With arguments (if command supports them) theme={null}

305/command-name arg1 arg2

306```

307 

308## MCP slash commands

309 

310MCP servers can expose prompts as slash commands that become available in Claude Code. These commands are dynamically discovered from connected MCP servers.

311 

312### Command format

313 

314MCP commands follow the pattern:

315 

316```

317/mcp__<server-name>__<prompt-name> [arguments]

318```

319 

320### Features

321 

322#### Dynamic discovery

323 

324MCP commands are automatically available when:

325 

326* An MCP server is connected and active

327* The server exposes prompts through the MCP protocol

328* The prompts are successfully retrieved during connection

329 

330#### Arguments

331 

332MCP prompts can accept arguments defined by the server:

333 

334```

335# Without arguments

336> /mcp__github__list_prs

337 

338# With arguments

339> /mcp__github__pr_review 456

340> /mcp__jira__create_issue "Bug title" high

341```

342 

343#### Naming conventions

344 

345Server and prompt names are normalized:

346 

347* Spaces and special characters become underscores

348* Names are lowercase for consistency

349 

350### Managing MCP connections

351 

352Use the `/mcp` command to:

353 

354* View all configured MCP servers

355* Check connection status

356* Authenticate with OAuth-enabled servers

357* Clear authentication tokens

358* View available tools and prompts from each server

359 

360### MCP permissions and wildcards

361 

362To approve all tools from an MCP server, use either the server name alone or wildcard syntax:

363 

364* `mcp__github` (approves all GitHub tools)

365* `mcp__github__*` (wildcard syntax, also approves all GitHub tools)

366 

367To approve specific tools, list each one explicitly:

368 

369* `mcp__github__get_issue`

370* `mcp__github__list_issues`

371 

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

373 

374## `Skill` tool

375 

376<Note>

377 In earlier versions of Claude Code, slash command invocation was provided by a separate `SlashCommand` tool. This has been merged into the `Skill` tool.

378</Note>

379 

380The `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.

381 

382### What the `Skill` tool can invoke

383 

384The `Skill` tool provides access to:

385 

386| Type | Location | Requirements |

387| :-------------------- | :------------------------------------------- | :--------------------------------------------- |

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

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

390 

391Built-in commands like `/compact` and `/init` are *not* available through this tool.

392 

393### Encourage Claude to use specific commands

394 

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

396 

397```

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

399```

400 

401This tool puts each available command's metadata into context up to the character budget limit. Use `/context` to monitor token usage.

402 

403To see which commands and Skills are available to the `Skill` tool, run `claude --debug` and trigger a query.

404 

405### Disable the `Skill` tool

406 

407To prevent Claude from programmatically invoking any commands or Skills:

408 

409```bash theme={null}

410/permissions

411# Add to deny rules: Skill

412```

413 

414This removes the `Skill` tool and all command/Skill descriptions from context.

415 

416### Disable specific commands or Skills

417 

418To 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.

419 

420<Note>

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

422</Note>

423 

424### `Skill` permission rules

425 

426The permission rules support:

427 

428* **Exact match**: `Skill(commit)` (allows only `commit` with no arguments)

429* **Prefix match**: `Skill(review-pr:*)` (allows `review-pr` with any arguments)

430 

431### Character budget limit

432 

433The `Skill` tool includes a character budget to limit context usage. This prevents token overflow when many commands and Skills are available.

434 

435The budget includes each item's name, arguments, and description.

436 

437* **Default limit**: 15,000 characters

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

439 

440When the budget is exceeded, Claude sees only a subset of available items. In `/context`, a warning shows how many are included.

441 

442## Skills vs slash commands

443 

444**Slash commands** and **Agent Skills** serve different purposes in Claude Code:

445 

446### Use slash commands for

447 

448**Quick, frequently used prompts**:

449 

450* Simple prompt snippets you use often

451* Quick reminders or templates

452* Frequently used instructions that fit in one file

453 

454**Examples**:

455 

456* `/review` → "Review this code for bugs and suggest improvements"

457* `/explain` → "Explain this code in simple terms"

458* `/optimize` → "Analyze this code for performance issues"

459 

460### Use Skills for

461 

462**Comprehensive capabilities with structure**:

463 

464* Complex workflows with multiple steps

465* Capabilities requiring scripts or utilities

466* Knowledge organized across multiple files

467* Team workflows you want to standardize

468 

469**Examples**:

470 

471* PDF processing Skill with form-filling scripts and validation

472* Data analysis Skill with reference docs for different data types

473* Documentation Skill with style guides and templates

474 

475### Key differences

476 

477| Aspect | Slash Commands | Agent Skills |

478| -------------- | -------------------------------- | ----------------------------------- |

479| **Complexity** | Simple prompts | Complex capabilities |

480| **Structure** | Single .md file | Directory with SKILL.md + resources |

481| **Discovery** | Explicit invocation (`/command`) | Automatic (based on context) |

482| **Files** | One file only | Multiple files, scripts, templates |

483| **Scope** | Project or personal | Project or personal |

484| **Sharing** | Via git | Via git |

485 

486### Example comparison

487 

488**As a slash command**:

489 

490```markdown theme={null}

491# .claude/commands/review.md

492Review this code for:

493- Security vulnerabilities

494- Performance issues

495- Code style violations

496```

497 

498Usage: `/review` (manual invocation)

499 

500**As a Skill**:

501 

502```

503.claude/skills/code-review/

504├── SKILL.md (overview and workflows)

505├── SECURITY.md (security checklist)

506├── PERFORMANCE.md (performance patterns)

507├── STYLE.md (style guide reference)

508└── scripts/

509 └── run-linters.sh

510```

511 

512Usage: "Can you review this code?" (automatic discovery)

513 

514The Skill provides richer context, validation scripts, and organized reference material.

515 

516### When to use each

517 

518**Use slash commands**:

519 

520* You invoke the same prompt repeatedly

521* The prompt fits in a single file

522* You want explicit control over when it runs

523 

524**Use Skills**:

525 

526* Claude should discover the capability automatically

527* Multiple files or scripts are needed

528* Complex workflows with validation steps

529* Team needs standardized, detailed guidance

530 

531Both slash commands and Skills can coexist. Use the approach that fits your needs.

532 

533Learn more about [Agent Skills](/en/skills).

534 

535## See also

536 

537* [Plugins](/en/plugins) - Extend Claude Code with custom commands through plugins

538* [Identity and Access Management](/en/iam) - Complete guide to permissions, including MCP tool permissions

539* [Interactive mode](/en/interactive-mode) - Shortcuts, input modes, and interactive features

540* [CLI reference](/en/cli-reference) - Command-line flags and options

541* [Settings](/en/settings) - Configuration options

542* [Memory management](/en/memory) - Managing Claude's memory across sessions

543 

544 

545 

546> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt

sub-agents.md +25 −5

Details

68 68 

69## Quickstart: create your first subagent69## Quickstart: create your first subagent

70 70 

71Subagents are defined in Markdown files with YAML frontmatter. You can [create them manually](#write-subagent-files) or use the `/agents` slash command.71Subagents are defined in Markdown files with YAML frontmatter. You can [create them manually](#write-subagent-files) or use the `/agents` command.

72 72 

73This walkthrough guides you through creating a user-level subagent with the `/agent` command. The subagent reviews code and suggests improvements for the codebase.73This walkthrough guides you through creating a user-level subagent with the `/agent` command. The subagent reviews code and suggests improvements for the codebase.

74 74 


252 252 

253If the parent uses `bypassPermissions`, this takes precedence and cannot be overridden.253If the parent uses `bypassPermissions`, this takes precedence and cannot be overridden.

254 254 

255#### Preload skills into subagents

256 

257Use the `skills` field to inject skill content into a subagent's context at startup. This gives the subagent domain knowledge without requiring it to discover and load skills during execution.

258 

259```yaml theme={null}

260---

261name: api-developer

262description: Implement API endpoints following team conventions

263skills:

264 - api-conventions

265 - error-handling-patterns

266---

267 

268Implement API endpoints. Follow the conventions and patterns from the preloaded skills.

269```

270 

271The full content of each skill is injected into the subagent's context, not just made available for invocation. Subagents don't inherit skills from the parent conversation; you must list them explicitly.

272 

273<Note>

274 This is the inverse of [running a skill in a subagent](/en/skills#run-skills-in-a-subagent). With `skills` in a subagent, the subagent controls the system prompt and loads skill content. With `context: fork` in a skill, the skill content is injected into the agent you specify. Both use the same underlying system.

275</Note>

276 

255#### Conditional rules with hooks277#### Conditional rules with hooks

256 278 

257For more dynamic control over tool usage, use `PreToolUse` hooks to validate operations before they execute. This is useful when you need to allow some operations of a tool while blocking others.279For more dynamic control over tool usage, use `PreToolUse` hooks to validate operations before they execute. This is useful when you need to allow some operations of a tool while blocking others.


290exit 0312exit 0

291```313```

292 314 

293See [Hook input](/en/hooks#pretooluse-input) for the complete input schema and [exit codes](/en/hooks#exit-codes) for how exit codes affect behavior.315See [Hook input](/en/hooks#pretooluse-input) for the complete input schema and [exit codes](/en/hooks#simple-exit-code) for how exit codes affect behavior.

294 316 

295#### Disable specific subagents317#### Disable specific subagents

296 318 


489 511 

490You can also ask Claude for the agent ID if you want to reference it explicitly, or find IDs in the transcript files at `~/.claude/projects/{project}/{sessionId}/subagents/`. Each transcript is stored as `agent-{agentId}.jsonl`.512You can also ask Claude for the agent ID if you want to reference it explicitly, or find IDs in the transcript files at `~/.claude/projects/{project}/{sessionId}/subagents/`. Each transcript is stored as `agent-{agentId}.jsonl`.

491 513 

492For programmatic usage, see [Subagents in the Agent SDK](/en/agent-sdk/subagents).

493 

494Subagent transcripts persist independently of the main conversation:514Subagent transcripts persist independently of the main conversation:

495 515 

496* **Main conversation compaction**: When the main conversation compacts, subagent transcripts are unaffected. They're stored in separate files.516* **Main conversation compaction**: When the main conversation compacts, subagent transcripts are unaffected. They're stored in separate files.


700chmod +x ./scripts/validate-readonly-query.sh720chmod +x ./scripts/validate-readonly-query.sh

701```721```

702 722 

703The hook receives JSON via stdin with the Bash command in `tool_input.command`. Exit code 2 blocks the operation and feeds the error message back to Claude. See [Hooks](/en/hooks#exit-codes) for details on exit codes and [Hook input](/en/hooks#pretooluse-input) for the complete input schema.723The hook receives JSON via stdin with the Bash command in `tool_input.command`. Exit code 2 blocks the operation and feeds the error message back to Claude. See [Hooks](/en/hooks#simple-exit-code) for details on exit codes and [Hook input](/en/hooks#pretooluse-input) for the complete input schema.

704 724 

705## Next steps725## Next steps

706 726 

Details

223 223 

224### Search and discovery issues224### Search and discovery issues

225 225 

226If Search tool, `@file` mentions, custom agents, and custom slash commands aren't working, install system `ripgrep`:226If Search tool, `@file` mentions, custom agents, and custom skills aren't working, install system `ripgrep`:

227 227 

228```bash theme={null}228```bash theme={null}

229# macOS (Homebrew) 229# macOS (Homebrew)

vs-code.md +166 −79

Details

13* VS Code 1.98.0 or higher13* VS Code 1.98.0 or higher

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

15 15 

16You don't need to install the Claude Code CLI first. However, some features like MCP server configuration require the CLI. See [VS Code extension vs. Claude Code CLI](#vs-code-extension-vs-claude-code-cli) for details.16<Tip>

17 The extension includes the CLI (command-line interface), which you can access from VS Code's integrated terminal for advanced features. See [VS Code extension vs. Claude Code CLI](#vs-code-extension-vs-claude-code-cli) for details.

18</Tip>

17 19 

18## Install the extension20## Install the extension

19 21 


24 26 

25Or in VS Code, press `Cmd+Shift+X` (Mac) or `Ctrl+Shift+X` (Windows/Linux) to open the Extensions view, search for "Claude Code", and click **Install**.27Or in VS Code, press `Cmd+Shift+X` (Mac) or `Ctrl+Shift+X` (Windows/Linux) to open the Extensions view, search for "Claude Code", and click **Install**.

26 28 

27<Note>You may need to restart VS Code or run "Developer: Reload Window" from the Command Palette after installation.</Note>29<Note>If the extension doesn't appear after installation, restart VS Code or run "Developer: Reload Window" from the Command Palette.</Note>

28 30 

29## Get started31## Get started

30 32 


49 <Step title="Send a prompt">51 <Step title="Send a prompt">

50 Ask Claude to help with your code or files, whether that's explaining how something works, debugging an issue, or making changes.52 Ask Claude to help with your code or files, whether that's explaining how something works, debugging an issue, or making changes.

51 53 

52 <Tip>Select text in the editor and press `Alt+K` to insert an @-mention with the file path and line numbers directly into your prompt.</Tip>54 <Tip>Claude automatically sees your selected text. Press `Option+K` (Mac) / `Alt+K` (Windows/Linux) to also insert an @-mention reference (like `@file.ts#5-10`) into your prompt.</Tip>

53 55 

54 Here's an example of asking about a particular line in a file:56 Here's an example of asking about a particular line in a file:

55 57 


57 </Step>59 </Step>

58 60 

59 <Step title="Review changes">61 <Step title="Review changes">

60 When Claude wants to edit a file, it shows you a diff and asks for permission. You can accept, reject, or tell Claude what to do instead.62 When Claude wants to edit a file, it shows a side-by-side comparison of the original and proposed changes, then asks for permission. You can accept, reject, or tell Claude what to do instead.

61 63 

62 <img src="https://mintcdn.com/claude-code/FVYz38sRY-VuoGHA/images/vs-code-edits.png?fit=max&auto=format&n=FVYz38sRY-VuoGHA&q=85&s=e005f9b41c541c5c7c59c082f7c4841c" alt="VS Code showing a diff of Claude's proposed changes with a permission prompt asking whether to make the edit" data-og-width="3292" width="3292" data-og-height="1876" height="1876" data-path="images/vs-code-edits.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/claude-code/FVYz38sRY-VuoGHA/images/vs-code-edits.png?w=280&fit=max&auto=format&n=FVYz38sRY-VuoGHA&q=85&s=cb5d41b81087f79b842a56b5a3304660 280w, https://mintcdn.com/claude-code/FVYz38sRY-VuoGHA/images/vs-code-edits.png?w=560&fit=max&auto=format&n=FVYz38sRY-VuoGHA&q=85&s=90bb691960decdc06393c3c21cd62c75 560w, https://mintcdn.com/claude-code/FVYz38sRY-VuoGHA/images/vs-code-edits.png?w=840&fit=max&auto=format&n=FVYz38sRY-VuoGHA&q=85&s=9a11bf878ba619e850380904ff4f38e8 840w, https://mintcdn.com/claude-code/FVYz38sRY-VuoGHA/images/vs-code-edits.png?w=1100&fit=max&auto=format&n=FVYz38sRY-VuoGHA&q=85&s=6dddbf596b4f69ec6245bdc5eb6dd487 1100w, https://mintcdn.com/claude-code/FVYz38sRY-VuoGHA/images/vs-code-edits.png?w=1650&fit=max&auto=format&n=FVYz38sRY-VuoGHA&q=85&s=ef2713b8cbfd2cee97af817d813d64c7 1650w, https://mintcdn.com/claude-code/FVYz38sRY-VuoGHA/images/vs-code-edits.png?w=2500&fit=max&auto=format&n=FVYz38sRY-VuoGHA&q=85&s=1f7e1c52919cdfddf295f32a2ec7ae59 2500w" />64 <img src="https://mintcdn.com/claude-code/FVYz38sRY-VuoGHA/images/vs-code-edits.png?fit=max&auto=format&n=FVYz38sRY-VuoGHA&q=85&s=e005f9b41c541c5c7c59c082f7c4841c" alt="VS Code showing a diff of Claude's proposed changes with a permission prompt asking whether to make the edit" data-og-width="3292" width="3292" data-og-height="1876" height="1876" data-path="images/vs-code-edits.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/claude-code/FVYz38sRY-VuoGHA/images/vs-code-edits.png?w=280&fit=max&auto=format&n=FVYz38sRY-VuoGHA&q=85&s=cb5d41b81087f79b842a56b5a3304660 280w, https://mintcdn.com/claude-code/FVYz38sRY-VuoGHA/images/vs-code-edits.png?w=560&fit=max&auto=format&n=FVYz38sRY-VuoGHA&q=85&s=90bb691960decdc06393c3c21cd62c75 560w, https://mintcdn.com/claude-code/FVYz38sRY-VuoGHA/images/vs-code-edits.png?w=840&fit=max&auto=format&n=FVYz38sRY-VuoGHA&q=85&s=9a11bf878ba619e850380904ff4f38e8 840w, https://mintcdn.com/claude-code/FVYz38sRY-VuoGHA/images/vs-code-edits.png?w=1100&fit=max&auto=format&n=FVYz38sRY-VuoGHA&q=85&s=6dddbf596b4f69ec6245bdc5eb6dd487 1100w, https://mintcdn.com/claude-code/FVYz38sRY-VuoGHA/images/vs-code-edits.png?w=1650&fit=max&auto=format&n=FVYz38sRY-VuoGHA&q=85&s=ef2713b8cbfd2cee97af817d813d64c7 1650w, https://mintcdn.com/claude-code/FVYz38sRY-VuoGHA/images/vs-code-edits.png?w=2500&fit=max&auto=format&n=FVYz38sRY-VuoGHA&q=85&s=1f7e1c52919cdfddf295f32a2ec7ae59 2500w" />

63 </Step>65 </Step>


65 67 

66For more ideas on what you can do with Claude Code, see [Common workflows](/en/common-workflows).68For more ideas on what you can do with Claude Code, see [Common workflows](/en/common-workflows).

67 69 

70<Tip>

71 The extension includes two built-in tutorials:

72 

73 * **VS Code walkthrough**: Run "Claude Code: Open Walkthrough" from the Command Palette for a guided tour of the basics.

74 * **Interactive checklist**: Click the graduation cap icon in the Claude panel header to work through features like writing code, using Plan mode, and setting up rules.

75</Tip>

76 

77## Use the prompt box

78 

79The prompt box supports several features:

80 

81* **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`.

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

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

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

85* **Multi-line input**: Press `Shift+Enter` to add a new line without sending.

86 

87### Reference files and folders

88 

89Use @-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:

90 

91```

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

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

94```

95 

96When you select text in the editor, Claude can see your highlighted code automatically. The prompt box footer shows how many lines are selected. Press `Option+K` (Mac) / `Alt+K` (Windows/Linux) to insert an @-mention with the file path and line numbers (e.g., `@app.ts#5-10`). Click the selection indicator to toggle whether Claude can see your highlighted text - the eye-slash icon means the selection is hidden from Claude.

97 

98You can also hold `Shift` while dragging files into the prompt box to add them as attachments. Click the X on any attachment to remove it from context.

99 

100### Resume past conversations

101 

102Click the dropdown at the top of the Claude Code panel to access your conversation history. You can search by keyword or browse by time (Today, Yesterday, Last 7 days, etc.). Click any conversation to resume it with the full message history. For more on resuming sessions, see [Common workflows](/en/common-workflows#resume-previous-conversations).

103 

68## Customize your workflow104## Customize your workflow

69 105 

70Once you're up and running, you can reposition the Claude panel or switch to terminal mode.106Once you're up and running, you can reposition the Claude panel, run multiple sessions, or switch to terminal mode.

71 107 

72### Change the layout108### Choose where Claude lives

73 109 

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

75 111 

76* **Secondary sidebar** (default): The right side of the window112* **Secondary sidebar**: The right side of the window. Keeps Claude visible while you code.

77* **Primary sidebar**: The left sidebar with icons for Explorer, Search, etc.113* **Primary sidebar**: The left sidebar with icons for Explorer, Search, etc.

78* **Editor area**: Opens Claude as a tab alongside your files114* **Editor area**: Opens Claude as a tab alongside your files. Useful for side tasks.

79 115 

80<Note>116<Tip>

81 The Spark icon only appears in the Activity Bar (left sidebar icons) when the Claude panel is docked to the left. Since Claude defaults to the right side, use the Editor Toolbar icon to open Claude.117 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.

82</Note>118</Tip>

119 

120### Run multiple conversations

121 

122Use **Open in New Tab** or **Open in New Window** from the Command Palette to start additional conversations. Each conversation maintains its own history and context, allowing you to work on different tasks in parallel.

123 

124When using tabs, a small colored dot on the spark icon indicates status: blue means a permission request is pending, orange means Claude finished while the tab was hidden.

83 125 

84### Switch to terminal mode126### Switch to terminal mode

85 127 


89 131 

90## VS Code commands and shortcuts132## VS Code commands and shortcuts

91 133 

92Open the Command Palette (`Cmd+Shift+P` on Mac or `Ctrl+Shift+P` on Windows/Linux) and type "Claude Code" to see all available VS Code commands for the Claude Code extension:134Open the Command Palette (`Cmd+Shift+P` on Mac or `Ctrl+Shift+P` on Windows/Linux) and type "Claude Code" to see all available VS Code commands for the Claude Code extension.

135 

136Some shortcuts depend on which panel is "focused" (receiving keyboard input). When your cursor is in a code file, the editor is focused. When your cursor is in Claude's prompt box, Claude is focused. Use `Cmd+Esc` / `Ctrl+Esc` to toggle between them.

93 137 

94<Note>138<Note>

95 These are VS Code commands for controlling the extension. For Claude Code slash commands (like `/help` or `/compact`), not all CLI commands are available in the extension yet. See [VS Code extension vs. Claude Code CLI](#vs-code-extension-vs-claude-code-cli) for details.139 These are VS Code commands for controlling the extension. Not all built-in Claude Code commands are available in the extension. See [VS Code extension vs. Claude Code CLI](#vs-code-extension-vs-claude-code-cli) for details.

96</Note>140</Note>

97 141 

98| Command | Shortcut | Description |142| Command | Shortcut | Description |

99| -------------------------- | -------------------------------------------------------- | ---------------------------------------------------------------------------------- |143| -------------------------- | -------------------------------------------------------- | ------------------------------------------------------------------------------------ |

100| Focus Input | `Cmd+Esc` (Mac) / `Ctrl+Esc` (Windows/Linux) | Toggle focus between editor and Claude |144| Focus Input | `Cmd+Esc` (Mac) / `Ctrl+Esc` (Windows/Linux) | Toggle focus between editor and Claude |

101| Open in Side Bar | | Open Claude in the left sidebar |145| Open in Side Bar | - | Open Claude in the left sidebar |

102| Open in Terminal | | Open Claude in terminal mode |146| Open in Terminal | - | Open Claude in terminal mode |

103| Open in New Tab | `Cmd+Shift+Esc` (Mac) / `Ctrl+Shift+Esc` (Windows/Linux) | Open a new conversation as an editor tab |147| Open in New Tab | `Cmd+Shift+Esc` (Mac) / `Ctrl+Shift+Esc` (Windows/Linux) | Open a new conversation as an editor tab |

104| Open in New Window | | Open a new conversation in a separate window |148| Open in New Window | - | Open a new conversation in a separate window |

105| New Conversation | `Cmd+N` (Mac) / `Ctrl+N` (Windows/Linux) | Start a new conversation (when Claude is focused) |149| New Conversation | `Cmd+N` (Mac) / `Ctrl+N` (Windows/Linux) | Start a new conversation (requires Claude to be focused) |

106| Insert @-Mention Reference | `Alt+K` | Insert a reference to the current file (includes line numbers if text is selected) |150| Insert @-Mention Reference | `Option+K` (Mac) / `Alt+K` (Windows/Linux) | Insert a reference to the current file and selection (requires editor to be focused) |

107| Show Logs | | View extension debug logs |151| Show Logs | - | View extension debug logs |

108| Logout | | Sign out of your Anthropic account |152| Logout | - | Sign out of your Anthropic account |

109 

110Use **Open in New Tab** or **Open in New Window** to run multiple conversations simultaneously. Each tab or window maintains its own conversation history and context.

111 153 

112## Configure settings154## Configure settings

113 155 

114The extension has two types of settings:156The extension has two types of settings:

115 157 

116* **Extension settings**: Open with `Cmd+,` (Mac) or `Ctrl+,` (Windows/Linux), then go to Extensions → Claude Code.158* **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.

117 159* **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.

118 | Setting | Description |160 

119 | ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |161### Extension settings

120 | Selected Model | Default model for new conversations. Change per-session with `/model`. |162 

121 | Use Terminal | Launch Claude in terminal mode instead of graphical panel |163| Setting | Default | Description |

122 | Initial Permission Mode | Controls approval prompts for file edits and commands. Defaults to `default` (ask before each action). |164| --------------------------------- | --------- | ----------------------------------------------------------------------------------------------------- |

123 | Preferred Location | Default location: sidebar (right) or panel (new tab) |165| `selectedModel` | `default` | Model for new conversations. Change per-session with `/model`. |

124 | Autosave | Auto-save files before Claude reads or writes them |166| `useTerminal` | `false` | Launch Claude in terminal mode instead of graphical panel |

125 | Use Ctrl+Enter to Send | Use Ctrl/Cmd+Enter instead of Enter to send prompts |167| `initialPermissionMode` | `default` | Controls approval prompts: `default` (ask each time), `plan`, `acceptEdits`, or `bypassPermissions` |

126 | Enable New Conversation Shortcut | Enable Cmd/Ctrl+N to start a new conversation |168| `preferredLocation` | `panel` | Where Claude opens: `sidebar` (right) or `panel` (new tab) |

127 | Respect Git Ignore | Exclude .gitignore patterns from file searches |169| `autosave` | `true` | Auto-save files before Claude reads or writes them |

128 | Environment Variables | Set environment variables for the Claude process. **Not recommended**—use [Claude Code settings](/en/settings) instead so configuration is shared between extension and CLI. |170| `useCtrlEnterToSend` | `false` | Use Ctrl/Cmd+Enter instead of Enter to send prompts |

129 | Disable Login Prompt | Skip authentication prompts (for third-party provider setups) |171| `enableNewConversationShortcut` | `true` | Enable Cmd/Ctrl+N to start a new conversation |

130 | Allow Dangerously Skip Permissions | Bypass all permission prompts. **Use with extreme caution**—recommended only for isolated sandboxes with no internet access. |172| `hideOnboarding` | `false` | Hide the onboarding checklist (graduation cap icon) |

131 | Claude Process Wrapper | Executable path used to launch the Claude process |173| `respectGitIgnore` | `true` | Exclude .gitignore patterns from file searches |

132 174| `environmentVariables` | `[]` | Set environment variables for the Claude process. Use Claude Code settings instead for shared config. |

133* **Claude Code settings** (`~/.claude/settings.json`): These settings are shared between the VS Code extension and the CLI. Use this file for allowed commands and directories, environment variables, hooks, and MCP servers. See the [settings documentation](/en/settings) for details.175| `disableLoginPrompt` | `false` | Skip authentication prompts (for third-party provider setups) |

176| `allowDangerouslySkipPermissions` | `false` | Bypass all permission prompts. **Use with extreme caution.** |

177| `claudeProcessWrapper` | - | Executable path used to launch the Claude process |

178 

179## VS Code extension vs. Claude Code CLI

180 

181Claude Code is available as both a VS Code extension (graphical panel) and a CLI (command-line interface in the terminal). Some features are only available in the CLI. If you need a CLI-only feature, run `claude` in VS Code's integrated terminal.

182 

183| Feature | CLI | VS Code Extension |

184| ------------------- | --------------------------------------------- | ---------------------------------------- |

185| Commands and skills | [All](/en/interactive-mode#built-in-commands) | Subset (type `/` to see available) |

186| MCP server config | Yes | No (configure via CLI, use in extension) |

187| Checkpoints | Yes | Coming soon |

188| `!` bash shortcut | Yes | No |

189| Tab completion | Yes | No |

190 

191### Run CLI in VS Code

192 

193To use the CLI while staying in VS Code, open the integrated terminal (`` Ctrl+` `` on Windows/Linux or `` Cmd+` `` on Mac) and run `claude`. The CLI automatically integrates with your IDE for features like diff viewing and diagnostic sharing.

194 

195If using an external terminal, run `/ide` inside Claude Code to connect it to VS Code.

196 

197### Switch between extension and CLI

198 

199The extension and CLI share the same conversation history. To continue an extension conversation in the CLI, run `claude --resume` in the terminal. This opens an interactive picker where you can search for and select your conversation.

200 

201### Include terminal output in prompts

202 

203Reference terminal output in your prompts using `@terminal:name` where `name` is the terminal's title. This lets Claude see command output, error messages, or logs without copy-pasting.

204 

205### Monitor background processes

206 

207When Claude runs long-running commands, the extension shows progress in the status bar. However, visibility for background tasks is limited compared to the CLI. For better visibility, have Claude output the command so you can run it in VS Code's integrated terminal.

208 

209### Connect to external tools with MCP

210 

211MCP (Model Context Protocol) servers give Claude access to external tools, databases, and APIs. Configure them via CLI, then use them in both extension and CLI.

212 

213To add an MCP server, open the integrated terminal (`` Ctrl+` `` or `` Cmd+` ``) and run:

214 

215```bash theme={null}

216claude mcp add --transport http github https://api.githubcopilot.com/mcp/

217```

218 

219Once configured, ask Claude to use the tools (e.g., "Review PR #456"). Some servers require authentication: run `claude` in the terminal, then type `/mcp` to authenticate. See the [MCP documentation](/en/mcp) for available servers.

220 

221## Work with git

222 

223Claude Code integrates with git to help with version control workflows directly in VS Code. Ask Claude to commit changes, create pull requests, or work across branches.

224 

225### Create commits and pull requests

226 

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

228 

229```

230> commit my changes with a descriptive message

231> create a pr for this feature

232> summarize the changes I've made to the auth module

233```

234 

235When creating pull requests, Claude generates descriptions based on the actual code changes and can add context about testing or implementation decisions.

236 

237### Use git worktrees for parallel tasks

238 

239Git worktrees allow multiple Claude Code sessions to work on separate branches simultaneously, each with isolated files:

240 

241```bash theme={null}

242# Create a worktree for a new feature

243git worktree add ../project-feature-a -b feature-a

244 

245# Run Claude Code in each worktree

246cd ../project-feature-a && claude

247```

248 

249Each worktree maintains independent file state while sharing git history. This prevents Claude instances from interfering with each other when working on different tasks.

250 

251For detailed git workflows including PR reviews and branch management, see [Common workflows](/en/common-workflows#create-pull-requests).

134 252 

135## Use third-party providers253## Use third-party providers

136 254 


154 </Step>272 </Step>

155</Steps>273</Steps>

156 274 

157## VS Code extension vs. Claude Code CLI275## Security and privacy

158 276 

159The extension doesn't yet have full feature parity with the CLI. If you need CLI-only features, you can run `claude` directly in VS Code's integrated terminal.277Your code stays private. Claude Code processes your code to provide assistance but does not use it to train models. For details on data handling and how to opt out of logging, see [Data and privacy](/en/data-usage).

160 278 

161| Feature | CLI | VS Code Extension |279With auto-edit permissions enabled, Claude Code can modify VS Code configuration files (like `settings.json` or `tasks.json`) that VS Code may execute automatically. To reduce risk when working with untrusted code:

162| ----------------- | ------------------------------ | ---------------------------------------- |

163| Slash commands | [Full set](/en/slash-commands) | Subset (type `/` to see available) |

164| MCP server config | Yes | No (configure via CLI, use in extension) |

165| Checkpoints | Yes | Coming soon |

166| `!` bash shortcut | Yes | No |

167| Tab completion | Yes | No |

168 

169### Run CLI in VS Code

170 

171To use the CLI while staying in VS Code, open the integrated terminal (`` Ctrl+` `` on Windows/Linux or `` Cmd+` `` on Mac) and run `claude`. The CLI automatically integrates with your IDE for features like diff viewing and diagnostic sharing.

172 

173If using an external terminal, run `/ide` inside Claude Code to connect it to VS Code.

174 

175### Switch between extension and CLI

176 

177The extension and CLI share the same conversation history. To continue an extension conversation in the CLI, run `claude --resume` in the terminal. This opens an interactive picker where you can search for and select your conversation.

178 

179## Security considerations

180 

181With auto-edit permissions enabled, Claude Code can modify VS Code configuration files (like `settings.json` or `tasks.json`) that VS Code may execute automatically. This could potentially bypass Claude Code's normal permission prompts.

182 

183To reduce risk when working with untrusted code:

184 280 

185* Enable [VS Code Restricted Mode](https://code.visualstudio.com/docs/editor/workspace-trust#_restricted-mode) for untrusted workspaces281* Enable [VS Code Restricted Mode](https://code.visualstudio.com/docs/editor/workspace-trust#_restricted-mode) for untrusted workspaces

186* Use manual approval mode instead of auto-accept for edits282* Use manual approval mode instead of auto-accept for edits


192 288 

193* Ensure you have a compatible version of VS Code (1.98.0 or later)289* Ensure you have a compatible version of VS Code (1.98.0 or later)

194* Check that VS Code has permission to install extensions290* Check that VS Code has permission to install extensions

195* Try installing directly from the Marketplace website291* Try installing directly from the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=anthropic.claude-code)

196 292 

197### Spark icon not visible293### Spark icon not visible

198 294 

199The Spark icon appears in the **Editor Toolbar** (top-right of editor) when you have a file open. If you don't see it:295The Spark icon appears in the **Editor Toolbar** (top-right of editor) when you have a file open. If you don't see it:

200 296 

2011. **Open a file**: The icon requires a file to be open—having just a folder open isn't enough2971. **Open a file**: The icon requires a file to be open. Having just a folder open isn't enough.

2022. **Check VS Code version**: Requires 1.98.0 or higher (Help → About)2982. **Check VS Code version**: Requires 1.98.0 or higher (Help → About)

2033. **Restart VS Code**: Run "Developer: Reload Window" from the Command Palette2993. **Restart VS Code**: Run "Developer: Reload Window" from the Command Palette

2044. **Disable conflicting extensions**: Temporarily disable other AI extensions (Cline, Continue, etc.)3004. **Disable conflicting extensions**: Temporarily disable other AI extensions (Cline, Continue, etc.)

2055. **Check workspace trust**: The extension doesn't work in Restricted Mode3015. **Check workspace trust**: The extension doesn't work in Restricted Mode

206 302 

207Alternatively, click "✱ Claude Code" in the **Status Bar** (bottom-right corner)—this works even without a file open. You can also use the **Command Palette** (`Cmd+Shift+P` / `Ctrl+Shift+P`) and type "Claude Code".303Alternatively, click "✱ Claude Code" in the **Status Bar** (bottom-right corner). This works even without a file open. You can also use the **Command Palette** (`Cmd+Shift+P` / `Ctrl+Shift+P`) and type "Claude Code".

208 304 

209### Claude Code never responds305### Claude Code never responds

210 306 


2131. **Check your internet connection**: Ensure you have a stable internet connection3091. **Check your internet connection**: Ensure you have a stable internet connection

2142. **Start a new conversation**: Try starting a fresh conversation to see if the issue persists3102. **Start a new conversation**: Try starting a fresh conversation to see if the issue persists

2153. **Try the CLI**: Run `claude` from the terminal to see if you get more detailed error messages3113. **Try the CLI**: Run `claude` from the terminal to see if you get more detailed error messages

2164. **File a bug report**: If the problem continues, [file an issue on GitHub](https://github.com/anthropics/claude-code/issues) with details about the error

217 

218### Standalone CLI not connecting to IDE

219 312 

220* Ensure you're running Claude Code from VS Code's integrated terminal (not an external terminal)313If problems persist, [file an issue on GitHub](https://github.com/anthropics/claude-code/issues) with details about the error.

221* Ensure the CLI for your IDE variant is installed:

222 * VS Code: `code` command should be available

223 * Cursor: `cursor` command should be available

224 * Windsurf: `windsurf` command should be available

225 * VSCodium: `codium` command should be available

226* If the command isn't available, install it from the Command Palette → "Shell Command: Install 'code' command in PATH"

227 314 

228## Uninstall the extension315## Uninstall the extension

229 316