SpyBara
Go Premium

Documentation 2026-06-19 22:58 UTC to 2026-06-22 23:59 UTC

21 files changed +1,751 −44. View all changes and history on the product overview
2026
Sat 27 01:01 Fri 26 23:00 Thu 25 23:58 Wed 24 22:02 Tue 23 22:00 Mon 22 23:59 Fri 19 22:58 Thu 18 22:00 Wed 17 17:02 Tue 16 21:57 Mon 15 23:02 Sat 13 21:59 Fri 12 22:00 Thu 11 23:01 Wed 10 23:57 Tue 9 06:34 Mon 8 06:52 Sat 6 06:24 Fri 5 06:45 Thu 4 06:52 Wed 3 06:53 Tue 2 06:51
Details

856```856```

857 857 

858* `API_TIMEOUT_MS`: per-request timeout on the Anthropic client, in milliseconds. Default `600000`. Applies to the main loop and all subagents.858* `API_TIMEOUT_MS`: per-request timeout on the Anthropic client, in milliseconds. Default `600000`. Applies to the main loop and all subagents.

859* `CLAUDE_CODE_MAX_RETRIES`: maximum API retries. Default `10`. Each retry gets its own `API_TIMEOUT_MS` window, so worst-case wall time is roughly `API_TIMEOUT_MS × (CLAUDE_CODE_MAX_RETRIES + 1)` plus backoff.859* `CLAUDE_CODE_MAX_RETRIES`: maximum API retries. Default `10`, capped at `15`. Each retry gets its own `API_TIMEOUT_MS` window, so worst-case wall time is roughly `API_TIMEOUT_MS × (CLAUDE_CODE_MAX_RETRIES + 1)` plus backoff. For unattended runs that need to wait through longer outages, set `CLAUDE_CODE_RETRY_WATCHDOG=1` to retry capacity errors indefinitely.

860* `CLAUDE_ASYNC_AGENT_STALL_TIMEOUT_MS`: stall watchdog for subagents launched with `run_in_background`. Default `600000`. Resets on each stream event; on stall it aborts the subagent, marks the task failed, and surfaces the error to the parent with any partial result. Does not apply to synchronous subagents.860* `CLAUDE_ASYNC_AGENT_STALL_TIMEOUT_MS`: stall watchdog for subagents launched with `run_in_background`. Default `600000`. Resets on each stream event; on stall it aborts the subagent, marks the task failed, and surfaces the error to the parent with any partial result. Does not apply to synchronous subagents.

861* `CLAUDE_ENABLE_STREAM_WATCHDOG=1` with `CLAUDE_STREAM_IDLE_TIMEOUT_MS`: aborts the request when headers have arrived but the response body stops streaming. When `CLAUDE_ENABLE_STREAM_WATCHDOG` is unset, the default is server-controlled on the direct Anthropic API and off on other providers. `CLAUDE_STREAM_IDLE_TIMEOUT_MS` defaults to `300000` and is clamped to that minimum. The aborted request goes through the normal retry path.861* `CLAUDE_ENABLE_STREAM_WATCHDOG=1` with `CLAUDE_STREAM_IDLE_TIMEOUT_MS`: aborts the request when headers have arrived but the response body stops streaming. When `CLAUDE_ENABLE_STREAM_WATCHDOG` is unset, the default is server-controlled on the direct Anthropic API and off on other providers. `CLAUDE_STREAM_IDLE_TIMEOUT_MS` defaults to `300000` and is clamped to that minimum. The aborted request goes through the normal retry path.

862 862 

Details

479```479```

480 480 

481* `API_TIMEOUT_MS`: per-request timeout on the Anthropic client, in milliseconds. Default `600000`. Applies to the main loop and all subagents.481* `API_TIMEOUT_MS`: per-request timeout on the Anthropic client, in milliseconds. Default `600000`. Applies to the main loop and all subagents.

482* `CLAUDE_CODE_MAX_RETRIES`: maximum API retries. Default `10`. Each retry gets its own `API_TIMEOUT_MS` window, so worst-case wall time is roughly `API_TIMEOUT_MS × (CLAUDE_CODE_MAX_RETRIES + 1)` plus backoff.482* `CLAUDE_CODE_MAX_RETRIES`: maximum API retries. Default `10`, capped at `15`. Each retry gets its own `API_TIMEOUT_MS` window, so worst-case wall time is roughly `API_TIMEOUT_MS × (CLAUDE_CODE_MAX_RETRIES + 1)` plus backoff. For unattended runs that need to wait through longer outages, set `CLAUDE_CODE_RETRY_WATCHDOG=1` to retry capacity errors indefinitely.

483* `CLAUDE_ASYNC_AGENT_STALL_TIMEOUT_MS`: stall watchdog for subagents launched with `run_in_background`. Default `600000`. Resets on each stream event; on stall it aborts the subagent, marks the task failed, and surfaces the error to the parent with any partial result. Does not apply to synchronous subagents.483* `CLAUDE_ASYNC_AGENT_STALL_TIMEOUT_MS`: stall watchdog for subagents launched with `run_in_background`. Default `600000`. Resets on each stream event; on stall it aborts the subagent, marks the task failed, and surfaces the error to the parent with any partial result. Does not apply to synchronous subagents.

484* `CLAUDE_ENABLE_STREAM_WATCHDOG=1` with `CLAUDE_STREAM_IDLE_TIMEOUT_MS`: aborts the request when headers have arrived but the response body stops streaming. When `CLAUDE_ENABLE_STREAM_WATCHDOG` is unset, the default is server-controlled on the direct Anthropic API and off on other providers. `CLAUDE_STREAM_IDLE_TIMEOUT_MS` defaults to `300000` and is clamped to that minimum. The aborted request goes through the normal retry path.484* `CLAUDE_ENABLE_STREAM_WATCHDOG=1` with `CLAUDE_STREAM_IDLE_TIMEOUT_MS`: aborts the request when headers have arrived but the response body stops streaming. When `CLAUDE_ENABLE_STREAM_WATCHDOG` is unset, the default is server-controlled on the direct Anthropic API and off on other providers. `CLAUDE_STREAM_IDLE_TIMEOUT_MS` defaults to `300000` and is clamped to that minimum. The aborted request goes through the normal retry path.

485 485 

agent-teams.md +5 −1

Details

107 `tmux` has known limitations on certain operating systems and traditionally works best on macOS. Using `tmux -CC` in iTerm2 is the suggested entrypoint into `tmux`.107 `tmux` has known limitations on certain operating systems and traditionally works best on macOS. Using `tmux -CC` in iTerm2 is the suggested entrypoint into `tmux`.

108</Note>108</Note>

109 109 

110The default is `"in-process"`. Before v2.1.179 the default was `"auto"`, so upgraded sessions that previously opened split panes now stay in one terminal unless you set the mode explicitly. Set `"auto"` to enable split panes when you're already running inside a tmux session or your terminal is iTerm2, falling back to in-process otherwise. The `"tmux"` setting enables split-pane mode and auto-detects whether to use tmux or iTerm2 based on your terminal. To override, set [`teammateMode`](/en/settings#available-settings) in `~/.claude/settings.json`:110The default is `"in-process"`. Before v2.1.179 the default was `"auto"`, so upgraded sessions that previously opened split panes now stay in one terminal unless you set the mode explicitly. Set `"auto"` to enable split panes when you're already running inside a tmux session or your terminal is iTerm2, falling back to in-process otherwise. The `"tmux"` setting enables split-pane mode and auto-detects whether to use tmux or iTerm2 based on your terminal.

111 

112{/* min-version: 2.1.186 */}As of v2.1.186, set `"iterm2"` to use iTerm2 native split panes explicitly. This mode requires the [`it2` CLI](https://github.com/mkusaka/it2) and shows an error with the install command if `it2` is missing. The setup prompt that offers to install `it2` or switch to tmux appears under `"auto"` or `"tmux"` when your terminal is iTerm2 and tmux is available as a fallback.

113 

114To override the default, set [`teammateMode`](/en/settings#available-settings) in `~/.claude/settings.json`:

111 115 

112```json theme={null}116```json theme={null}

113{117{

Details

6 6 

7> Configure Claude Code to use the Anthropic-operated Claude API with AWS authentication, IAM access control, and AWS Marketplace billing.7> Configure Claude Code to use the Anthropic-operated Claude API with AWS authentication, IAM access control, and AWS Marketplace billing.

8 8 

9export const ContactSalesCard = ({surface}) => {

10 const utm = content => `utm_source=claude_code&utm_medium=docs&utm_content=${surface}_${content}`;

11 const iconArrowRight = (size = 13) => <svg width={size} height={size} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">

12 <line x1="5" y1="12" x2="19" y2="12" />

13 <polyline points="12 5 19 12 12 19" />

14 </svg>;

15 const STYLES = `

16.cc-cs {

17 --cs-slate: #141413;

18 --cs-clay: #d97757;

19 --cs-clay-deep: #c6613f;

20 --cs-gray-000: #ffffff;

21 --cs-gray-700: #3d3d3a;

22 --cs-border-default: rgba(31, 30, 29, 0.15);

23 font-family: inherit;

24}

25.dark .cc-cs {

26 --cs-slate: #f0eee6;

27 --cs-gray-000: #262624;

28 --cs-gray-700: #bfbdb4;

29 --cs-border-default: rgba(240, 238, 230, 0.14);

30}

31.cc-cs-card {

32 display: flex; align-items: center; justify-content: space-between;

33 gap: 16px; padding: 14px 16px; margin: 0;

34 background: var(--cs-gray-000); border: 0.5px solid var(--cs-border-default);

35 border-radius: 8px; flex-wrap: wrap;

36}

37.cc-cs-text { font-size: 13px; color: var(--cs-gray-700); line-height: 1.5; flex: 1; min-width: 240px; }

38.cc-cs-text strong { font-weight: 550; color: var(--cs-slate); }

39.cc-cs-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

40.cc-cs-btn-clay {

41 display: inline-flex; align-items: center; gap: 8px;

42 background: var(--cs-clay-deep); color: #fff; border: none;

43 border-radius: 8px; padding: 8px 14px;

44 font-size: 13px; font-weight: 500;

45 transition: background-color 0.15s; white-space: nowrap;

46}

47.cc-cs-btn-clay:hover { background: var(--cs-clay); }

48.cc-cs-btn-ghost {

49 display: inline-flex; align-items: center; gap: 8px;

50 background: transparent; color: var(--cs-gray-700);

51 border: 0.5px solid var(--cs-border-default);

52 border-radius: 8px; padding: 8px 14px;

53 font-size: 13px; font-weight: 500;

54}

55.cc-cs-btn-ghost:hover { background: rgba(0, 0, 0, 0.04); }

56.dark .cc-cs-btn-ghost:hover { background: rgba(255, 255, 255, 0.04); }

57@media (max-width: 720px) {

58 .cc-cs-actions { width: 100%; }

59}

60`;

61 return <div className="cc-cs not-prose">

62 <style>{STYLES}</style>

63 <div className="cc-cs-card">

64 <div className="cc-cs-text">

65 <strong>Deploying Claude Code across your organization?</strong> Talk to sales about enterprise plans, SSO, and centralized billing.

66 </div>

67 <div className="cc-cs-actions">

68 <a href={`https://claude.com/pricing?${utm('view_plans')}#plans-business`} className="cc-cs-btn-ghost">

69 View plans

70 </a>

71 <a href={`https://claude.com/contact-sales?${utm('contact_sales')}`} className="cc-cs-btn-clay">

72 Contact sales {iconArrowRight()}

73 </a>

74 </div>

75 </div>

76 </div>;

77};

78 

79export const Experiment = ({flag, treatment, children}) => {

80 const VID_KEY = 'exp_vid';

81 const CONSENT_COUNTRIES = new Set(['AT', 'BE', 'BG', 'HR', 'CY', 'CZ', 'DK', 'EE', 'FI', 'FR', 'DE', 'GR', 'HU', 'IE', 'IT', 'LV', 'LT', 'LU', 'MT', 'NL', 'PL', 'PT', 'RO', 'SK', 'SI', 'ES', 'SE', 'RE', 'GP', 'MQ', 'GF', 'YT', 'BL', 'MF', 'PM', 'WF', 'PF', 'NC', 'AW', 'CW', 'SX', 'FO', 'GL', 'AX', 'GB', 'UK', 'AI', 'BM', 'IO', 'VG', 'KY', 'FK', 'GI', 'MS', 'PN', 'SH', 'TC', 'GG', 'JE', 'IM', 'CA', 'BR', 'IN']);

82 const fnv1a = s => {

83 let h = 0x811c9dc5;

84 for (let i = 0; i < s.length; i++) {

85 h ^= s.charCodeAt(i);

86 h += (h << 1) + (h << 4) + (h << 7) + (h << 8) + (h << 24);

87 }

88 return h >>> 0;

89 };

90 const bucket = (seed, vid) => fnv1a(fnv1a(seed + vid) + '') % 10000 < 5000 ? 'control' : 'treatment';

91 const [decision] = useState(() => {

92 const params = new URLSearchParams(location.search);

93 const preBucketed = document.documentElement.dataset['gb_' + flag.replace(/-/g, '_')];

94 const force = params.get('gb-force');

95 if (force) {

96 for (const p of force.split(',')) {

97 const [k, v] = p.split(':');

98 if (k === flag) return {

99 variant: v || 'treatment',

100 track: false

101 };

102 }

103 }

104 if (navigator.globalPrivacyControl) {

105 return {

106 variant: 'control',

107 track: false

108 };

109 }

110 const prefsMatch = document.cookie.match(/(?:^|; )anthropic-consent-preferences=([^;]+)/);

111 if (prefsMatch) {

112 try {

113 if (JSON.parse(decodeURIComponent(prefsMatch[1])).analytics !== true) {

114 return {

115 variant: 'control',

116 track: false

117 };

118 }

119 } catch {

120 return {

121 variant: 'control',

122 track: false

123 };

124 }

125 } else {

126 const country = params.get('country')?.toUpperCase() || (document.cookie.match(/(?:^|; )cf_geo=([A-Z]{2})/) || [])[1];

127 if (!country || CONSENT_COUNTRIES.has(country)) {

128 return {

129 variant: 'control',

130 track: false

131 };

132 }

133 }

134 let vid;

135 try {

136 const ajsMatch = document.cookie.match(/(?:^|; )ajs_anonymous_id=([^;]+)/);

137 if (ajsMatch) {

138 vid = decodeURIComponent(ajsMatch[1]).replace(/^"|"$/g, '');

139 } else {

140 vid = localStorage.getItem(VID_KEY);

141 if (!vid) {

142 vid = crypto.randomUUID();

143 }

144 document.cookie = `ajs_anonymous_id=${vid}; domain=.claude.com; path=/; Secure; SameSite=Lax; max-age=31536000`;

145 }

146 try {

147 localStorage.setItem(VID_KEY, vid);

148 } catch {}

149 } catch {

150 return {

151 variant: 'control',

152 track: false

153 };

154 }

155 const variant = preBucketed === '1' ? 'treatment' : preBucketed === '0' ? 'control' : bucket(flag, vid);

156 return {

157 variant,

158 track: true,

159 vid

160 };

161 });

162 useEffect(() => {

163 if (!decision.track) return;

164 fetch('https://api.anthropic.com/api/event_logging/v2/batch', {

165 method: 'POST',

166 headers: {

167 'Content-Type': 'application/json',

168 'x-service-name': 'claude_code_docs'

169 },

170 body: JSON.stringify({

171 events: [{

172 event_type: 'GrowthbookExperimentEvent',

173 event_data: {

174 device_id: decision.vid,

175 anonymous_id: decision.vid,

176 timestamp: new Date().toISOString(),

177 experiment_id: flag,

178 variation_id: decision.variant === 'treatment' ? 1 : 0,

179 environment: 'production'

180 }

181 }]

182 }),

183 keepalive: true

184 }).catch(() => {});

185 }, []);

186 return decision.variant === 'treatment' ? treatment : children;

187};

188 

189<Experiment flag="docs-contact-sales-cta" treatment={<ContactSalesCard surface="claude_platform_on_aws" />} />

190 

9Claude Platform on AWS is the Anthropic-operated Claude API with AWS authentication, IAM access control, and AWS Marketplace billing. Requests reach Anthropic's API directly, so you get the same models and features as the [Claude API](https://platform.claude.com/docs) on the same release schedule. You authenticate with AWS credentials or a workspace API key, and you pay through AWS Marketplace.191Claude Platform on AWS is the Anthropic-operated Claude API with AWS authentication, IAM access control, and AWS Marketplace billing. Requests reach Anthropic's API directly, so you get the same models and features as the [Claude API](https://platform.claude.com/docs) on the same release schedule. You authenticate with AWS credentials or a workspace API key, and you pay through AWS Marketplace.

10 192 

11Use this guide to point Claude Code at a workspace you've already provisioned through Claude Platform on AWS. For the AWS subscription and workspace setup that comes before this, see the [Claude Platform on AWS documentation](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws).193Use this guide to point Claude Code at a workspace you've already provisioned through Claude Platform on AWS. For the AWS subscription and workspace setup that comes before this, see the [Claude Platform on AWS documentation](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws).


50}232}

51```233```

52 234 

235With `awsAuthRefresh` configured, `/login` shows a **Claude Platform on AWS · refresh credentials** option under **Using 3rd-party platforms**. Selecting it runs the configured command and re-reads your AWS credentials without restarting Claude Code.

236 

53**Option B: Workspace API key**237**Option B: Workspace API key**

54 238 

55A workspace API key is a long-lived secret, useful when you don't want to manage federated AWS credentials. Generate one in the AWS Console under **Claude Platform on AWS → API keys** and set it as `ANTHROPIC_AWS_API_KEY`:239A workspace API key is a long-lived secret, useful when you don't want to manage federated AWS credentials. Generate one in the AWS Console under **Claude Platform on AWS → API keys** and set it as `ANTHROPIC_AWS_API_KEY`:


63Treat workspace API keys like any other production credential. The [user settings file](/en/settings) `env` block is a convenient way to scope the key to your machine without exporting it globally.247Treat workspace API keys like any other production credential. The [user settings file](/en/settings) `env` block is a convenient way to scope the key to your machine without exporting it globally.

64 248 

65<Note>249<Note>

66 The `/login` and `/logout` commands don't change Claude Platform on AWS authentication. Authentication runs through your AWS credentials or workspace API key, not through a Claude.ai subscription.250 The `/login` and `/logout` commands don't sign you into a Claude.ai subscription for Claude Platform on AWS. Authentication runs through your AWS credentials or workspace API key. The exception is the **refresh credentials** option `/login` shows when `awsAuthRefresh` is configured, which re-reads your AWS credentials as described above.

67</Note>251</Note>

68 252 

69### 2. Configure Claude Code253### 2. Configure Claude Code

Details

31| `claude daemon stop --any` | Stop the background-session [supervisor](/en/agent-view#the-supervisor-process) and the sessions it hosts. Pass `--keep-workers` to leave background sessions running so the next supervisor reconnects to them. `--any` confirms stopping an on-demand supervisor, which is the default. Use this to recover from an [unresponsive supervisor](/en/agent-view#agent-view-says-the-background-service-did-not-respond) | `claude daemon stop --any --keep-workers` |31| `claude daemon stop --any` | Stop the background-session [supervisor](/en/agent-view#the-supervisor-process) and the sessions it hosts. Pass `--keep-workers` to leave background sessions running so the next supervisor reconnects to them. `--any` confirms stopping an on-demand supervisor, which is the default. Use this to recover from an [unresponsive supervisor](/en/agent-view#agent-view-says-the-background-service-did-not-respond) | `claude daemon stop --any --keep-workers` |

32| `claude logs <id>` | Print recent output from a [background session](/en/agent-view#manage-sessions-from-the-shell) | `claude logs 7c5dcf5d` |32| `claude logs <id>` | Print recent output from a [background session](/en/agent-view#manage-sessions-from-the-shell) | `claude logs 7c5dcf5d` |

33| `claude mcp` | Configure Model Context Protocol (MCP) servers | See the [Claude Code MCP documentation](/en/mcp). |33| `claude mcp` | Configure Model Context Protocol (MCP) servers | See the [Claude Code MCP documentation](/en/mcp). |

34| `claude mcp login <name>` | {/* min-version: 2.1.186 */}Run a configured MCP server's OAuth flow without opening the interactive `/mcp` panel. Works for HTTP, SSE, and claude.ai connector servers. Add `--no-browser` over SSH to print the authorization URL instead of opening a browser, then paste the redirect URL back at the prompt. Requires Claude Code v2.1.186 or later. See [Authenticate from the command line](/en/mcp#authenticate-from-the-command-line) | `claude mcp login sentry` |

35| `claude mcp logout <name>` | {/* min-version: 2.1.186 */}Clear stored OAuth credentials for an MCP server. Requires Claude Code v2.1.186 or later | `claude mcp logout sentry` |

34| `claude plugin` | Manage Claude Code [plugins](/en/plugins). Alias: `claude plugins`. See [plugin reference](/en/plugins-reference#cli-commands-reference) for subcommands | `claude plugin install code-review@claude-plugins-official` |36| `claude plugin` | Manage Claude Code [plugins](/en/plugins). Alias: `claude plugins`. See [plugin reference](/en/plugins-reference#cli-commands-reference) for subcommands | `claude plugin install code-review@claude-plugins-official` |

35| `claude project purge [path]` | Delete all local Claude Code state for a project: transcripts, task lists, debug logs, file-edit history, prompt history lines, and the project's entry in `~/.claude.json`. Omit `[path]` to pick from an interactive list. Flags: `--dry-run` to preview, `-y`/`--yes` to skip confirmation, `-i`/`--interactive` to confirm each item, `--all` for every project. See [Clear local data](/en/claude-directory#clear-local-data) | `claude project purge ~/work/repo --dry-run` |37| `claude project purge [path]` | Delete all local Claude Code state for a project: transcripts, task lists, debug logs, file-edit history, prompt history lines, and the project's entry in `~/.claude.json`. Omit `[path]` to pick from an interactive list. Flags: `--dry-run` to preview, `-y`/`--yes` to skip confirmation, `-i`/`--interactive` to confirm each item, `--all` for every project. See [Clear local data](/en/claude-directory#clear-local-data) | `claude project purge ~/work/repo --dry-run` |

36| `claude remote-control` | Start a [Remote Control](/en/remote-control) server to control Claude Code from Claude.ai or the Claude app. Runs in server mode (no local interactive session). See [Server mode flags](/en/remote-control#start-a-remote-control-session) | `claude remote-control --name "My Project"` |38| `claude remote-control` | Start a [Remote Control](/en/remote-control) server to control Claude Code from Claude.ai or the Claude app. Runs in server mode (no local interactive session). See [Server mode flags](/en/remote-control#start-a-remote-control-session) | `claude remote-control --name "My Project"` |


111| `--system-prompt` | Replace the entire system prompt with custom text | `claude --system-prompt "You are a Python expert"` |113| `--system-prompt` | Replace the entire system prompt with custom text | `claude --system-prompt "You are a Python expert"` |

112| `--system-prompt-file` | Load system prompt from a file, replacing the default prompt | `claude --system-prompt-file ./custom-prompt.txt` |114| `--system-prompt-file` | Load system prompt from a file, replacing the default prompt | `claude --system-prompt-file ./custom-prompt.txt` |

113| `--teleport` | Resume a [web session](/en/claude-code-on-the-web) in your local terminal | `claude --teleport` |115| `--teleport` | Resume a [web session](/en/claude-code-on-the-web) in your local terminal | `claude --teleport` |

114| `--teammate-mode` | Set how [agent team](/en/agent-teams) teammates display: `in-process` (default), `auto`, or `tmux`. The default changed from `auto` in v2.1.179. Overrides the [`teammateMode`](/en/settings#available-settings) setting for this session. See [Choose a display mode](/en/agent-teams#choose-a-display-mode) | `claude --teammate-mode auto` |116| `--teammate-mode` | Set how [agent team](/en/agent-teams) teammates display: `in-process` (default), `auto`, `tmux`, or {/* min-version: 2.1.186 */}`iterm2` (added in v2.1.186). The default changed from `auto` in v2.1.179. Overrides the [`teammateMode`](/en/settings#available-settings) setting for this session. See [Choose a display mode](/en/agent-teams#choose-a-display-mode) | `claude --teammate-mode auto` |

115| `--tmux` | Create a tmux session for the worktree. Requires `--worktree`. Uses iTerm2 native panes when available; pass `--tmux=classic` for traditional tmux | `claude -w feature-auth --tmux` |117| `--tmux` | Create a tmux session for the worktree. Requires `--worktree`. Uses iTerm2 native panes when available; pass `--tmux=classic` for traditional tmux | `claude -w feature-auth --tmux` |

116| `--tools` | Restrict which built-in tools Claude can use. Use `""` to disable all, `"default"` for all, or tool names like `"Bash,Edit,Read"`. MCP tools are not affected; to deny those too, use `--disallowedTools "mcp__*"`, or pass `--strict-mcp-config` without `--mcp-config` so no MCP servers load | `claude --tools "Bash,Edit,Read"` |118| `--tools` | Restrict which built-in tools Claude can use. Use `""` to disable all, `"default"` for all, or tool names like `"Bash,Edit,Read"`. MCP tools are not affected; to deny those too, use `--disallowedTools "mcp__*"`, or pass `--strict-mcp-config` without `--mcp-config` so no MCP servers load | `claude --tools "Bash,Edit,Read"` |

117| `--verbose` | Enable verbose logging, shows full turn-by-turn output. Overrides the [`viewMode`](/en/settings#available-settings) setting for this session | `claude --verbose` |119| `--verbose` | Enable verbose logging, shows full turn-by-turn output. Overrides the [`viewMode`](/en/settings#available-settings) setting for this session | `claude --verbose` |

commands.md +2 −2

Details

22 22 

23**Running work in parallel.** `/agents` opens the manager for the [subagents](/en/sub-agents) Claude can delegate side tasks to, and `/tasks` lists what's running in the background of the current session. `/background` detaches the whole session to keep running as a [background agent](/en/agent-view) and frees your terminal. For a large change that spans the codebase, `/batch` decomposes it into independent units and runs each in its own [worktree](/en/worktrees). See [Run agents in parallel](/en/agents) for how these approaches relate.23**Running work in parallel.** `/agents` opens the manager for the [subagents](/en/sub-agents) Claude can delegate side tasks to, and `/tasks` lists what's running in the background of the current session. `/background` detaches the whole session to keep running as a [background agent](/en/agent-view) and frees your terminal. For a large change that spans the codebase, `/batch` decomposes it into independent units and runs each in its own [worktree](/en/worktrees). See [Run agents in parallel](/en/agents) for how these approaches relate.

24 24 

25**Before you ship.** `/diff` shows what changed, `/code-review` checks the diff for correctness bugs and cleanups and can apply the findings with `--fix`, and `/review` or `/security-review` give a deeper read-only pass. `/code-review ultra` runs a multi-agent review in the cloud.25**Before you ship.** `/diff` shows what changed, `/code-review` checks the diff for correctness bugs and cleanups and can apply the findings with `--fix`, `/review` runs the same read-only review on a GitHub pull request, and `/security-review` gives a deeper read-only pass. `/code-review ultra` runs a multi-agent review in the cloud.

26 26 

27**Between sessions.** `/clear` starts fresh on a new task while keeping project memory. `/resume` and `/branch` let you return to or fork an earlier conversation. `/teleport` pulls a web session into this terminal, and `/remote-control` lets you continue this local session from another device.27**Between sessions.** `/clear` starts fresh on a new task while keeping project memory. `/resume` and `/branch` let you return to or fork an earlier conversation. `/teleport` pulls a web session into this terminal, and `/remote-control` lets you continue this local session from another device.

28 28 


110| `/remote-env` | Choose the default environment for [cloud agents](/en/claude-code-on-the-web#configure-your-environment) |110| `/remote-env` | Choose the default environment for [cloud agents](/en/claude-code-on-the-web#configure-your-environment) |

111| `/rename [name]` | Rename the current session and show the name on the prompt bar. Without a name, auto-generates one from conversation history |111| `/rename [name]` | Rename the current session and show the name on the prompt bar. Without a name, auto-generates one from conversation history |

112| `/resume [session]` | Resume a conversation by ID or name, or open the session picker. As of v2.1.144, [background sessions](/en/agent-view) appear in the picker marked with `bg`. Alias: `/continue` |112| `/resume [session]` | Resume a conversation by ID or name, or open the session picker. As of v2.1.144, [background sessions](/en/agent-view) appear in the picker marked with `bg`. Alias: `/continue` |

113| `/review [PR]` | Review a pull request locally in your current session. For a deeper cloud-based review, see [`/code-review ultra`](/en/ultrareview) |113| `/review [PR]` | Review a GitHub pull request by number, using the same review engine as `/code-review`. With no arguments, lists open PRs to pick from. For a cloud-based review, see [`/code-review ultra`](/en/ultrareview) |

114| `/rewind` | Rewind the conversation and/or code to a previous point, or summarize from a selected message. See [checkpointing](/en/checkpointing). Aliases: `/checkpoint`, `/undo` |114| `/rewind` | Rewind the conversation and/or code to a previous point, or summarize from a selected message. See [checkpointing](/en/checkpointing). Aliases: `/checkpoint`, `/undo` |

115| `/run` | **[Skill](/en/skills#bundled-skills).** Launch and drive your project's app to see a change working in the running app, not just in tests. See [Run and verify your app](/en/skills#run-and-verify-your-app). {/* min-version: 2.1.145 */}Requires Claude Code v2.1.145 or later |115| `/run` | **[Skill](/en/skills#bundled-skills).** Launch and drive your project's app to see a change working in the running app, not just in tests. See [Run and verify your app](/en/skills#run-and-verify-your-app). {/* min-version: 2.1.145 */}Requires Claude Code v2.1.145 or later |

116| `/run-skill-generator` | **[Skill](/en/skills#bundled-skills).** Teach `/run` and `/verify` how to build, launch, and drive your project's app from a clean environment by writing a per-project [skill](/en/skills#run-and-verify-your-app). {/* min-version: 2.1.145 */}Requires Claude Code v2.1.145 or later |116| `/run-skill-generator` | **[Skill](/en/skills#bundled-skills).** Teach `/run` and `/verify` how to build, launch, and drive your project's app from a clean environment by writing a per-project [skill](/en/skills#run-and-verify-your-app). {/* min-version: 2.1.145 */}Requires Claude Code v2.1.145 or later |

env-vars.md +5 −3

Details

157| `CLAUDE_CODE_CLIENT_CERT` | Path to client certificate file for mTLS authentication |157| `CLAUDE_CODE_CLIENT_CERT` | Path to client certificate file for mTLS authentication |

158| `CLAUDE_CODE_CLIENT_KEY` | Path to client private key file for mTLS authentication |158| `CLAUDE_CODE_CLIENT_KEY` | Path to client private key file for mTLS authentication |

159| `CLAUDE_CODE_CLIENT_KEY_PASSPHRASE` | Passphrase for encrypted CLAUDE\_CODE\_CLIENT\_KEY (optional) |159| `CLAUDE_CODE_CLIENT_KEY_PASSPHRASE` | Passphrase for encrypted CLAUDE\_CODE\_CLIENT\_KEY (optional) |

160| `CLAUDE_CODE_CONNECT_TIMEOUT_MS` | Timeout in milliseconds for the connect, TLS, and response-header phase of a streaming API request (default: 60000, or 60 seconds). If no response headers arrive within this window, the request is aborted and retried. Set to `0` to disable and rely on `API_TIMEOUT_MS` alone |160| `CLAUDE_CODE_CONNECT_TIMEOUT_MS` | {/* max-version: 2.1.185 */}Removed in v2.1.186 and now a no-op. Previously set a separate timeout for the connect, TLS, and response-header phase of a streaming API request. Use `API_TIMEOUT_MS` for the per-request timeout |

161| `CLAUDE_CODE_DEBUG_LOGS_DIR` | Override the debug log file path. Despite the name, this is a file path, not a directory. Requires debug mode to be enabled separately via `--debug`, `/debug`, or the `DEBUG` environment variable: setting this variable alone does not enable logging. The [`--debug-file`](/en/cli-reference#cli-flags) flag does both at once. Defaults to `~/.claude/debug/<session-id>.txt` |161| `CLAUDE_CODE_DEBUG_LOGS_DIR` | Override the debug log file path. Despite the name, this is a file path, not a directory. Requires debug mode to be enabled separately via `--debug`, `/debug`, or the `DEBUG` environment variable: setting this variable alone does not enable logging. The [`--debug-file`](/en/cli-reference#cli-flags) flag does both at once. Defaults to `~/.claude/debug/<session-id>.txt` |

162| `CLAUDE_CODE_DEBUG_LOG_LEVEL` | Minimum log level written to the debug log file. Values: `verbose`, `debug` (default), `info`, `warn`, `error`. Set to `verbose` to include high-volume diagnostics like full status line command output, or raise to `error` to reduce noise |162| `CLAUDE_CODE_DEBUG_LOG_LEVEL` | Minimum log level written to the debug log file. Values: `verbose`, `debug` (default), `info`, `warn`, `error`. Set to `verbose` to include high-volume diagnostics like full status line command output, or raise to `error` to reduce noise |

163| `CLAUDE_CODE_DISABLE_1M_CONTEXT` | Set to `1` to disable [1M context window](/en/model-config#extended-context) support. When set, 1M model variants are unavailable in the model picker. Useful for enterprise environments with compliance requirements |163| `CLAUDE_CODE_DISABLE_1M_CONTEXT` | Set to `1` to disable [1M context window](/en/model-config#extended-context) support. When set, 1M model variants are unavailable in the model picker. Useful for enterprise environments with compliance requirements |


202| `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS` | Set to `1` to enable [agent teams](/en/agent-teams). Agent teams are experimental and disabled by default |202| `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS` | Set to `1` to enable [agent teams](/en/agent-teams). Agent teams are experimental and disabled by default |

203| `CLAUDE_CODE_EXTRA_BODY` | JSON object to merge into the top level of every API request body. Useful for passing provider-specific parameters that Claude Code does not expose directly |203| `CLAUDE_CODE_EXTRA_BODY` | JSON object to merge into the top level of every API request body. Useful for passing provider-specific parameters that Claude Code does not expose directly |

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

205| `CLAUDE_CODE_FORCE_SESSION_PERSISTENCE` | {/* min-version: 2.1.172 */}Set to `1` to force transcript persistence, prompt history, and `claude agents` registration even when this `claude` was launched from inside another Claude Code session. Use when an inherited `CLAUDE_CODE_CHILD_SESSION` value, for example from a tmux server first started by Claude Code's Bash tool, causes a genuine top-level session to be misclassified as nested. Also honored on v2.1.169 and earlier; has no effect on v2.1.170 and v2.1.171, where the nested-session detection it overrides was removed |205| `CLAUDE_CODE_FORCE_SESSION_PERSISTENCE` | {/* min-version: 2.1.172 */}Set to `1` to force transcript persistence, prompt history, and `claude agents` registration even when this `claude` was launched from inside another Claude Code session. Use when an inherited `CLAUDE_CODE_CHILD_SESSION` value, for example from a `screen` session or a background launcher first started by Claude Code's Bash tool, causes a genuine top-level session to be misclassified as nested. {/* min-version: 2.1.178 */}As of v2.1.178, Claude Code detects the tmux case automatically and ignores the inherited marker, so tmux no longer needs this variable. Also honored on v2.1.169 and earlier; has no effect on v2.1.170 and v2.1.171, where the nested-session detection it overrides was removed |

206| `CLAUDE_CODE_FORCE_STRIKETHROUGH` | {/* min-version: 2.1.186 */}Set to `1` to force strikethrough rendering for `~~text~~` in Claude's responses when your terminal supports it but is not auto-detected, such as over SSH without `TERM_PROGRAM` forwarded. Without this, undetected terminals show the literal `~~` markers instead of rendering the text as strikethrough. Requires Claude Code v2.1.186 or later |

206| `CLAUDE_CODE_FORCE_SYNC_OUTPUT` | Set to `1` to force-enable DEC private mode 2026 [synchronized output](https://gist.github.com/christianparpart/d8a62cc1ab659194337d73e399004036) when your terminal supports it but is not auto-detected. Useful for emulators such as Emacs `eat` that implement BSU/ESU but do not reply to the capability probe. Has no effect under tmux |207| `CLAUDE_CODE_FORCE_SYNC_OUTPUT` | Set to `1` to force-enable DEC private mode 2026 [synchronized output](https://gist.github.com/christianparpart/d8a62cc1ab659194337d73e399004036) when your terminal supports it but is not auto-detected. Useful for emulators such as Emacs `eat` that implement BSU/ESU but do not reply to the capability probe. Has no effect under tmux |

207| `CLAUDE_CODE_FORK_SUBAGENT` | Set to `1` to let Claude spawn [forked subagents](/en/sub-agents#fork-the-current-conversation), or `0` to disable them, overriding any server-side rollout. When enabled, Claude can request the `fork` subagent type to spawn a fork, a subagent that inherits the full conversation context instead of starting fresh. Spawns without a subagent type still use the general-purpose subagent, and all subagent spawns run in the background. The explicit [`/fork`](/en/commands) command works without this variable. Works in interactive mode and via the SDK or `claude -p` |208| `CLAUDE_CODE_FORK_SUBAGENT` | Set to `1` to let Claude spawn [forked subagents](/en/sub-agents#fork-the-current-conversation), or `0` to disable them, overriding any server-side rollout. When enabled, Claude can request the `fork` subagent type to spawn a fork, a subagent that inherits the full conversation context instead of starting fresh. Spawns without a subagent type still use the general-purpose subagent, and all subagent spawns run in the background. The explicit [`/fork`](/en/commands) command works without this variable. Works in interactive mode and via the SDK or `claude -p` |

208| `CLAUDE_CODE_GIT_BASH_PATH` | Windows only: path to the Git Bash executable (`bash.exe`). Use when Git Bash is installed but not in your PATH. See [Windows setup](/en/setup#set-up-on-windows) |209| `CLAUDE_CODE_GIT_BASH_PATH` | Windows only: path to the Git Bash executable (`bash.exe`). Use when Git Bash is installed but not in your PATH. See [Windows setup](/en/setup#set-up-on-windows) |


215| `CLAUDE_CODE_IDE_SKIP_VALID_CHECK` | Set to `1` to skip validation of IDE lockfile entries during connection. Use when auto-connect fails to find your IDE despite it running |216| `CLAUDE_CODE_IDE_SKIP_VALID_CHECK` | Set to `1` to skip validation of IDE lockfile entries during connection. Use when auto-connect fails to find your IDE despite it running |

216| `CLAUDE_CODE_MAX_CONTEXT_TOKENS` | Override the context window size Claude Code assumes for the active model. Only takes effect when `DISABLE_COMPACT` is also set. Use this when routing to a model through `ANTHROPIC_BASE_URL` whose context window does not match the built-in size for its name |217| `CLAUDE_CODE_MAX_CONTEXT_TOKENS` | Override the context window size Claude Code assumes for the active model. Only takes effect when `DISABLE_COMPACT` is also set. Use this when routing to a model through `ANTHROPIC_BASE_URL` whose context window does not match the built-in size for its name |

217| `CLAUDE_CODE_MAX_OUTPUT_TOKENS` | Set the maximum number of output tokens for most requests. Defaults and caps vary by model; see [max output tokens](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison). Increasing this value reduces the effective context window available before [auto-compaction](/en/costs#reduce-token-usage) triggers. |218| `CLAUDE_CODE_MAX_OUTPUT_TOKENS` | Set the maximum number of output tokens for most requests. Defaults and caps vary by model; see [max output tokens](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison). Increasing this value reduces the effective context window available before [auto-compaction](/en/costs#reduce-token-usage) triggers. |

218| `CLAUDE_CODE_MAX_RETRIES` | Override the number of times to retry failed API requests (default: 10) |219| `CLAUDE_CODE_MAX_RETRIES` | Override the number of times to retry failed API requests (default: 10). {/* min-version: 2.1.186 */}Capped at 15 as of v2.1.186. For unattended sessions that need to wait through longer outages, set `CLAUDE_CODE_RETRY_WATCHDOG` instead |

219| `CLAUDE_CODE_MAX_TOOL_USE_CONCURRENCY` | Maximum number of read-only tools and subagents that can execute in parallel (default: 10). Higher values increase parallelism but consume more resources |220| `CLAUDE_CODE_MAX_TOOL_USE_CONCURRENCY` | Maximum number of read-only tools and subagents that can execute in parallel (default: 10). Higher values increase parallelism but consume more resources |

220| `CLAUDE_CODE_MAX_TURNS` | Cap the number of agentic turns when no explicit limit is passed. Equivalent to passing [`--max-turns`](/en/cli-reference#cli-flags), which takes precedence when both are set. A value that is not a positive integer is rejected at startup with an error rather than treated as no cap |221| `CLAUDE_CODE_MAX_TURNS` | Cap the number of agentic turns when no explicit limit is passed. Equivalent to passing [`--max-turns`](/en/cli-reference#cli-flags), which takes precedence when both are set. A value that is not a positive integer is rejected at startup with an error rather than treated as no cap |

221| `CLAUDE_CODE_MCP_ALLOWLIST_ENV` | Set to `1` to spawn stdio MCP servers with only a safe baseline environment plus the server's configured `env`, instead of inheriting your shell environment |222| `CLAUDE_CODE_MCP_ALLOWLIST_ENV` | Set to `1` to spawn stdio MCP servers with only a safe baseline environment plus the server's configured `env`, instead of inheriting your shell environment |


246| `CLAUDE_CODE_REMOTE_SESSION_ID` | Set automatically in [cloud sessions](/en/claude-code-on-the-web) to the current session's ID. Read this to construct a link back to the session transcript. See [Link output back to the session](/en/claude-code-on-the-web#link-output-back-to-the-session) |247| `CLAUDE_CODE_REMOTE_SESSION_ID` | Set automatically in [cloud sessions](/en/claude-code-on-the-web) to the current session's ID. Read this to construct a link back to the session transcript. See [Link output back to the session](/en/claude-code-on-the-web#link-output-back-to-the-session) |

247| `CLAUDE_CODE_RESUME_INTERRUPTED_TURN` | Set to `1` to automatically resume if the previous session ended mid-turn. Used in SDK mode so the model continues without requiring the SDK to re-send the prompt |248| `CLAUDE_CODE_RESUME_INTERRUPTED_TURN` | Set to `1` to automatically resume if the previous session ended mid-turn. Used in SDK mode so the model continues without requiring the SDK to re-send the prompt |

248| `CLAUDE_CODE_RESUME_PROMPT` | Override the continuation message injected when resuming a session that ended mid-turn. Defaults to `Continue from where you left off.`. Spawn scripts for long-running agents can set this to a more directive boot message. An empty string uses the default |249| `CLAUDE_CODE_RESUME_PROMPT` | Override the continuation message injected when resuming a session that ended mid-turn. Defaults to `Continue from where you left off.`. Spawn scripts for long-running agents can set this to a more directive boot message. An empty string uses the default |

250| `CLAUDE_CODE_RETRY_WATCHDOG` | {/* min-version: 2.1.186 */}Set to `1` for unattended sessions such as eval harnesses, CI jobs, or remote workers. Retries `429` and `529` capacity errors indefinitely instead of failing after `CLAUDE_CODE_MAX_RETRIES` attempts. The watchdog backs off up to 5 minutes between attempts, or until the limit resets when the response carries a rate-limit reset time, so a session that hits a usage limit waits out the remaining window. Requires Claude Code v2.1.186 or later |

249| `CLAUDE_CODE_SAFE_MODE` | Set to `1` to start in safe mode: CLAUDE.md, skills, plugins, hooks, MCP servers, custom commands and agents, output styles, workflows, custom themes, custom keybindings, status line and file-suggestion commands, LSP servers, and auto-memory do not load, for troubleshooting a broken configuration. Managed settings policy still applies, including policy-configured hooks, status line, and file-suggestion commands; managed plugins, managed skills, managed CLAUDE.md, and policy-configured MCP servers do not. Equivalent to passing [`--safe-mode`](/en/cli-reference#cli-flags). Directly spawned child processes inherit the variable |251| `CLAUDE_CODE_SAFE_MODE` | Set to `1` to start in safe mode: CLAUDE.md, skills, plugins, hooks, MCP servers, custom commands and agents, output styles, workflows, custom themes, custom keybindings, status line and file-suggestion commands, LSP servers, and auto-memory do not load, for troubleshooting a broken configuration. Managed settings policy still applies, including policy-configured hooks, status line, and file-suggestion commands; managed plugins, managed skills, managed CLAUDE.md, and policy-configured MCP servers do not. Equivalent to passing [`--safe-mode`](/en/cli-reference#cli-flags). Directly spawned child processes inherit the variable |

250| `CLAUDE_CODE_SCRIPT_CAPS` | JSON object limiting how many times specific scripts may be invoked per session when `CLAUDE_CODE_SUBPROCESS_ENV_SCRUB` is set. Keys are substrings matched against the command text; values are integer call limits. For example, `{"deploy.sh": 2}` allows `deploy.sh` to be called at most twice. Matching is substring-based so shell-expansion tricks like `./scripts/deploy.sh $(evil)` still count against the cap. Runtime fan-out via `xargs` or `find -exec` is not detected; this is a defense-in-depth control |252| `CLAUDE_CODE_SCRIPT_CAPS` | JSON object limiting how many times specific scripts may be invoked per session when `CLAUDE_CODE_SUBPROCESS_ENV_SCRUB` is set. Keys are substrings matched against the command text; values are integer call limits. For example, `{"deploy.sh": 2}` allows `deploy.sh` to be called at most twice. Matching is substring-based so shell-expansion tricks like `./scripts/deploy.sh $(evil)` still count against the cap. Runtime fan-out via `xargs` or `find -exec` is not detected; this is a defense-in-depth control |

251| `CLAUDE_CODE_SCROLL_SPEED` | Set the mouse wheel scroll multiplier in [fullscreen rendering](/en/fullscreen#mouse-wheel-scrolling). Accepts values from 1 to 20, and fractional values below 1 such as `0.5` to slow accelerated trackpad and wheel scrolling in terminals that already amplify wheel events. Set to `3` to match `vim` if your terminal sends one wheel event per notch without amplification. Ignored in the JetBrains IDE terminal, where Claude Code uses its own scroll handling |253| `CLAUDE_CODE_SCROLL_SPEED` | Set the mouse wheel scroll multiplier in [fullscreen rendering](/en/fullscreen#mouse-wheel-scrolling). Accepts values from 1 to 20, and fractional values below 1 such as `0.5` to slow accelerated trackpad and wheel scrolling in terminals that already amplify wheel events. Set to `3` to match `vim` if your terminal sends one wheel event per notch without amplification. Ignored in the JetBrains IDE terminal, where Claude Code uses its own scroll handling |

errors.md +7 −3

Details

41| `OAuth token revoked` / `OAuth token has expired` | [Authentication](#oauth-token-revoked-or-expired) |41| `OAuth token revoked` / `OAuth token has expired` | [Authentication](#oauth-token-revoked-or-expired) |

42| `does not meet scope requirement user:profile` | [Authentication](#oauth-scope-requirement) |42| `does not meet scope requirement user:profile` | [Authentication](#oauth-scope-requirement) |

43| `Unable to connect to API` | [Network](#unable-to-connect-to-api) |43| `Unable to connect to API` | [Network](#unable-to-connect-to-api) |

44| `Waiting for API response · will retry in` | [Automatic retries](#automatic-retries), or [Network](#unable-to-connect-to-api) if it persists |

44| `SSL certificate verification failed` | [Network](#ssl-certificate-errors) |45| `SSL certificate verification failed` | [Network](#ssl-certificate-errors) |

45| `403` with `x-deny-reason: host_not_allowed` in a cloud or routine session | [Network](#host-not-allowed-in-a-cloud-session) |46| `403` with `x-deny-reason: host_not_allowed` in a cloud or routine session | [Network](#host-not-allowed-in-a-cloud-session) |

46| `Prompt is too long` | [Request errors](#prompt-is-too-long) |47| `Prompt is too long` | [Request errors](#prompt-is-too-long) |


62 63 

63Claude Code retries transient failures before showing you an error. Server errors, overloaded responses, request timeouts, temporary 429 throttles, and dropped connections are all retried up to 10 times with exponential backoff. While retrying, the spinner shows a `Retrying in Ns · attempt x/y` countdown.64Claude Code retries transient failures before showing you an error. Server errors, overloaded responses, request timeouts, temporary 429 throttles, and dropped connections are all retried up to 10 times with exponential backoff. While retrying, the spinner shows a `Retrying in Ns · attempt x/y` countdown.

64 65 

65When you see one of the errors on this page, those retries have already been exhausted. You can tune the behavior with two environment variables:66{/* min-version: 2.1.185 */}If no data arrives on the response stream for 20 seconds while a request is still pending, the spinner shows `Waiting for API response · will retry in … · check your network` before any retry has started. The request has not failed yet: the countdown runs to the point where Claude Code aborts the stalled connection and retries, so the banner clears on its own once data resumes or the retry succeeds. As of v2.1.185 the threshold is 20 seconds; earlier versions show the banner after 10 seconds with different wording. If it reappears on every attempt, treat it as a [network issue](#unable-to-connect-to-api).

67 

68When you see one of the errors on this page, those retries have already been exhausted. You can tune the behavior with these environment variables:

66 69 

67| Variable | Default | Effect |70| Variable | Default | Effect |

68| :---------------------------------------- | :------ | :------------------------------------------------------------------------------------------------------------------- |71| :------------------------------------------- | :------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

69| [`CLAUDE_CODE_MAX_RETRIES`](/en/env-vars) | 10 | Number of retry attempts. Lower it to surface failures faster in scripts; raise it to wait through longer incidents. |72| [`CLAUDE_CODE_MAX_RETRIES`](/en/env-vars) | 10 | Number of retry attempts. {/* min-version: 2.1.186 */}Capped at 15 as of v2.1.186. Lower it to surface failures faster in scripts. |

73| [`CLAUDE_CODE_RETRY_WATCHDOG`](/en/env-vars) | unset | Set to `1` in unattended sessions such as CI jobs to retry `429` and `529` capacity errors indefinitely instead of failing after `CLAUDE_CODE_MAX_RETRIES` attempts. |

70| [`API_TIMEOUT_MS`](/en/env-vars) | 600000 | Per-request timeout in milliseconds. Raise it for slow networks or proxies. |74| [`API_TIMEOUT_MS`](/en/env-vars) | 600000 | Per-request timeout in milliseconds. Raise it for slow networks or proxies. |

71 75 

72## Server errors76## Server errors

Details

80### Quick commands80### Quick commands

81 81 

82| Shortcut | Description | Notes |82| Shortcut | Description | Notes |

83| :----------- | :---------------- | :------------------------------------------------------------ |83| :----------- | :---------------- | :----------------------------------------------------------------------------------- |

84| `/` at start | Command or skill | See [commands](#commands) and [skills](/en/skills) |84| `/` at start | Command or skill | See [commands](#commands) and [skills](/en/skills) |

85| `!` at start | Shell mode | Run commands directly and add execution output to the session |85| `!` at start | Shell mode | Run a command directly, add its output to the session, and have Claude respond to it |

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

87 87 

88### Transcript viewer88### Transcript viewer


286* Exit with `Escape`, `Backspace`, or `Ctrl+U` on an empty prompt286* Exit with `Escape`, `Backspace`, or `Ctrl+U` on an empty prompt

287* Pasting text that starts with `!` into an empty prompt enters shell mode automatically, matching typed `!` behavior287* Pasting text that starts with `!` into an empty prompt enters shell mode automatically, matching typed `!` behavior

288 288 

289As of v2.1.186, Claude responds to the command output automatically once it lands in the transcript, so you can run `! npm test` and get an explanation of the failures without a second prompt. The response costs the same as sending a normal prompt. To restore the earlier behavior where the output is added to context without a response, set [`respondToBashCommands`](/en/settings#available-settings) to `false` in `settings.json`. Before v2.1.186, shell mode always added output to context without a response.

290 

289This is useful for quick shell operations while maintaining conversation context.291This is useful for quick shell operations while maintaining conversation context.

290 292 

291## Prompt suggestions293## Prompt suggestions

mcp.md +16 −0

Details

508 * OAuth authentication works with HTTP servers508 * OAuth authentication works with HTTP servers

509</Tip>509</Tip>

510 510 

511### Authenticate from the command line

512 

513From v2.1.186, `claude mcp login <name>` runs a configured server's OAuth flow directly from your shell, so you don't need to open the `/mcp` panel inside a session.

514 

515```bash theme={null}

516claude mcp login sentry

517```

518 

519To clear stored credentials later, run `claude mcp logout <name>`.

520 

521When you're connected over SSH, add `--no-browser` so the command prints the authorization URL instead of opening a browser. Open the URL on your local machine, then paste the full redirect URL from your browser's address bar back at the prompt. The command needs an interactive terminal for the paste step, so connect with `ssh -t`.

522 

523```bash theme={null}

524claude mcp login sentry --no-browser

525```

526 

511### Use a fixed OAuth callback port527### Use a fixed OAuth callback port

512 528 

513Some MCP servers require a specific redirect URI registered in advance. By default, Claude Code picks a random available port for the OAuth callback. Use `--callback-port` to fix the port so it matches a pre-registered redirect URI of the form `http://localhost:PORT/callback`.529Some MCP servers require a specific redirect URI registered in advance. By default, Claude Code picks a random available port for the OAuth callback. Use `--callback-port` to fix the port so it matches a pre-registered redirect URI of the form `http://localhost:PORT/callback`.

Details

1050 1050 

1051Claude Code retries failed API requests internally and emits a single `claude_code.api_error` event only after it gives up, so the event itself is the terminal signal for that request. Intermediate retry attempts are not logged as separate events.1051Claude Code retries failed API requests internally and emits a single `claude_code.api_error` event only after it gives up, so the event itself is the terminal signal for that request. Intermediate retry attempts are not logged as separate events.

1052 1052 

1053The `attempt` attribute on the event records how many attempts were made in total. A value greater than `CLAUDE_CODE_MAX_RETRIES` (default `10`) indicates the request exhausted all retries on a transient error. A lower value indicates a non-retryable error such as a `400` response.1053The `attempt` attribute on the event records how many attempts were made in total. A value greater than `CLAUDE_CODE_MAX_RETRIES` (default `10`, capped at `15`) indicates the request exhausted all retries on a transient error. A lower value indicates a non-retryable error such as a `400` response.

1054 1054 

1055To distinguish a session that recovered from one that stalled, group events by `session.id` and check whether a later `api_request` event exists after the error.1055To distinguish a session that recovered from one that stalled, group events by `session.id` and check whether a later `api_request` event exists after the error.

1056 1056 

permissions.md +2 −2

Details

354The following configuration types are loaded from `--add-dir` directories:354The following configuration types are loaded from `--add-dir` directories:

355 355 

356| Configuration | Loaded from `--add-dir` |356| Configuration | Loaded from `--add-dir` |

357| :--------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------- |357| :------------------------------------------------------------------------------------ | :----------------------------------------------------------------------------------------------------------------------------------------------------------------- |

358| [Skills](/en/skills) in `.claude/skills/` | Yes, with live reload |358| [Skills](/en/skills) in `.claude/skills/` | Yes, with live reload |

359| [Subagents](/en/sub-agents) in `.claude/agents/` | Yes |359| [Subagents](/en/sub-agents) in `.claude/agents/` | Yes |

360| Plugin settings in `.claude/settings.json` | `enabledPlugins` and `extraKnownMarketplaces` only |360| [Settings](/en/settings) in `.claude/settings.json` and `.claude/settings.local.json` | `enabledPlugins` and `extraKnownMarketplaces` keys only |

361| [CLAUDE.md](/en/memory) files, `.claude/rules/`, and `CLAUDE.local.md` | Only when `CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1` is set. `CLAUDE.local.md` additionally requires the `local` setting source, which is enabled by default |361| [CLAUDE.md](/en/memory) files, `.claude/rules/`, and `CLAUDE.local.md` | Only when `CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1` is set. `CLAUDE.local.md` additionally requires the `local` setting source, which is enabled by default |

362 362 

363Commands and output styles are discovered from the current working directory and its parents, your user directory at `~/.claude/`, and managed settings. Hooks and other `settings.json` keys load from the current working directory's `.claude/` folder with no parent-directory fallback, alongside your user `~/.claude/settings.json` and managed settings. To share that configuration across projects, use one of these approaches:363Commands and output styles are discovered from the current working directory and its parents, your user directory at `~/.claude/`, and managed settings. Hooks and other `settings.json` keys load from the current working directory's `.claude/` folder with no parent-directory fallback, alongside your user `~/.claude/settings.json` and managed settings. To share that configuration across projects, use one of these approaches:

Details

185 185 

186## Plugin entries186## Plugin entries

187 187 

188Each plugin entry in the `plugins` array describes a plugin and where to find it. You can include any field from the [plugin manifest schema](/en/plugins-reference#plugin-manifest-schema) (like `description`, `version`, `author`, `commands`, `hooks`, etc.), plus these marketplace-specific fields: `source`, `category`, `tags`, and `strict`.188Each plugin entry in the `plugins` array describes a plugin and where to find it. You can include any field from the [plugin manifest schema](/en/plugins-reference#plugin-manifest-schema) (like `description`, `version`, `author`, `commands`, `hooks`, etc.), plus these marketplace-specific fields: `source`, `category`, `tags`, `strict`, and `relevance`.

189 189 

190### Required fields190### Required fields

191 191 


211| `category` | string | Plugin category for organization |211| `category` | string | Plugin category for organization |

212| `tags` | array | Tags for searchability |212| `tags` | array | Tags for searchability |

213| `strict` | boolean | Controls whether `plugin.json` is the authority for component definitions (default: true). See [Strict mode](#strict-mode) below. |213| `strict` | boolean | Controls whether `plugin.json` is the authority for component definitions (default: true). See [Strict mode](#strict-mode) below. |

214| `relevance` | object | {/* min-version: 2.1.152 */}Signals that tell Claude Code when to suggest this plugin to users. Takes effect only for marketplaces an administrator allowlists in managed settings. See [Recommend plugins for your org](/en/plugin-relevance). Requires Claude Code v2.1.152 or later. |

214| `defaultEnabled` | boolean | {/* min-version: 2.1.154 */}Whether the plugin is enabled after install (default: true). Set to `false` to install the plugin disabled until the user opts in. Takes precedence over the same field in the plugin's `plugin.json`. See [Default enablement](/en/plugins-reference#default-enablement). Requires Claude Code v2.1.154 or later. |215| `defaultEnabled` | boolean | {/* min-version: 2.1.154 */}Whether the plugin is enabled after install (default: true). Set to `false` to install the plugin disabled until the user opts in. Takes precedence over the same field in the plugin's `plugin.json`. See [Default enablement](/en/plugins-reference#default-enablement). Requires Claude Code v2.1.154 or later. |

215 216 

216**Component configuration fields:**217**Component configuration fields:**


247 For example, a marketplace hosted at `acme-corp/plugin-catalog` (marketplace source) can list a plugin fetched from `acme-corp/code-formatter` (plugin source). The marketplace source and plugin source point to different repositories and are pinned independently.248 For example, a marketplace hosted at `acme-corp/plugin-catalog` (marketplace source) can list a plugin fetched from `acme-corp/code-formatter` (plugin source). The marketplace source and plugin source point to different repositories and are pinned independently.

248</Note>249</Note>

249 250 

250The git-based source types below are `github`, `url`, and `git-subdir`. When both `ref` and `sha` are set on any of them, the `sha` is the effective pin. Claude Code fetches and checks out the pinned commit directly, so installation succeeds even if the branch or tag named by `ref` has since been deleted upstream, as long as the commit is still reachable from the repository.251The git-based source types below are `github`, `url`, and `git-subdir`. When both `ref` and `sha` are set on any of them, the `sha` is the effective pin. Claude Code fetches and checks out the pinned commit directly. On most git hosts, including GitHub, GitLab, and Bitbucket, this means installation succeeds even if the branch or tag named by `ref` has since been deleted upstream, as long as the commit is still reachable from the repository. Some servers, such as AWS CodeCommit, do not support fetching commits by SHA. On those servers the `ref` must still exist and the pinned commit must be reachable from it.

251 252 

252### Relative paths253### Relative paths

253 254 


1005* Check that plugin directories contain required files1006* Check that plugin directories contain required files

1006* For GitHub sources, ensure repositories are public or you have access1007* For GitHub sources, ensure repositories are public or you have access

1007* Test plugin sources manually by cloning/downloading1008* Test plugin sources manually by cloning/downloading

1008* If the source pins both `ref` and `sha`, a deleted upstream branch or tag does not block installation. If the install still fails, confirm the pinned commit still exists in the repository1009* If the source pins both `ref` and `sha`, a deleted upstream branch or tag does not block installation on most git hosts, including GitHub, GitLab, and Bitbucket. On servers that do not support fetching commits by SHA, such as AWS CodeCommit, the `ref` must still exist and the pinned commit must be reachable from it. If the install still fails, confirm the pinned commit still exists in the repository

1009 1010 

1010### Private repository authentication fails1011### Private repository authentication fails

1011 1012 

plugin-relevance.md +170 −0 created

Details

1> ## Documentation Index

2> Fetch the complete documentation index at: https://code.claude.com/docs/llms.txt

3> Use this file to discover all available pages before exploring further.

4 

5# Recommend plugins for your org

6 

7> Add a relevance block to marketplace plugin entries so Claude Code suggests them when a user's work matches.

8 

9If you operate a plugin marketplace for your organization, you can have Claude Code suggest specific plugins to users based on what they are working on. Add a `relevance` block to a plugin's entry in `marketplace.json`, then allowlist the marketplace in managed settings. When a user's session matches one of the declared signals, Claude Code surfaces an install suggestion for that plugin.

10 

11Marketplace-declared suggestions are opt-in per marketplace through [managed settings](/en/settings#settings-files). No marketplace's `relevance` declarations produce suggestions until an administrator adds it to the allowlist, including the official Anthropic marketplace. Claude Code also includes one built-in suggestion that is independent of this allowlist; that tip and all marketplace-declared tips are disabled when [`spinnerTipsEnabled`](/en/settings#available-settings) is set to `false`.

12 

13{/* min-version: 2.1.152 */}This feature requires Claude Code v2.1.152 or later. Older clients ignore the `relevance` field.

14 

15This page is for marketplace operators and enterprise administrators. If you are looking to install plugins, see [Discover and install plugins](/en/discover-plugins).

16 

17## How it works

18 

19Each plugin entry in `marketplace.json` can carry a `relevance` object. The object names a topic and one or more signals. A signal is a pattern that Claude Code tests against the current session, such as the working directory or files Claude has read.

20 

21Signal matching happens locally on the user's machine. The matching adds no network traffic and does not report which signals matched, or their values, to Anthropic or to the marketplace operator.

22 

23When a signal matches and the plugin is not already installed, Claude Code shows the plugin in three places:

24 

25* **Spinner tip**: a "Working with *topic*? Install the *plugin* plugin" message with the `/plugin install` command appears below the spinner while Claude is responding.

26* **Session-start suggestion**: {/* min-version: 2.1.153 */}if the `cwd` signal matches the working directory, a one-line `plugin suggestion: <name>@<marketplace> · /plugin` notification appears before the first turn. This surface requires Claude Code v2.1.153 or later.

27* **`/plugin` Discover tab**: {/* min-version: 2.1.154 */}the plugin is pinned to the top of the Discover list with an annotation such as "suggested for this directory" or "suggested for stripe commands". This surface requires Claude Code v2.1.154 or later.

28 

29The spinner tip and the session-start notification are part of the spinner-tips system. Both are disabled when the user or project sets `spinnerTipsEnabled` to `false`, or when a custom `spinnerTipsOverride` is configured with `excludeDefault`. The Discover-tab pin is independent of tip settings.

30 

31Claude Code never installs a plugin automatically. The user always confirms.

32 

33## Add relevance to a plugin entry

34 

35Add a `relevance` object to the plugin's entry in your `marketplace.json`. The following example declares that the `terraform-helpers` plugin is relevant when Claude reads a `.tf` file or when Claude runs `terraform`:

36 

37```json theme={null}

38{

39 "name": "acme-corp-plugins",

40 "owner": { "name": "Acme Platform Team" },

41 "plugins": [

42 {

43 "name": "terraform-helpers",

44 "source": "./plugins/terraform-helpers",

45 "description": "Acme conventions and helpers for Terraform",

46 "relevance": {

47 "topic": "Terraform",

48 "signals": {

49 "cli": ["terraform"],

50 "filesRead": ["**/*.tf"]

51 }

52 }

53 }

54 ]

55}

56```

57 

58A plugin with a `relevance` block but no matching signal behaves like any other marketplace entry. It appears in the Discover list in its normal position and never surfaces as a spinner tip.

59 

60## Field reference

61 

62### `relevance`

63 

64| Field | Type | Description |

65| :-------- | :----- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

66| `topic` | string | Optional. The phrase that fills "Working with *topic*?" in the spinner tip. Often the product name, for example `Stripe`. Use a domain such as `design` when the plugin name does not read naturally as a topic. Defaults to the plugin name with each hyphen segment capitalized. The session-start notification does not use this value. Maximum 64 characters. |

67| `signals` | object | Matchers that determine when the plugin is relevant. At least one signal is required for the plugin to be suggestible. See the table below. |

68 

69### `relevance.signals`

70 

71| Field | Type | Description |

72| :------------- | :--------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

73| `cwd` | array of strings | {/* min-version: 2.1.153 */}Glob patterns matched against the session's working directory. Matched as an absolute path and, when inside a git repository, as a path relative to the repository root. Forward-slash normalized and case-insensitive. Every pattern matches the directory itself and everything under it, so `infra`, `infra/`, and `infra/**` behave identically. This is the only signal that can match at session start, before the first turn. Maximum 10 patterns of 256 characters each. |

74| `cli` | array of strings | Command names from shell commands Claude has run this session, for example `["stripe"]`. Applies on every platform: commands run on Windows through PowerShell or Git Bash are recorded the same way. Claude Code records one command name per shell tool invocation: the first token after any leading environment variable assignments and `sudo`. Compound commands contribute only their leading command, so `cd infra && terraform plan` records `cd`, not `terraform`. Exact match. Maximum 10 entries of 64 characters each. |

75| `hosts` | array of strings | Hostnames seen in `http://` or `https://` URLs in Bash commands this session, for example `["api.stripe.com"]`. Bare lowercase hostname only: no scheme, port, or path. Exact case-insensitive match. Maximum 20 entries of 128 characters each. |

76| `filesRead` | array of strings | {/* min-version: 2.1.153 */}Glob patterns matched against the paths of files Claude has read this session, for example `["**/*.tf"]`. Forward-slash normalized and case-insensitive. Maximum 10 patterns of 256 characters each. |

77| `manifestDeps` | array of objects | Dependencies declared in package manifests Claude has read this session. Each entry is `{ "file": "...", "pattern": "..." }`, where `file` is a regular expression matched against the manifest file's path as recorded in session state, typically an absolute path, and `pattern` is a regular expression matched against that file's contents. Anchor `file` at the end, for example `[/\\\\]package\\.json$` in JSON-escaped form, because a start-anchored pattern never matches an absolute path. Paths are not separator-normalized for this signal, so Windows paths use backslashes. Manifest files larger than 512 KB are skipped. Both values are JavaScript `RegExp` source strings of at most 256 characters. `file` matches case-insensitively. `pattern` is case-sensitive. Maximum 10 entries. |

78 

79The `cli`, `hosts`, `filesRead`, and `manifestDeps` signals need session history, so they can only match on the spinner tip and the Discover tab. Only `cwd` can match at session start. The `filesRead` and `manifestDeps` signals test the session's recorded file state, which also includes files Claude has written or edited and auto-loaded `CLAUDE.md` memory files.

80 

81The following example uses `manifestDeps` to suggest a Stripe plugin once Claude has read a `package.json` that depends on `stripe`. The `file` pattern uses `[/\\\\]` so it matches both forward-slash and backslash path separators, and `\\.` so the dot is literal. In JSON, each backslash in the regular expression is written twice.

82 

83```json theme={null}

84{

85 "name": "stripe-helpers",

86 "source": "./plugins/stripe-helpers",

87 "relevance": {

88 "topic": "Stripe",

89 "signals": {

90 "manifestDeps": [

91 {

92 "file": "[/\\\\]package\\.json$",

93 "pattern": "\"stripe\"\\s*:"

94 }

95 ]

96 }

97 }

98}

99```

100 

101<Note>

102 Unknown fields under `relevance` and `relevance.signals` are ignored at load time so older Claude Code clients continue to load your marketplace. Run `claude plugin validate` to surface them as warnings.

103</Note>

104 

105## Enable suggestions in managed settings

106 

107Declaring `relevance` in `marketplace.json` is not enough on its own. An administrator must allowlist the marketplace in [managed settings](/en/settings#settings-files) before its suggestions appear to users.

108 

109Add the marketplace name to `pluginSuggestionMarketplaces`. For any marketplace other than the official Anthropic marketplace, also declare the marketplace source in the same managed settings, either as that name's entry in `extraKnownMarketplaces` or as an entry in `strictKnownMarketplaces`. The allowlisted name is ignored if the marketplace registered on the machine came from a different source. This prevents an unrelated source from registering under an allowlisted name to have its plugins suggested across your org.

110 

111The following `managed-settings.json` registers an org marketplace from a GitHub repository and enables its suggestions:

112 

113```json theme={null}

114{

115 "extraKnownMarketplaces": {

116 "acme-corp-plugins": {

117 "source": {

118 "source": "github",

119 "repo": "acme-corp/claude-plugins"

120 }

121 }

122 },

123 "pluginSuggestionMarketplaces": ["acme-corp-plugins"]

124}

125```

126 

127The official marketplace is exempt from the source-declaration requirement because its name can only register from the official Anthropic source. Allowlisting the name alone is sufficient:

128 

129```json theme={null}

130{

131 "pluginSuggestionMarketplaces": ["claude-plugins-official"]

132}

133```

134 

135See the [settings reference](/en/settings) for `pluginSuggestionMarketplaces` and [`extraKnownMarketplaces`](/en/settings#extraknownmarketplaces) for full configuration details.

136 

137## What the user sees

138 

139When a signal matches during a session, the spinner tip reads:

140 

141```text theme={null}

142Working with Terraform? Install the terraform-helpers plugin:

143/plugin install terraform-helpers@acme-corp-plugins

144```

145 

146At session start, a matching `cwd` signal surfaces the one-line notification:

147 

148```text theme={null}

149plugin suggestion: terraform-helpers@acme-corp-plugins · /plugin

150```

151 

152A given plugin's suggestion appears at most once every three sessions across the spinner tip and the session-start notification combined, and neither repeats once the plugin is installed. The session-start notification additionally stops appearing after the suggestion has been shown twice.

153 

154{/* min-version: 2.1.154 */}In the `/plugin` Discover tab, the plugin is pinned above the other results with an annotation that names the matching signal, such as `suggested for this directory` or `suggested for terraform commands`. The Discover tab pins a given plugin once; later visits list it in normal order. The Discover-tab pin requires Claude Code v2.1.154 or later. On v2.1.152 only the spinner tip appears; the session-start notification is added in v2.1.153.

155 

156## Validate your marketplace

157 

158Run `claude plugin validate` against your marketplace directory to check the `relevance` block before publishing:

159 

160```

161claude plugin validate ./my-marketplace

162```

163 

164The validator reports unknown keys under `relevance` and `relevance.signals` as warnings, flags a `relevance` value that is not an object, and rejects a `signals.hosts` entry that includes a scheme, port, or path.

165 

166## See also

167 

168* [Create and distribute a plugin marketplace](/en/plugin-marketplaces): build the marketplace that hosts your plugins

169* [Recommend your plugin from your CLI](/en/plugin-hints): prompt users from your own CLI instead of from Claude Code's session signals

170* [Settings](/en/settings): full reference for `pluginSuggestionMarketplaces` and `extraKnownMarketplaces`

prompt-library.md +1319 −0

Details

6 6 

7> Copy-paste prompts for Claude Code, tagged by task and role.7> Copy-paste prompts for Claude Code, tagged by task and role.

8 8 

9export const PromptLibrary = ({text = {}, labels = {}, tagLabels = {}, phaseLabels = {}, sourceLabels = {}, catLabels = {}}) => {

10 const RAW = useMemo(() => [{

11 id: 'get-oriented-in-a',

12 sdlc: 'discover',

13 cat: 'Onboard',

14 startN: 1,

15 roles: [],

16 prompt: 'give me an overview of this codebase: architecture, key directories, and how the pieces connect',

17 nextHref: '/en/memory',

18 src: 'workflows'

19 }, {

20 id: 'explain-unfamiliar-code',

21 sdlc: 'discover',

22 cat: 'Understand',

23 roles: [],

24 prompt: 'explain what {path} does and how data flows through it. write it up as {format}',

25 slots: {

26 path: 'src/scheduler/queue.ts',

27 format: 'an HTML page with a diagram, then open it in my browser'

28 },

29 nextHref: '/en/output-styles',

30 src: 'workflows'

31 }, {

32 id: 'find-where-something-happens',

33 sdlc: 'discover',

34 cat: 'Understand',

35 startN: 2,

36 roles: [],

37 prompt: 'where do we {behavior}?',

38 slots: {

39 behavior: 'validate uploaded file types'

40 },

41 src: 'workflows'

42 }, {

43 id: 'see-what-depends-on',

44 sdlc: 'discover',

45 cat: 'Understand',

46 roles: [],

47 prompt: 'what would break if I deleted {target}?',

48 slots: {

49 target: 'the retryWithBackoff helper'

50 },

51 src: 'workflows'

52 }, {

53 id: 'trace-how-code-evolved',

54 sdlc: 'discover',

55 cat: 'Understand',

56 roles: [],

57 prompt: 'look through the commit history of {path} and summarize how it evolved and why',

58 slots: {

59 path: 'internal/auth/session.go'

60 },

61 src: 'best-practices'

62 }, {

63 id: 'scope-a-change-before',

64 sdlc: 'discover',

65 cat: 'Understand',

66 roles: ['pm', 'design'],

67 prompt: 'which files would I need to touch to {change}?',

68 slots: {

69 change: 'add a dark mode toggle to settings'

70 },

71 src: 'teams'

72 }, {

73 id: 'ask-the-codebase-a',

74 sdlc: 'discover',

75 cat: 'Understand',

76 roles: ['pm'],

77 prompt: 'I am a {role}. walk me through what happens when a user {action}, from the UI down to the result',

78 slots: {

79 role: 'PM',

80 action: 'clicks Export to PDF'

81 },

82 nextHref: '/en/output-styles',

83 src: 'teams'

84 }, {

85 id: 'plan-a-multi-file',

86 sdlc: 'design',

87 cat: 'Plan',

88 roles: ['pm', 'design'],

89 prompt: 'plan how to refactor the {target} to {goal}. list the files you would change, but don\'t edit anything yet',

90 slots: {

91 target: 'payment module',

92 goal: 'support multiple currencies'

93 },

94 src: 'workflows'

95 }, {

96 id: 'draft-a-spec-by',

97 sdlc: 'design',

98 cat: 'Plan',

99 roles: ['pm'],

100 prompt: 'I want to build {feature}. interview me about implementation, UX, edge cases, and tradeoffs until we have covered everything, then write the spec to SPEC.md',

101 slots: {

102 feature: 'per-workspace rate limits'

103 },

104 nextHref: '/en/skills',

105 src: 'best-practices'

106 }, {

107 id: 'turn-a-meeting-into',

108 sdlc: 'design',

109 cat: 'Plan',

110 roles: ['pm'],

111 prompt: 'read {input} and write up the action items, then create a {tracker} ticket for each with acceptance criteria',

112 slots: {

113 input: '@meeting-notes.md',

114 tracker: 'Linear'

115 },

116 needs: 'tracker',

117 nextHref: '/en/skills',

118 src: 'teams'

119 }, {

120 id: 'map-edge-cases-before',

121 sdlc: 'design',

122 cat: 'Plan',

123 roles: ['design', 'pm'],

124 prompt: 'list the error states, empty states, and edge cases for {feature} that the design needs to cover',

125 slots: {

126 feature: 'the file upload flow'

127 },

128 src: 'teams'

129 }, {

130 id: 'turn-a-mockup-into',

131 sdlc: 'design',

132 cat: 'Prototype',

133 roles: ['design', 'pm', 'marketing'],

134 paste: 'mockup',

135 prompt: 'here is a mockup. build a working prototype I can click through, matching the layout and states shown',

136 src: 'teams'

137 }, {

138 id: 'implement-from-a-screenshot',

139 sdlc: 'design',

140 cat: 'Prototype',

141 roles: ['design'],

142 paste: 'design',

143 needs: 'browser',

144 prompt: 'implement this design, then take a screenshot of the result, compare it to the original, and fix any differences',

145 nextHref: '/en/goal',

146 src: 'best-practices'

147 }, {

148 id: 'follow-an-existing-pattern',

149 sdlc: 'build',

150 cat: 'Implement',

151 roles: [],

152 prompt: 'look at how {example} is implemented to understand the pattern, then build {new} the same way',

153 slots: {

154 example: 'the GitHub webhook handler',

155 new: 'a Stripe webhook handler'

156 },

157 nextHref: '/en/memory',

158 src: 'best-practices'

159 }, {

160 id: 'generate-docs-for-code',

161 sdlc: 'build',

162 cat: 'Implement',

163 roles: ['docs'],

164 prompt: 'find {scope} without {format} comments and add them, matching the style already used in the file',

165 slots: {

166 scope: 'the public functions in src/auth/',

167 format: 'JSDoc'

168 },

169 src: 'workflows'

170 }, {

171 id: 'add-a-small-well',

172 sdlc: 'build',

173 cat: 'Implement',

174 roles: [],

175 prompt: 'add a {endpoint} endpoint that returns {payload}',

176 slots: {

177 endpoint: '/health',

178 payload: 'the app version and uptime'

179 },

180 src: 'workflows'

181 }, {

182 id: 'build-a-small-internal',

183 sdlc: 'build',

184 cat: 'Implement',

185 roles: ['pm', 'design', 'marketing', 'docs'],

186 prompt: 'create a {tool} using HTML, CSS, and vanilla JavaScript, then open it in my browser',

187 slots: {

188 tool: 'drag-and-drop Kanban board with three columns'

189 },

190 src: 'teams'

191 }, {

192 id: 'work-an-issue-end',

193 sdlc: 'build',

194 cat: 'Implement',

195 roles: [],

196 prompt: 'read issue #{issue}, implement the fix, and run the tests',

197 slots: {

198 issue: '312'

199 },

200 needs: 'gh',

201 src: 'workflows'

202 }, {

203 id: 'find-and-update-copy',

204 sdlc: 'build',

205 cat: 'Implement',

206 roles: ['design', 'docs', 'marketing'],

207 prompt: 'find every place we say "{copy}" or a close variant, show me each one in context, then update them all to "{new}". leave tests and the changelog alone',

208 slots: {

209 copy: 'Sign up free',

210 new: 'Start free trial'

211 },

212 src: 'teams'

213 }, {

214 id: 'draft-from-past-examples',

215 sdlc: 'build',

216 cat: 'Implement',

217 roles: ['docs', 'marketing', 'pm'],

218 prompt: 'read the {examples} in {folder} to learn the structure and voice, then draft a new one for {topic}',

219 slots: {

220 examples: 'privacy impact assessments',

221 folder: 'legal/pia/',

222 topic: 'the new analytics integration'

223 },

224 nextHref: '/en/skills',

225 src: 'legal'

226 }, {

227 id: 'write-tests-run-them',

228 sdlc: 'build',

229 cat: 'Test',

230 startN: 4,

231 roles: [],

232 prompt: 'write tests for {path}, run them, and fix any failures',

233 slots: {

234 path: 'app/parsers/feed.py'

235 },

236 nextHref: '/en/memory',

237 src: 'workflows'

238 }, {

239 id: 'drive-implementation-from-tests',

240 sdlc: 'build',

241 cat: 'Test',

242 roles: [],

243 prompt: 'write tests for {feature} first, then implement it until they pass',

244 slots: {

245 feature: 'the password reset flow'

246 },

247 src: 'ebook'

248 }, {

249 id: 'fill-gaps-from-a',

250 sdlc: 'build',

251 cat: 'Test',

252 roles: [],

253 prompt: 'read {report} and add tests for the lowest-covered files until each is above {target}%',

254 slots: {

255 report: 'coverage/coverage-summary.json',

256 target: '80'

257 },

258 nextHref: '/en/goal',

259 src: 'workflows'

260 }, {

261 id: 'migrate-a-pattern-across',

262 sdlc: 'build',

263 cat: 'Refactor',

264 roles: [],

265 prompt: 'migrate everything from {from} to {to}: identify every place that needs to change, then make the changes',

266 slots: {

267 from: 'the old logging API',

268 to: 'the structured logger'

269 },

270 src: 'workflows'

271 }, {

272 id: 'port-code-between-languages',

273 sdlc: 'build',

274 cat: 'Refactor',

275 roles: [],

276 prompt: 'port {source} to {target}, keeping the same {keep}',

277 slots: {

278 source: 'this Python module',

279 target: 'Rust',

280 keep: 'public API and test behavior'

281 },

282 src: 'teams'

283 }, {

284 id: 'optimize-against-a-measurable',

285 sdlc: 'build',

286 cat: 'Refactor',

287 roles: ['data'],

288 prompt: 'optimize {target} to bring {metric} from {current} down to under {goal}',

289 slots: {

290 target: 'the search query',

291 metric: 'p95 latency',

292 current: '2s',

293 goal: '500ms'

294 },

295 nextHref: '/en/goal',

296 src: 'ebook'

297 }, {

298 id: 'fix-a-precise-visual',

299 sdlc: 'build',

300 cat: 'Refactor',

301 roles: ['design'],

302 prompt: 'the {element} extends {amount} beyond the {container} on {viewport}. fix it.',

303 slots: {

304 element: 'login button',

305 amount: '20px',

306 container: 'card border',

307 viewport: 'mobile'

308 },

309 nextHref: '/en/desktop#preview-your-app',

310 src: 'ebook'

311 }, {

312 id: 'review-your-changes-before',

313 sdlc: 'build',

314 cat: 'Review',

315 startN: 5,

316 roles: [],

317 prompt: 'review my uncommitted changes and flag anything that looks risky before I commit',

318 nextHref: '/en/commands',

319 src: 'workflows'

320 }, {

321 id: 'review-a-pull-request',

322 sdlc: 'build',

323 cat: 'Review',

324 roles: [],

325 prompt: 'review PR #{pr} and summarize what changed, then list any concerns',

326 slots: {

327 pr: '247'

328 },

329 needs: 'gh',

330 nextHref: '/en/code-review',

331 src: 'workflows'

332 }, {

333 id: 'review-infrastructure-changes-before',

334 sdlc: 'build',

335 cat: 'Review',

336 roles: ['security', 'ops'],

337 paste: 'plan',

338 prompt: 'here is my Terraform plan output. what is this going to do, and is anything here going to cause problems?',

339 src: 'teams'

340 }, {

341 id: 'run-a-security-review',

342 sdlc: 'build',

343 cat: 'Review',

344 roles: ['security'],

345 prompt: 'use a subagent to review {path} for security issues and report what it finds',

346 slots: {

347 path: 'src/api/'

348 },

349 nextHref: '/en/sub-agents',

350 src: 'best-practices'

351 }, {

352 id: 'review-content-before-sending',

353 sdlc: 'build',

354 cat: 'Review',

355 roles: ['marketing', 'docs'],

356 prompt: 'review {file} for {concerns} and list anything I should fix before it goes to {reviewer}',

357 slots: {

358 file: 'launch-post.md',

359 concerns: 'unsupported claims, missing attributions, and brand-guideline issues',

360 reviewer: 'legal'

361 },

362 nextHref: '/en/skills',

363 src: 'legal'

364 }, {

365 id: 'course-correct-a-wrong',

366 sdlc: 'build',

367 cat: 'Steer',

368 roles: [],

369 prompt: 'that is not right: {feedback}. try a different approach',

370 slots: {

371 feedback: 'the function signature needs to stay backward-compatible'

372 },

373 nextHref: '/en/checkpointing',

374 src: 'best-practices'

375 }, {

376 id: 'narrow-the-scope-of',

377 sdlc: 'build',

378 cat: 'Steer',

379 roles: [],

380 prompt: 'that is too much. keep only the changes to {scope} and undo your other edits',

381 slots: {

382 scope: 'the validation logic in src/forms/'

383 },

384 src: 'best-practices'

385 }, {

386 id: 'turn-a-correction-into',

387 sdlc: 'build',

388 cat: 'Steer',

389 roles: [],

390 prompt: 'you keep {mistake}. add a rule to CLAUDE.md so this stops happening',

391 slots: {

392 mistake: 'using default exports when this project uses named exports'

393 },

394 nextHref: '/en/memory',

395 src: 'best-practices'

396 }, {

397 id: 'resolve-merge-conflicts',

398 sdlc: 'ship',

399 cat: 'Git',

400 roles: [],

401 prompt: 'resolve the merge conflicts in this branch and explain what you kept from each side',

402 src: 'workflows'

403 }, {

404 id: 'commit-with-a-generated',

405 sdlc: 'ship',

406 cat: 'Git',

407 roles: [],

408 prompt: 'commit these changes with a message that summarizes what I did',

409 src: 'workflows'

410 }, {

411 id: 'open-a-pull-request',

412 sdlc: 'ship',

413 cat: 'Git',

414 roles: [],

415 prompt: 'find the {tracker} ticket about {topic} and open a PR that implements it',

416 slots: {

417 tracker: 'Linear',

418 topic: 'the login timeout'

419 },

420 needs: 'tracker',

421 src: 'workflows'

422 }, {

423 id: 'draft-release-notes-from',

424 sdlc: 'ship',

425 cat: 'Release',

426 roles: ['pm', 'docs', 'marketing'],

427 prompt: 'compare {from} to {to} and draft release notes grouped by feature, fix, and breaking change',

428 slots: {

429 from: 'v2.3.0',

430 to: 'v2.4.0'

431 },

432 nextHref: '/en/skills',

433 src: 'workflows'

434 }, {

435 id: 'write-a-ci-workflow',

436 sdlc: 'ship',

437 cat: 'Release',

438 roles: ['ops'],

439 prompt: 'write a GitHub Actions workflow that {steps} on every push to {branch}',

440 slots: {

441 steps: 'runs the tests and deploys to staging',

442 branch: 'main'

443 },

444 src: 'workflows'

445 }, {

446 id: 'find-and-fix-a',

447 sdlc: 'operate',

448 cat: 'Debug',

449 startN: 3,

450 roles: [],

451 prompt: 'the {test} test is failing, find out why and fix it',

452 slots: {

453 test: 'UserAuth'

454 },

455 src: 'workflows'

456 }, {

457 id: 'investigate-a-reported-error',

458 sdlc: 'operate',

459 cat: 'Debug',

460 roles: ['ops'],

461 prompt: 'users are seeing {symptom} on {where}. investigate and tell me what is going on',

462 slots: {

463 symptom: '500 errors',

464 where: '/api/settings'

465 },

466 nextHref: '/en/web-quickstart#pre-fill-sessions',

467 src: 'workflows'

468 }, {

469 id: 'fix-a-build-error',

470 sdlc: 'operate',

471 cat: 'Debug',

472 roles: ['ops'],

473 paste: 'error',

474 prompt: 'here is a build error. fix the root cause and verify the build succeeds',

475 src: 'best-practices'

476 }, {

477 id: 'investigate-a-production-incident',

478 sdlc: 'operate',

479 cat: 'Incident',

480 roles: ['ops', 'security'],

481 prompt: '{symptom}. check the logs, recent deploys, and config changes, then tell me the most likely cause',

482 slots: {

483 symptom: 'the checkout endpoint started returning 500s an hour ago'

484 },

485 nextHref: '/en/mcp',

486 src: 'workflows'

487 }, {

488 id: 'diagnose-from-a-console',

489 sdlc: 'operate',

490 cat: 'Incident',

491 roles: ['ops', 'data'],

492 paste: 'screenshot',

493 prompt: 'here is a screenshot of {console}. walk me through why {resource} is failing and give me the exact commands to fix it',

494 slots: {

495 console: 'the GCP Kubernetes dashboard',

496 resource: 'this pod'

497 },

498 src: 'teams'

499 }, {

500 id: 'query-logs-in-plain',

501 sdlc: 'operate',

502 cat: 'Incident',

503 roles: ['security', 'ops', 'data'],

504 prompt: 'show me all {events} for {scope} over {timeframe}. write the query, run it, and tell me what stands out',

505 slots: {

506 events: 'failed logins',

507 scope: 'the auth service',

508 timeframe: 'the past 24 hours'

509 },

510 needs: 'db',

511 src: 'cybersecurity'

512 }, {

513 id: 'analyze-a-data-file',

514 sdlc: 'operate',

515 cat: 'Data',

516 roles: ['data', 'pm', 'marketing'],

517 paste: 'csv',

518 prompt: 'read {file}, summarize the key patterns, and write the results to {output}',

519 slots: {

520 file: '@reports/q1-signups.csv',

521 output: 'an HTML page with charts, then open it in my browser'

522 },

523 nextHref: '/en/mcp',

524 src: 'teams'

525 }, {

526 id: 'generate-variations-from-performance',

527 sdlc: 'operate',

528 cat: 'Data',

529 roles: ['marketing', 'data'],

530 paste: 'csv',

531 prompt: 'read {file}, find the underperforming {items}, and generate {n} new variations that stay under {limit} characters',

532 slots: {

533 file: '@ads-performance.csv',

534 items: 'headlines',

535 n: '20',

536 limit: '90'

537 },

538 nextHref: '/en/mcp',

539 src: 'teams'

540 }, {

541 id: 'turn-a-recurring-task',

542 sdlc: 'operate',

543 cat: 'Automate',

544 roles: [],

545 prompt: 'create a /{name} skill for this project that {steps}',

546 slots: {

547 name: 'ship',

548 steps: 'runs the linter and tests, then drafts a commit message'

549 },

550 src: 'workflows'

551 }, {

552 id: 'add-a-hook-for',

553 sdlc: 'operate',

554 cat: 'Automate',

555 roles: [],

556 prompt: 'write a hook that {action} after every {event}',

557 slots: {

558 action: 'runs prettier',

559 event: 'edit to a .ts or .tsx file'

560 },

561 src: 'best-practices'

562 }, {

563 id: 'connect-a-tool-with',

564 sdlc: 'operate',

565 cat: 'Automate',

566 roles: [],

567 prompt: 'set up the {server} MCP server so you can read my {data} directly',

568 slots: {

569 server: 'Sentry',

570 data: 'error reports'

571 },

572 src: 'workflows'

573 }, {

574 id: 'capture-what-to-remember',

575 sdlc: 'operate',

576 cat: 'Automate',

577 roles: ['pm', 'docs'],

578 prompt: 'summarize what we did this session and suggest what to add to CLAUDE.md',

579 src: 'teams'

580 }], []);

581 const PROMPTS = useMemo(() => {

582 if (typeof window !== 'undefined') {

583 const rawIds = new Set(RAW.map(p => p.id));

584 RAW.forEach(p => {

585 if (!text[p.id]) console.warn('[prompt-library] no text[] entry for id:', p.id);

586 });

587 Object.keys(text).forEach(k => {

588 if (!rawIds.has(k)) console.warn('[prompt-library] orphaned text[] key:', k);

589 });

590 }

591 return RAW.map(p => ({

592 ...p,

593 title: p.id,

594 teaches: '',

595 ...text[p.id] || ({})

596 }));

597 }, [RAW, text]);

598 const L = labels;

599 const TL = k => tagLabels[k] || k;

600 const CAT_TAG = useMemo(() => ({

601 Onboard: 'understand',

602 Understand: 'understand',

603 Plan: 'plan',

604 Prototype: 'prototype',

605 Implement: 'build',

606 Test: 'test',

607 Refactor: 'refactor',

608 Review: 'review',

609 Steer: 'steer',

610 Git: 'git',

611 Release: 'release',

612 Debug: 'debug',

613 Incident: 'debug',

614 Data: 'data',

615 Automate: 'automate'

616 }), []);

617 const TAGS = useMemo(() => ['understand', 'plan', 'prototype', 'build', 'test', 'refactor', 'review', 'steer', 'debug', 'git', 'release', 'data', 'automate', 'pm', 'design', 'docs', 'marketing', 'security', 'ops'], []);

618 const tagsOf = p => [CAT_TAG[p.cat], ...p.roles || []];

619 const doc = useMemo(() => {

620 const p = typeof window !== 'undefined' ? window.location.pathname : '';

621 const base = p.startsWith('/docs/') ? '/docs' : '';

622 const m = p.slice(base.length).match(/^\/([a-z]{2}(?:-[A-Z]{2})?)\//);

623 const locale = m ? m[1] : 'en';

624 return href => {

625 if (!href || href[0] !== '/' || href[1] === '/') return href;

626 return base + (href.startsWith('/en/') ? '/' + locale + href.slice(3) : href);

627 };

628 }, []);

629 const linkify = s => {

630 const out = [];

631 let last = 0;

632 const re = /\[([^\]]+)\]\(([^)]+)\)/g;

633 for (let m; m = re.exec(s); ) {

634 if (m.index > last) out.push(s.slice(last, m.index));

635 out.push(<a key={m.index} href={doc(m[2])}>{m[1]}</a>);

636 last = re.lastIndex;

637 }

638 if (last < s.length) out.push(s.slice(last));

639 return out;

640 };

641 const codeify = s => s.split(/(`[^`]+`)/g).map((part, i) => part[0] === '`' ? <code key={i}>{part.slice(1, -1)}</code> : part);

642 const SOURCES = useMemo(() => ({

643 'workflows': '/en/common-workflows',

644 'teams': 'https://claude.com/blog/how-anthropic-teams-use-claude-code',

645 'legal': 'https://claude.com/blog/how-anthropic-uses-claude-legal',

646 'cybersecurity': 'https://claude.com/blog/how-anthropic-uses-claude-cybersecurity',

647 'best-practices': '/en/best-practices',

648 'ebook': 'https://resources.anthropic.com/hubfs/Scaling%20agentic%20coding%20across%20your%20organization.pdf'

649 }), []);

650 const [mounted, setMounted] = useState(false);

651 const [q, setQ] = useState('');

652 const [start, setStart] = useState(true);

653 const [sel, setSel] = useState(null);

654 const [openId, setOpenId] = useState(null);

655 const [copied, setCopied] = useState(null);

656 const [fills, setFills] = useState({});

657 const copyTimer = useRef(null);

658 useEffect(() => {

659 setMounted(true);

660 return () => clearTimeout(copyTimer.current);

661 }, []);

662 const setFill = (id, key, val) => setFills(f => ({

663 ...f,

664 [id + '.' + key]: val

665 }));

666 const fillOf = (p, key) => {

667 const v = fills[p.id + '.' + key];

668 return v !== undefined ? v : p.slots && p.slots[key] !== undefined ? p.slots[key] : '';

669 };

670 const assemble = p => p.prompt.replace(/\{(\w+)\}/g, (_, k) => fillOf(p, k) || p.slots && p.slots[k] || k);

671 const preview = p => p.prompt.replace(/\{(\w+)\}/g, (_, k) => p.slots && p.slots[k] || k);

672 const bodyText = p => preview(p) + ' ' + p.teaches.replace(/\[([^\]]+)\]\([^)]+\)/g, '$1') + ' ' + (p.next || '');

673 const widthFor = s => (s || '').length + 3 + 'ch';

674 const ql = q.trim().toLowerCase();

675 const toggleTag = k => {

676 setStart(false);

677 setSel(s => !ql && s === k ? null : k);

678 };

679 const clear = () => {

680 setStart(false);

681 setSel(null);

682 setQ('');

683 };

684 const results = useMemo(() => {

685 const list = PROMPTS.filter(p => {

686 if (ql) return p.title.toLowerCase().includes(ql) || bodyText(p).toLowerCase().includes(ql);

687 if (start) return !!p.startN;

688 if (sel) return tagsOf(p).includes(sel);

689 return true;

690 });

691 if (ql) return list;

692 if (start) return list.sort((a, b) => a.startN - b.startN);

693 if (sel) return list.sort((a, b) => (a.roles || []).length - (b.roles || []).length || (b.sdlc === 'operate') - (a.sdlc === 'operate'));

694 return list;

695 }, [PROMPTS, ql, start, sel]);

696 const matchSnippet = p => {

697 if (!ql || p.title.toLowerCase().includes(ql)) return null;

698 const txt = bodyText(p);

699 const at = txt.toLowerCase().indexOf(ql);

700 if (at < 0) return null;

701 const lo = Math.max(0, at - 30), hi = Math.min(txt.length, at + ql.length + 50);

702 return [lo > 0 ? '…' : '', txt.slice(lo, at), <mark key="m">{txt.slice(at, at + ql.length)}</mark>, txt.slice(at + ql.length, hi), hi < txt.length ? '…' : ''];

703 };

704 const grouped = useMemo(() => {

705 if (start && !q.trim()) return [];

706 const g = {};

707 for (const p of results) {

708 const key = p.sdlc + '|' + p.cat;

709 (g[key] = g[key] || ({

710 sdlc: p.sdlc,

711 cat: p.cat,

712 items: []

713 })).items.push(p);

714 }

715 return Object.values(g);

716 }, [results, start, q]);

717 const copy = async (str, id) => {

718 try {

719 await navigator.clipboard.writeText(str);

720 } catch {

721 const ta = document.createElement('textarea');

722 ta.value = str;

723 ta.setAttribute('readonly', '');

724 ta.style.position = 'fixed';

725 ta.style.opacity = '0';

726 document.body.appendChild(ta);

727 ta.select();

728 document.execCommand('copy');

729 document.body.removeChild(ta);

730 }

731 clearTimeout(copyTimer.current);

732 setCopied(id);

733 copyTimer.current = setTimeout(() => setCopied(null), 1600);

734 };

735 const promptBody = p => {

736 if (!p.slots) return <code>{p.prompt}</code>;

737 const parts = p.prompt.split(/(\{\w+\})/g);

738 return <code>

739 {parts.map((part, idx) => {

740 const m = part.match(/^\{(\w+)\}$/);

741 if (!m) return <span key={idx}>{part}</span>;

742 const k = m[1];

743 const val = fillOf(p, k);

744 return <input key={idx} type="text" className="pl-slot" value={val} placeholder={p.slots[k] || k} aria-label={k} style={{

745 width: widthFor(val || p.slots[k])

746 }} onChange={e => setFill(p.id, k, e.target.value)} onFocus={e => e.target.select()} onClick={e => e.stopPropagation()} />;

747 })}

748 </code>;

749 };

750 const card = p => {

751 const open = openId === p.id;

752 const srcHref = SOURCES[p.src];

753 const srcLabel = sourceLabels[p.src];

754 const snip = matchSnippet(p);

755 return <div key={p.id} className={'pl-card' + (open ? ' pl-open' : '')}>

756 <button type="button" className="pl-head" onClick={() => setOpenId(open ? null : p.id)} aria-expanded={open}>

757 <span className="pl-title">{p.title}</span>

758 {!!p.startN && <span className="pl-chip">{L.startHere} · {p.startN}</span>}

759 </button>

760 {snip ? <div className="pl-match">{snip}</div> : <code className="pl-prompt-preview">{preview(p)}</code>}

761 {open && <div className="pl-body">

762 <div className="pl-label">{p.slots ? L.fillAndCopy : L.copyThis}</div>

763 {p.needs && L.needs && L.needs[p.needs] && <div className="pl-hint pl-needs">

764 <span className="pl-needs-label">{L.needsLabel}</span> {linkify(L.needs[p.needs])}

765 </div>}

766 {p.paste && L.paste && L.paste[p.paste] && <div className="pl-hint pl-paste">{L.paste[p.paste]}</div>}

767 {p.slots && <div className="pl-hint">

768 {L.hintBefore} <span className="pl-hint-chip">{L.hintChip}</span> {L.hintAfter}

769 </div>}

770 <div className="pl-prompt-box">

771 <span className="pl-caret">{'❯'}</span>

772 {promptBody(p)}

773 <button type="button" className="pl-copy" onClick={() => copy(assemble(p), p.id)}>

774 {copied === p.id ? L.copied : L.copy}

775 </button>

776 </div>

777 <div className="pl-label">{L.whyWorks}</div>

778 <div className="pl-teaches">{linkify(p.teaches)}</div>

779 {p.nextHref && p.next && <div className="pl-next">

780 <span className="pl-next-label">{L.makeItStick}</span>

781 <a href={doc(p.nextHref)}>{codeify(p.next)} →</a>

782 </div>}

783 {srcLabel && <div className="pl-src">{L.from} {srcHref ? <a href={doc(srcHref)}>{srcLabel}</a> : srcLabel}</div>}

784 </div>}

785 </div>;

786 };

787 const STYLES = useMemo(() => `

788.pl {

789 --pl-accent: #D97757;

790 --pl-accent-bg: rgba(217,119,87,0.07);

791 --pl-bg: #fff;

792 --pl-surface: #FAFAF7;

793 --pl-border: #E8E6DC;

794 --pl-border-subtle: rgba(31,30,29,0.08);

795 --pl-text: #141413;

796 --pl-text-2: #5E5D59;

797 --pl-text-3: #73726C;

798 --pl-text-4: #9C9A92;

799 --pl-mono: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);

800 font-family: 'Anthropic Sans', -apple-system, BlinkMacSystemFont, sans-serif;

801 font-size: 16px; color: var(--pl-text); margin: 8px 0 32px;

802}

803.dark .pl {

804 --pl-bg: #1f1e1d;

805 --pl-surface: #262624;

806 --pl-border: #3d3d3a;

807 --pl-border-subtle: rgba(240,238,230,0.08);

808 --pl-text: #f0eee6;

809 --pl-text-2: #bfbdb4;

810 --pl-text-3: #91908a;

811 --pl-text-4: #73726c;

812}

813.pl *, .pl *::before, .pl *::after { box-sizing: border-box; }

814.pl button { font-family: inherit; cursor: pointer; }

815.pl a { color: var(--pl-accent); text-decoration: none; }

816.pl a:hover { text-decoration: underline; }

817 

818.pl-search {

819 display: flex; align-items: center; gap: 10px;

820 padding: 14px 18px; background: var(--pl-surface);

821 border: 1px solid var(--pl-border); border-radius: 12px;

822 margin-bottom: 14px;

823}

824.pl-search input {

825 flex: 1; border: none; outline: none; background: transparent;

826 font-size: 16px; color: var(--pl-text);

827}

828.pl-search input::placeholder { color: var(--pl-text-4); }

829 

830.pl-tags { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }

831.pl-tag {

832 padding: 7px 14px; border: 1px solid var(--pl-border); background: var(--pl-bg);

833 font-size: 14px; color: var(--pl-text-2); border-radius: 999px;

834}

835.pl-tag:hover { background: var(--pl-surface); }

836.pl-tag.pl-on { background: var(--pl-text); border-color: var(--pl-text); color: var(--pl-bg); }

837.pl-tag.pl-start { color: var(--pl-accent); font-weight: 500; }

838.pl-tag.pl-start.pl-on { background: var(--pl-accent); border-color: var(--pl-accent); color: #fff; }

839.pl-tags.pl-dim .pl-tag { opacity: 0.5; }

840.pl-tags.pl-dim .pl-tag:hover { opacity: 1; }

841.pl-sep { width: 1px; height: 22px; background: var(--pl-border); margin: 0 4px; }

842.pl-clear { border: none; background: none; font-size: 13px; color: var(--pl-text-4); padding: 4px 6px; }

843.pl-clear:hover { color: var(--pl-text-2); }

844.pl-count { margin-left: auto; font-size: 14px; color: var(--pl-text-4); }

845 

846.pl-group-h {

847 font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;

848 color: var(--pl-text-4); margin: 24px 0 12px;

849}

850.pl-group-h .pl-phase { color: var(--pl-text-3); }

851.pl-card {

852 border: 1px solid var(--pl-border-subtle); border-radius: 10px;

853 margin-bottom: 12px; background: var(--pl-bg); overflow: hidden;

854 padding: 14px 18px;

855}

856.pl-card.pl-open { border-color: var(--pl-border); background: var(--pl-surface); }

857.pl-head {

858 width: 100%; display: flex; align-items: baseline; gap: 12px;

859 border: none; background: transparent; text-align: left; padding: 0;

860}

861.pl-head:focus-visible { outline: 2px solid var(--pl-accent); outline-offset: 2px; border-radius: 6px; }

862.pl-title {

863 flex: 1; font-size: 17px; font-weight: 500; color: var(--pl-text);

864 white-space: nowrap; overflow: hidden; text-overflow: ellipsis;

865}

866.pl-prompt-preview {

867 display: block; font-family: var(--pl-mono); font-size: 13.5px; color: var(--pl-text-3);

868 margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;

869}

870.pl-chip {

871 font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase;

872 padding: 3px 9px; border-radius: 999px; flex-shrink: 0;

873 background: var(--pl-accent-bg); color: var(--pl-accent);

874}

875 

876.pl-body { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--pl-border-subtle); }

877.pl-label {

878 font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase;

879 color: var(--pl-text-4); margin: 12px 0 8px;

880}

881.pl-prompt-box {

882 display: flex; align-items: center; gap: 10px;

883 padding: 14px 16px; background: #141413; color: #f0eee6;

884 border-radius: 8px; font-family: var(--pl-mono); font-size: 15px;

885}

886.pl-caret { color: var(--pl-accent); flex-shrink: 0; }

887.pl-prompt-box code { flex: 1; background: none; padding: 0; color: inherit; white-space: pre-wrap; line-height: 1.9; }

888.pl-slot {

889 font-family: var(--pl-mono); font-size: inherit;

890 background: rgba(217,119,87,0.15); color: #f0eee6;

891 border: none; border-bottom: 1.5px dashed var(--pl-accent);

892 border-radius: 4px 4px 0 0; padding: 2px 6px; margin: 0 1px;

893 outline: none; min-width: 6ch; max-width: 100%;

894 box-sizing: content-box; cursor: text;

895}

896.pl-slot:hover { background: rgba(217,119,87,0.22); }

897.pl-slot:focus { background: rgba(217,119,87,0.28); border-bottom-style: solid; }

898.pl-slot::placeholder { color: rgba(240,238,230,0.4); font-style: italic; }

899.pl-hint { font-size: 14px; color: var(--pl-text-3); margin: 0 0 10px; }

900.pl-paste { color: var(--pl-text-2); }

901.pl-needs { color: var(--pl-text-2); }

902.pl-needs-label {

903 display: inline-block; font-size: 10.5px; letter-spacing: 0.06em;

904 text-transform: uppercase; padding: 2px 7px; margin-right: 6px;

905 border-radius: 4px; background: var(--pl-accent-bg); color: var(--pl-accent);

906}

907.pl-hint-chip {

908 font-family: var(--pl-mono); font-size: 0.92em;

909 background: var(--pl-accent-bg); color: var(--pl-accent);

910 border-bottom: 1.5px dashed var(--pl-accent);

911 border-radius: 3px 3px 0 0; padding: 1px 5px;

912}

913.pl-copy {

914 font-size: 12.5px; padding: 6px 12px; border-radius: 6px;

915 background: var(--pl-accent); color: #fff; border: none; flex-shrink: 0;

916}

917.pl-teaches { display: block; font-size: 15.5px; color: var(--pl-text-2); margin: 4px 0 0; line-height: 1.6; }

918.pl-match {

919 display: block; font-size: 13.5px; color: var(--pl-text-3);

920 margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;

921}

922.pl-match mark { background: var(--pl-accent-bg); color: var(--pl-text); padding: 1px 2px; border-radius: 3px; }

923.pl-next {

924 display: flex; align-items: baseline; gap: 10px;

925 margin: 14px 0 0; padding: 10px 12px;

926 background: var(--pl-accent-bg); border-radius: 8px; font-size: 14.5px;

927}

928.pl-next-label {

929 font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;

930 color: var(--pl-accent); font-weight: 600; flex-shrink: 0;

931}

932.pl-src { display: block; font-size: 14px; color: var(--pl-text-4); margin: 14px 0 0; }

933 

934.pl-show-all {

935 display: block; width: 100%; padding: 14px; margin-top: 4px;

936 border: 1px dashed var(--pl-border); border-radius: 10px;

937 background: transparent; font-size: 15px; color: var(--pl-accent);

938 text-align: center;

939}

940.pl-show-all:hover { background: var(--pl-accent-bg); border-style: solid; }

941 

942.pl-empty {

943 padding: 32px; text-align: center; color: var(--pl-text-4);

944 border: 1px dashed var(--pl-border); border-radius: 10px;

945}

946`, []);

947 if (!mounted) return <div className="pl" style={{

948 minHeight: 480

949 }} />;

950 return <div className="pl">

951 <style>{STYLES}</style>

952 

953 <div className="pl-search">

954 <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" style={{

955 color: 'var(--pl-text-4)'

956 }}>

957 <circle cx="11" cy="11" r="7" /><line x1="21" y1="21" x2="16.65" y2="16.65" />

958 </svg>

959 <input type="text" placeholder={L.search} value={q} onChange={e => {

960 setQ(e.target.value);

961 if (e.target.value) setStart(false);

962 }} aria-label={L.search} />

963 </div>

964 

965 <div className={'pl-tags' + (ql ? ' pl-dim' : '')}>

966 <button type="button" className={'pl-tag pl-start' + (!ql && start ? ' pl-on' : '')} onClick={() => {

967 setQ('');

968 setStart(!start);

969 if (!start) setSel(null);

970 }}>

971 ★ {L.startHere}

972 </button>

973 <span className="pl-sep" />

974 {TAGS.map(k => <button key={k} type="button" aria-pressed={!ql && sel === k} className={'pl-tag' + (!ql && sel === k ? ' pl-on' : '')} onClick={() => {

975 setQ('');

976 toggleTag(k);

977 }}>

978 {TL(k)}

979 </button>)}

980 {(start || sel || q) && <button type="button" className="pl-clear" onClick={clear}>{L.clear}</button>}

981 <span className="pl-count">{results.length} {results.length === 1 ? L.prompt : L.prompts}</span>

982 </div>

983 

984 {results.length === 0 ? <div className="pl-empty">

985 {L.noMatch} {ql ? <code>{q}</code> : null} <button type="button" className="pl-clear" onClick={clear}>{L.clear}</button>

986 </div> : !ql && start ? <div>

987 <div className="pl-group-h">{L.startHereHeader}</div>

988 {results.map(card)}

989 <button type="button" className="pl-show-all" onClick={clear}>

990 {L.showAll && L.showAll.replace('{n}', PROMPTS.length)} →

991 </button>

992 </div> : grouped.map(g => <div key={g.sdlc + '|' + g.cat}>

993 <div className="pl-group-h"><span className="pl-phase">{phaseLabels[g.sdlc] || g.sdlc}</span> · {catLabels[g.cat] || g.cat}</div>

994 {g.items.map(card)}

995 </div>)}

996 </div>;

997};

998 

9This is a library of prompts to copy into Claude Code. Use it to explore ways of working you haven't tried, or when you're not sure where to start.999This is a library of prompts to copy into Claude Code. Use it to explore ways of working you haven't tried, or when you're not sure where to start.

10 1000 

11The prompts are collected from various Anthropic guides, including [Common workflows](/en/common-workflows), [Best practices](/en/best-practices), and [How Anthropic teams use Claude Code](https://claude.com/blog/how-anthropic-teams-use-claude-code). They're starting points rather than scripts. Open **Why this works** under any prompt to see the pattern behind it so you can write your own.1001The prompts are collected from various Anthropic guides, including [Common workflows](/en/common-workflows), [Best practices](/en/best-practices), and [How Anthropic teams use Claude Code](https://claude.com/blog/how-anthropic-teams-use-claude-code). They're starting points rather than scripts. Open **Why this works** under any prompt to see the pattern behind it so you can write your own.

12 1002 

1003export const labels = {

1004 startHere: "Start here",

1005 startHereHeader: "Five prompts to try first",

1006 showAll: "Show all {n} prompts",

1007 search: "Search prompts…",

1008 clear: "Clear",

1009 prompt: "prompt",

1010 prompts: "prompts",

1011 noMatch: "No prompts match",

1012 fillAndCopy: "Fill in and copy",

1013 copyThis: "Copy this prompt",

1014 hintBefore: "Type in the",

1015 hintChip: "highlighted",

1016 hintAfter: "fields to customize, then copy.",

1017 copy: "Copy",

1018 copied: "Copied",

1019 whyWorks: "Why this works",

1020 makeItStick: "Make it stick",

1021 from: "From",

1022 paste: {

1023 mockup: "Paste, drag, or @-mention your mockup image, then send this:",

1024 design: "Paste, drag, or @-mention your design image, then send this:",

1025 screenshot: "Paste, drag, or @-mention your screenshot, then send this:",

1026 plan: "Paste your plan output into the prompt first, then send this:",

1027 error: "Paste the error output into the prompt first, then send this:",

1028 csv: "Drag your file into the prompt, or replace the path below with an @-mention of your own:"

1029 },

1030 needsLabel: "Needs",

1031 needs: {

1032 tracker: "your issue tracker added as a [claude.ai connector](/en/mcp#use-mcp-servers-from-claude-ai) or [MCP server](/en/mcp).",

1033 gh: "the [gh CLI](https://cli.github.com) authenticated, or GitHub added as a [claude.ai connector](/en/mcp#use-mcp-servers-from-claude-ai).",

1034 browser: "a way for Claude to render and screenshot the result. The [Desktop app](/en/desktop#preview-your-app) has this built in. In the terminal, install the [Chrome extension](/en/chrome) or a Playwright [MCP](/en/mcp) server.",

1035 db: "your data warehouse or log store added as a [claude.ai connector](/en/mcp#use-mcp-servers-from-claude-ai) or [MCP server](/en/mcp)."

1036 }

1037};

1038 

1039export const tagLabels = {

1040 understand: "Understand",

1041 plan: "Plan",

1042 prototype: "Prototype",

1043 build: "Build",

1044 test: "Test",

1045 refactor: "Refactor",

1046 review: "Review",

1047 steer: "Steer",

1048 debug: "Debug",

1049 git: "Git",

1050 release: "Release",

1051 data: "Data",

1052 automate: "Automate",

1053 pm: "Product",

1054 design: "Design",

1055 docs: "Docs",

1056 marketing: "Marketing",

1057 security: "Security",

1058 ops: "On-call"

1059};

1060 

1061export const phaseLabels = {

1062 discover: "Discover",

1063 design: "Design",

1064 build: "Build",

1065 ship: "Ship",

1066 operate: "Operate"

1067};

1068 

1069export const sourceLabels = {

1070 workflows: "Common workflows",

1071 teams: "How Anthropic teams use Claude Code",

1072 legal: "How Anthropic uses Claude in Legal",

1073 cybersecurity: "How Anthropic uses Claude in Cybersecurity",

1074 "best-practices": "Best practices",

1075 ebook: "Scaling agentic coding guide"

1076};

1077 

1078export const catLabels = {

1079 Onboard: "Onboard",

1080 Understand: "Understand",

1081 Plan: "Plan",

1082 Prototype: "Prototype",

1083 Implement: "Implement",

1084 Test: "Test",

1085 Refactor: "Refactor",

1086 Review: "Review",

1087 Steer: "Steer",

1088 Git: "Git",

1089 Release: "Release",

1090 Debug: "Debug",

1091 Incident: "Incident",

1092 Data: "Data",

1093 Automate: "Automate"

1094};

1095 

1096export const text = {

1097 "get-oriented-in-a": {

1098 title: "Get oriented in a new repository",

1099 teaches: "Describe what you want to know, not which files to read. Claude explores the project on its own and returns a summary of how it fits together.",

1100 next: "Run `/init` to set up `CLAUDE.md` so Claude remembers this every session"

1101 },

1102 "explain-unfamiliar-code": {

1103 title: "Explain unfamiliar code",

1104 teaches: "Name the file and say what format you want the answer in. Swap the HTML page for a diagram, bullet points, or whatever fits how you learn.",

1105 next: "Set an output style so Claude always explains in your preferred format"

1106 },

1107 "find-where-something-happens": {

1108 title: "Find where something happens",

1109 teaches: "Search by behavior instead of by filename. The search works even when you don't know what the file is called or which directory it lives in."

1110 },

1111 "see-what-depends-on": {

1112 title: "Check what breaks before you delete",

1113 teaches: "Ask before you remove anything. The list of callers and downstream effects tells you whether you're looking at a one-line cleanup or a change you need to coordinate."

1114 },

1115 "trace-how-code-evolved": {

1116 title: "Trace how code evolved",

1117 teaches: "Point at commit history when the question is why, not what. Claude reads the log and blame for whatever version control you use and explains the decisions behind the current implementation."

1118 },

1119 "scope-a-change-before": {

1120 title: "Scope a change before you start",

1121 teaches: "Size the work before you commit it to a roadmap. The file list tells you whether you're looking at one component or a cross-cutting change."

1122 },

1123 "ask-the-codebase-a": {

1124 title: "Ask the codebase a product question",

1125 teaches: "State your role so the answer is pitched at the right level. Claude explains what the product actually does from the source code, without you needing to read it.",

1126 next: "Set an output style so Claude always pitches answers at this level"

1127 },

1128 "plan-a-multi-file": {

1129 title: "Plan a multi-file change before touching code",

1130 teaches: "Adding \"don't edit yet\" separates exploration from changes, so you see the approach before any code moves. To make plan-first the default on every prompt, press Shift+Tab for [plan mode](/en/permission-modes#analyze-before-you-edit-with-plan-mode)."

1131 },

1132 "draft-a-spec-by": {

1133 title: "Draft a spec by interview",

1134 teaches: "Ask to be interviewed instead of writing the spec yourself. Claude asks you structured questions until the requirements are complete, then writes the result to a file.",

1135 next: "Save your interview questions as a `/spec` skill so every spec starts the same way"

1136 },

1137 "turn-a-meeting-into": {

1138 title: "Turn a meeting into tickets",

1139 teaches: "Skip the transcription step. Claude pulls action items from the unstructured input and writes them straight into your tracker via [MCP](/en/mcp), so you review the tickets, not the transcript.",

1140 next: "Save this as a `/tickets` skill"

1141 },

1142 "map-edge-cases-before": {

1143 title: "Map edge cases before building",

1144 teaches: "Ask for what's missing, not what's there. Claude lists the error states, empty states, and edge cases a happy-path design tends to skip."

1145 },

1146 "turn-a-mockup-into": {

1147 title: "Turn a mockup into a working prototype",

1148 teaches: "A clickable prototype answers questions a static mockup can't. Hand the working code to engineering instead of explaining the interactions in a doc."

1149 },

1150 "implement-from-a-screenshot": {

1151 title: "Implement from a screenshot and self-check",

1152 teaches: "This gives Claude a verification loop: it renders, compares against the source image, and iterates without you pointing out each gap.",

1153 next: "Use `/goal` to keep Claude iterating until the screenshots match"

1154 },

1155 "follow-an-existing-pattern": {

1156 title: "Follow an existing pattern",

1157 teaches: "Point at code you already like. Without a reference, Claude defaults to general best practices. With one, it matches the conventions your codebase actually uses.",

1158 next: "Ask Claude to write the pattern it followed into `CLAUDE.md` so future sessions match it without the reference"

1159 },

1160 "add-a-small-well": {

1161 title: "Add a small, well-defined feature",

1162 teaches: "State the inputs and outputs, not how to build it. Claude finds where similar code lives and adds yours alongside it."

1163 },

1164 "build-a-small-internal": {

1165 title: "Build a small internal tool from scratch",

1166 teaches: "You don't need a project, a framework, or a build step. Describe the tool and ask Claude to open it so you see it working immediately."

1167 },

1168 "work-an-issue-end": {

1169 title: "Work an issue end to end",

1170 teaches: "Give the issue number, not a summary. Claude reads the full ticket itself, so requirements you'd forget to mention come through, and it validates the change before reporting back."

1171 },

1172 "find-and-update-copy": {

1173 title: "Find and update copy across the codebase",

1174 teaches: "Ask for variants and say what to skip. Claude finds phrasings a literal search would miss and leaves test fixtures and history untouched, so you review only the copy users actually see."

1175 },

1176 "draft-from-past-examples": {

1177 title: "Draft a document from past examples",

1178 teaches: "Point at a folder of finished work instead of describing your style. Claude learns the structure and voice from what you've already shipped, so the first draft reads like one of yours.",

1179 next: "Save the voice as a skill so every draft starts there"

1180 },

1181 "write-tests-run-them": {

1182 title: "Write tests, run them, fix failures",

1183 teaches: "Ask for write, run, and fix together so Claude iterates without stopping for instructions.",

1184 next: "Run `/init` so Claude learns your test command automatically"

1185 },

1186 "drive-implementation-from-tests": {

1187 title: "Drive implementation from tests",

1188 teaches: "Test-driven development: the tests define when the work is complete, and Claude iterates on the implementation until they pass."

1189 },

1190 "fill-gaps-from-a": {

1191 title: "Fill gaps from a coverage report",

1192 teaches: "Point at the coverage report instead of guessing what's untested. Claude reads the actual numbers and writes tests for the files that need them most.",

1193 next: "Set this as a `/goal` so Claude keeps writing tests until coverage hits the target"

1194 },

1195 "port-code-between-languages": {

1196 title: "Port code to another language",

1197 teaches: "Say what to preserve, not just the target language. Naming the API or behavior that must stay the same gives Claude a contract to check the port against."

1198 },

1199 "generate-docs-for-code": {

1200 title: "Generate docs for undocumented code",

1201 teaches: "Name the scope and the format. Claude finds what's missing and matches the comment style already in the file, so the new docs read like the rest."

1202 },

1203 "migrate-a-pattern-across": {

1204 title: "Migrate a pattern across the codebase",

1205 teaches: "Describe the old pattern and the new one. Asking Claude to identify every place first means the call sites are listed in the response, so you can check none were missed."

1206 },

1207 "optimize-against-a-measurable": {

1208 title: "Optimize against a measurable target",

1209 teaches: "Stating the metric and target gives Claude a clear definition of done.",

1210 next: "Set this as a `/goal` so Claude keeps measuring and iterating until it hits the number"

1211 },

1212 "fix-a-precise-visual": {

1213 title: "Fix a precise visual bug",

1214 teaches: "Precise visual feedback gets a precise fix. State the exact element, measurement, and viewport.",

1215 next: "Add a preview tool so Claude screenshots and verifies the fix itself"

1216 },

1217 "review-your-changes-before": {

1218 title: "Review your changes before you commit",

1219 teaches: "Catch problems while they're still cheap to fix. Claude reads the changed files in full, not just the diff lines, so it spots issues a quick self-review misses.",

1220 next: "Run `/code-review` for the same check in one command"

1221 },

1222 "review-a-pull-request": {

1223 title: "Review a pull request",

1224 teaches: "Claude reviews with the whole codebase in context, not just the diff. It reads the changed code and what it calls, so it catches problems a diff-only review would miss.",

1225 next: "Turn this on for every PR with Code Review"

1226 },

1227 "review-infrastructure-changes-before": {

1228 title: "Review infrastructure changes before applying",

1229 teaches: "Plan output is dense and hard to scan. Pasting it gets you a plain-language summary of what's actually going to change before you apply it."

1230 },

1231 "run-a-security-review": {

1232 title: "Run a security review with a subagent",

1233 teaches: "A [subagent](/en/sub-agents) runs the audit in its own context window and reports back a summary, so a long security review doesn't fill up your main session. The built-in general-purpose subagent handles this without extra setup.",

1234 next: "Set up a dedicated security-review subagent your whole team can use"

1235 },

1236 "review-content-before-sending": {

1237 title: "Catch issues before formal review",

1238 teaches: "Get a first pass before a human spends time on it. Name the concerns you want checked so the review is focused, then fix what it finds and send a cleaner draft.",

1239 next: "Capture your review checklist as a skill your whole team can run"

1240 },

1241 "course-correct-a-wrong": {

1242 title: "Course-correct a wrong approach",

1243 teaches: "Name the constraint Claude missed, not just that it's wrong. A specific reason gives Claude a concrete constraint to satisfy on the retry, instead of guessing again.",

1244 next: "Press `Esc` twice to open the rewind menu and restore code and conversation so the retry starts clean"

1245 },

1246 "narrow-the-scope-of": {

1247 title: "Narrow the scope of a change",

1248 teaches: "When the direction is right but the change went too broad, ask Claude to keep part of it rather than rewinding everything. A stated boundary keeps a small fix from becoming a refactor."

1249 },

1250 "turn-a-correction-into": {

1251 title: "Turn a correction into a rule",

1252 teaches: "A correction in chat isn't shared with your team. A rule in the project's [CLAUDE.md](/en/memory) is shared once you commit it, and Claude reads it at the start of every session.",

1253 next: "Open `/memory` to review what Claude wrote"

1254 },

1255 "resolve-merge-conflicts": {

1256 title: "Resolve merge conflicts",

1257 teaches: "Say what state you want, not which markers to keep. Asking for the reasoning makes the merge reviewable instead of a black box."

1258 },

1259 "commit-with-a-generated": {

1260 title: "Commit with a generated message",

1261 teaches: "Let Claude derive the message from the diff. It matches your repository's existing commit style."

1262 },

1263 "open-a-pull-request": {

1264 title: "Open a pull request from a ticket",

1265 teaches: "Skip the context switch between tracker, editor, and GitHub. One prompt reads the spec, makes the change, and opens the PR."

1266 },

1267 "draft-release-notes-from": {

1268 title: "Draft release notes from git history",

1269 teaches: "Give two reference points and the structure you want. Claude reads the commit log between them and drafts a changelog you can edit.",

1270 next: "Save this as a `/changelog` skill"

1271 },

1272 "write-a-ci-workflow": {

1273 title: "Write a CI workflow",

1274 teaches: "Describe when it should run and what it should do; the YAML is generated for you, matched to your project's build and test commands."

1275 },

1276 "find-and-fix-a": {

1277 title: "Find and fix a failing test",

1278 teaches: "Describe the symptom; you don't need to know which file is broken. Claude runs the test to see the failure, traces it into source, and fixes it."

1279 },

1280 "investigate-a-reported-error": {

1281 title: "Investigate a reported error",

1282 teaches: "Describe the symptom and location; Claude reads the relevant code path and traces likely causes. Paste stack traces or logs if you have them.",

1283 next: "Put a deeplink in your runbook that opens Claude with this prompt pre-filled"

1284 },

1285 "fix-a-build-error": {

1286 title: "Fix a build error at the root",

1287 teaches: "Asking for root cause and verification prevents surface-level patches that suppress the error without fixing it."

1288 },

1289 "investigate-a-production-incident": {

1290 title: "Investigate a production incident",

1291 teaches: "List the evidence sources to correlate, not the steps to take. Claude reads logs, git history, and config together to narrow the cause.",

1292 next: "Connect Sentry or your log store via MCP"

1293 },

1294 "query-logs-in-plain": {

1295 title: "Query logs in plain English",

1296 teaches: "Ask the question instead of writing the SQL. Claude builds the query, runs it against your connected logs, and shows both the query and the result so you can check what ran."

1297 },

1298 "diagnose-from-a-console": {

1299 title: "Diagnose from a console screenshot",

1300 teaches: "Cloud consoles show you the problem but not the commands to fix it. Claude reads the screenshot and translates the dashboard into the kubectl, gcloud, or aws commands to run."

1301 },

1302 "analyze-a-data-file": {

1303 title: "Analyze a data file",

1304 teaches: "A one-off question doesn't need a one-off script. Point at a file in your project folder and Claude reads it directly, finds the patterns, and writes the output where you ask.",

1305 next: "Connect the data source via MCP instead of exporting files"

1306 },

1307 "generate-variations-from-performance": {

1308 title: "Generate variations from performance data",

1309 teaches: "State the constraint at the start so generation stays within the limit. Claude reads the metrics, picks what to replace, and produces alternatives that fit.",

1310 next: "Connect the ad platform via MCP instead of exporting a file"

1311 },

1312 "turn-a-recurring-task": {

1313 title: "Turn a recurring task into a skill",

1314 teaches: "Name the steps once; reuse them as a command. Claude writes a [skill](/en/skills) anyone on your team can run."

1315 },

1316 "add-a-hook-for": {

1317 title: "Add a hook for repeat behavior",

1318 teaches: "Hooks make a behavior automatic instead of something you have to remember to ask for. Describe the trigger and action and Claude writes the [hook](/en/hooks) configuration."

1319 },

1320 "connect-a-tool-with": {

1321 title: "Connect a tool with MCP",

1322 teaches: "Connect the source once instead of pasting data every session. After [MCP](/en/mcp) setup, Claude reads from the tool directly when you ask about it."

1323 },

1324 "capture-what-to-remember": {

1325 title: "Capture what to remember for next time",

1326 teaches: "Ask before you forget. Claude knows what it had to figure out this session and proposes [CLAUDE.md](/en/memory) entries so the next session starts with that context."

1327 }

1328};

1329 

1330<PromptLibrary text={text} labels={labels} tagLabels={tagLabels} phaseLabels={phaseLabels} sourceLabels={sourceLabels} catLabels={catLabels} />

1331 

13## What makes these prompts work1332## What makes these prompts work

14 1333 

15The prompts above share a few patterns. Recognizing them helps you adapt any prompt here to your own task.1334The prompts above share a few patterns. Recognizing them helps you adapt any prompt here to your own task.

settings.md +2 −1

Details

280| `requiredMaximumVersion` | Managed settings only. Maximum Claude Code version allowed to start. If the running version is newer, Claude Code exits at startup and instructs the user to install an approved version through the organization's approved method; `claude install <version>` may also work. Background auto-updates and `claude update` skip versions above the ceiling, so an in-range installation stays in range. `claude update`, `claude install`, and `claude doctor` keep working above the ceiling so users can recover. Versions that predate this setting ignore it | `"2.1.150"` |280| `requiredMaximumVersion` | Managed settings only. Maximum Claude Code version allowed to start. If the running version is newer, Claude Code exits at startup and instructs the user to install an approved version through the organization's approved method; `claude install <version>` may also work. Background auto-updates and `claude update` skip versions above the ceiling, so an in-range installation stays in range. `claude update`, `claude install`, and `claude doctor` keep working above the ceiling so users can recover. Versions that predate this setting ignore it | `"2.1.150"` |

281| `requiredMinimumVersion` | Managed settings only. Minimum Claude Code version required to start. If the running version is older, Claude Code exits at startup and instructs the user to update through the organization's approved method. `claude update`, `claude install`, and `claude doctor` keep working below the floor so users can recover. Differs from `minimumVersion`, which prevents downgrades but never blocks startup. Versions that predate this setting ignore it | `"2.1.150"` |281| `requiredMinimumVersion` | Managed settings only. Minimum Claude Code version required to start. If the running version is older, Claude Code exits at startup and instructs the user to update through the organization's approved method. `claude update`, `claude install`, and `claude doctor` keep working below the floor so users can recover. Differs from `minimumVersion`, which prevents downgrades but never blocks startup. Versions that predate this setting ignore it | `"2.1.150"` |

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

283| `respondToBashCommands` | {/* min-version: 2.1.186 */}Whether Claude responds after an input-box `!` shell command runs. Set to `false` to add the command output to context without a response. Default: `true`. See [Shell mode with `!` prefix](/en/interactive-mode#shell-mode-with-prefix). Requires Claude Code v2.1.186 or later | `false` |

283| `showClearContextOnPlanAccept` | Show the "clear context" option on the plan accept screen. Defaults to `false`. Set to `true` to restore the option | `true` |284| `showClearContextOnPlanAccept` | Show the "clear context" option on the plan accept screen. Defaults to `false`. Set to `true` to restore the option | `true` |

284| `showThinkingSummaries` | Show [extended thinking](/en/model-config#extended-thinking) summaries in interactive sessions. When unset or `false` (default in interactive mode), thinking blocks are redacted by the API and shown as a collapsed stub. Redaction only changes what you see, not what the model generates: to reduce thinking spend, [lower the budget or disable thinking](/en/model-config#extended-thinking) instead. This setting has no effect in non-interactive mode (`-p`), the Agent SDK, or IDE extensions such as VS Code | `true` |285| `showThinkingSummaries` | Show [extended thinking](/en/model-config#extended-thinking) summaries in interactive sessions. When unset or `false` (default in interactive mode), thinking blocks are redacted by the API and shown as a collapsed stub. Redaction only changes what you see, not what the model generates: to reduce thinking spend, [lower the budget or disable thinking](/en/model-config#extended-thinking) instead. This setting has no effect in non-interactive mode (`-p`), the Agent SDK, or IDE extensions such as VS Code | `true` |

285| `showTurnDuration` | Show turn duration messages after responses, e.g. "Cooked for 1m 6s". Default: `true`. Appears in `/config` as **Show turn duration** | `false` |286| `showTurnDuration` | Show turn duration messages after responses, e.g. "Cooked for 1m 6s". Default: `true`. Appears in `/config` as **Show turn duration** | `false` |


294| `strictKnownMarketplaces` | (Managed settings only) Allowlist of plugin marketplace sources. Undefined = no restrictions, empty array = lockdown. Enforced on marketplace add and on plugin install, update, refresh, and auto-update, so a marketplace added before the policy was set cannot be used to fetch plugins. See [Managed marketplace restrictions](/en/plugin-marketplaces#managed-marketplace-restrictions) | `[{ "source": "github", "repo": "acme-corp/plugins" }]` |295| `strictKnownMarketplaces` | (Managed settings only) Allowlist of plugin marketplace sources. Undefined = no restrictions, empty array = lockdown. Enforced on marketplace add and on plugin install, update, refresh, and auto-update, so a marketplace added before the policy was set cannot be used to fetch plugins. See [Managed marketplace restrictions](/en/plugin-marketplaces#managed-marketplace-restrictions) | `[{ "source": "github", "repo": "acme-corp/plugins" }]` |

295| `strictPluginOnlyCustomization` | (Managed settings only) Block skills, agents, hooks, and MCP servers from user and project sources, so they can only come from plugins or managed settings. `true` locks all four surfaces; an array locks only the named ones. See [`strictPluginOnlyCustomization`](#strictpluginonlycustomization) | `["skills", "hooks"]` |296| `strictPluginOnlyCustomization` | (Managed settings only) Block skills, agents, hooks, and MCP servers from user and project sources, so they can only come from plugins or managed settings. `true` locks all four surfaces; an array locks only the named ones. See [`strictPluginOnlyCustomization`](#strictpluginonlycustomization) | `["skills", "hooks"]` |

296| `syntaxHighlightingDisabled` | Disable syntax highlighting in diffs, code blocks, and file previews | `true` |297| `syntaxHighlightingDisabled` | Disable syntax highlighting in diffs, code blocks, and file previews | `true` |

297| `teammateMode` | How [agent team](/en/agent-teams) teammates display: `in-process` (the default), `auto` (split panes when running inside tmux or iTerm2, in-process otherwise), or `tmux` (split panes using tmux or iTerm2, detected from your terminal). The default changed from `auto` in v2.1.179. `--teammate-mode` overrides this for one session. See [choose a display mode](/en/agent-teams#choose-a-display-mode) | `"auto"` |298| `teammateMode` | How [agent team](/en/agent-teams) teammates display: `in-process` (the default), `auto` (split panes when running inside tmux or iTerm2, in-process otherwise), `tmux` (split panes using tmux or iTerm2, detected from your terminal), or {/* min-version: 2.1.186 */}`iterm2` (iTerm2 native split panes via the `it2` CLI, added in v2.1.186). The default changed from `auto` in v2.1.179. `--teammate-mode` overrides this for one session. See [choose a display mode](/en/agent-teams#choose-a-display-mode) | `"auto"` |

298| `terminalProgressBarEnabled` | Show the terminal progress bar in supported terminals: ConEmu, Ghostty 1.2.0+, and iTerm2 3.6.6+. Default: `true`. Appears in `/config` as **Terminal progress bar** | `false` |299| `terminalProgressBarEnabled` | Show the terminal progress bar in supported terminals: ConEmu, Ghostty 1.2.0+, and iTerm2 3.6.6+. Default: `true`. Appears in `/config` as **Terminal progress bar** | `false` |

299| `theme` | {/* min-version: 2.1.119 */}Color theme for the interface: `"auto"`, `"dark"`, `"light"`, `"dark-daltonized"`, `"light-daltonized"`, `"dark-ansi"`, `"light-ansi"`, or a custom theme reference such as `"custom:<slug>"` or `"custom:<plugin-name>:<slug>"`. Default: `"dark"`. See [Create a custom theme](/en/terminal-config#create-a-custom-theme). Appears in `/config` as **Theme** | `"dark"` |300| `theme` | {/* min-version: 2.1.119 */}Color theme for the interface: `"auto"`, `"dark"`, `"light"`, `"dark-daltonized"`, `"light-daltonized"`, `"dark-ansi"`, `"light-ansi"`, or a custom theme reference such as `"custom:<slug>"` or `"custom:<plugin-name>:<slug>"`. Default: `"dark"`. See [Create a custom theme](/en/terminal-config#create-a-custom-theme). Appears in `/config` as **Theme** | `"dark"` |

300| `tui` | Terminal UI renderer. Use `"fullscreen"` for the flicker-free [alt-screen renderer](/en/fullscreen) with virtualized scrollback. Use `"default"` for the classic main-screen renderer. Set via `/tui`. You can also set the [`CLAUDE_CODE_NO_FLICKER`](/en/env-vars) environment variable. Background sessions opened from [agent view](/en/agent-view) always use the fullscreen renderer regardless of this setting | `"fullscreen"` |301| `tui` | Terminal UI renderer. Use `"fullscreen"` for the flicker-free [alt-screen renderer](/en/fullscreen) with virtualized scrollback. Use `"default"` for the classic main-screen renderer. Set via `/tui`. You can also set the [`CLAUDE_CODE_NO_FLICKER`](/en/env-vars) environment variable. Background sessions opened from [agent view](/en/agent-view) always use the fullscreen renderer regardless of this setting | `"fullscreen"` |

skills.md +2 −0

Details

8223. Try rephrasing your request to match the description more closely8223. Try rephrasing your request to match the description more closely

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

824 824 

825If the frontmatter YAML is malformed, Claude Code loads the skill body with empty metadata, so `/skill-name` still works but Claude has no `description` to match against. Run with `--debug` to see the parse error.

826 

825### Skill triggers too often827### Skill triggers too often

826 828 

827If Claude uses your skill when you don't want it:829If Claude uses your skill when you don't want it:

sub-agents.md +5 −7

Details

715Subagents can run in the foreground (blocking) or background (concurrent):715Subagents can run in the foreground (blocking) or background (concurrent):

716 716 

717* **Foreground subagents** block the main conversation until complete. Permission prompts are passed through to you as they come up.717* **Foreground subagents** block the main conversation until complete. Permission prompts are passed through to you as they come up.

718* **Background subagents** run concurrently while you continue working. They run with the permissions already granted in the session and auto-deny any tool call that would otherwise prompt. If a background subagent needs to ask clarifying questions, that tool call fails but the subagent continues.718* **Background subagents** run concurrently while you continue working. {/* min-version: 2.1.186 */}As of v2.1.186, when a background subagent reaches a tool call that needs permission, the prompt surfaces in your main session and names the subagent that is asking. Approve to let the subagent continue, or press Esc to deny that one tool call without stopping the subagent. Before v2.1.186, background subagents auto-denied any tool call that would have prompted.

719 

720If a background subagent fails due to missing permissions, you can start a new foreground subagent with the same task to retry with interactive prompts.

721 719 

722Claude decides whether to run subagents in the foreground or background based on the task. You can also:720Claude decides whether to run subagents in the foreground or background based on the task. You can also:

723 721 


726 724 

727To disable all background task functionality, set the `CLAUDE_CODE_DISABLE_BACKGROUND_TASKS` environment variable to `1`. See [Environment variables](/en/env-vars).725To disable all background task functionality, set the `CLAUDE_CODE_DISABLE_BACKGROUND_TASKS` environment variable to `1`. See [Environment variables](/en/env-vars).

728 726 

729When [`CLAUDE_CODE_FORK_SUBAGENT`](#fork-the-current-conversation) is set to `1`, every subagent spawn runs in the background regardless of the `background` field. Forks still surface permission prompts in your terminal as they occur; named subagents auto-deny anything that would prompt, as described above.727When [`CLAUDE_CODE_FORK_SUBAGENT`](#fork-the-current-conversation) is set to `1`, every subagent spawn runs in the background regardless of the `background` field. Permission prompts from these background subagents surface in your main session as described above.

730 728 

731### Common patterns729### Common patterns

732 730 


817 815 

818Resumed subagents retain their full conversation history, including all previous tool calls, results, and reasoning. The subagent picks up exactly where it stopped rather than starting fresh.816Resumed subagents retain their full conversation history, including all previous tool calls, results, and reasoning. The subagent picks up exactly where it stopped rather than starting fresh.

819 817 

820When a subagent completes, Claude receives its agent ID. The built-in Explore and Plan agents are one-shot and return no agent ID, so they can't be resumed; use `general-purpose` or a custom subagent when you need to continue the work. Claude uses the `SendMessage` tool with the agent's ID as the `to` field to resume it. The `SendMessage` tool is only available when [agent teams](/en/agent-teams) are enabled via `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1`.818When a subagent completes, Claude receives its agent ID. The built-in Explore and Plan agents are one-shot and return no agent ID, so they can't be resumed; use `general-purpose` or a custom subagent when you need to continue the work. Claude uses the `SendMessage` tool with the agent's ID as the `to` field to resume it. The `SendMessage` tool is always available for resuming subagents by agent ID or name. Structured team-protocol messages such as `shutdown_request` and `plan_approval_response` require [agent teams](/en/agent-teams) to be enabled.

821 819 

822To resume a subagent, ask Claude to continue the previous work:820To resume a subagent, ask Claude to continue the previous work:

823 821 


897A fork inherits everything the main session has at the moment it spawns. A named subagent starts from its own definition.895A fork inherits everything the main session has at the moment it spawns. A named subagent starts from its own definition.

898 896 

899| | Fork | Named subagent |897| | Fork | Named subagent |

900| :---------------------- | :------------------------------- | :--------------------------------------------------------------------------------------- |898| :---------------------- | :------------------------------- | :---------------------------------------------------------------------------------------------------------------- |

901| Context | Full conversation history | Fresh context with the prompt you pass |899| Context | Full conversation history | Fresh context with the prompt you pass |

902| System prompt and tools | Same as main session | From the subagent's [definition file](#write-subagent-files) |900| System prompt and tools | Same as main session | From the subagent's [definition file](#write-subagent-files) |

903| Model | Same as main session | From the subagent's `model` field |901| Model | Same as main session | From the subagent's `model` field |

904| Permissions | Prompts surface in your terminal | [Auto-denied](#run-subagents-in-foreground-or-background) when running in the background |902| Permissions | Prompts surface in your terminal | [Prompts surface in your main session](#run-subagents-in-foreground-or-background) when running in the background |

905| Prompt cache | Shared with main session | Separate cache |903| Prompt cache | Shared with main session | Separate cache |

906 904 

907Because a fork's system prompt and tool definitions are identical to the parent, its first request reuses the parent's [prompt cache](/en/prompt-caching#subagents-and-the-cache). This makes forking cheaper than spawning a fresh subagent for tasks that need the same context.905Because a fork's system prompt and tool definitions are identical to the parent, its first request reuses the parent's [prompt cache](/en/prompt-caching#subagents-and-the-cache). This makes forking cheaper than spawning a fresh subagent for tasks that need the same context.

Details

36| `ReadMcpResourceTool` | Reads a specific MCP resource by URI | No |36| `ReadMcpResourceTool` | Reads a specific MCP resource by URI | No |

37| `RemoteTrigger` | Creates, updates, runs, and lists [Routines](/en/routines) on claude.ai. Backs the `/schedule` command. {/* plan-availability: feature=routines plans=pro,max,team,enterprise providers=anthropic */}Routines live on claude.ai and require a Pro, Max, Team, or Enterprise plan, so this tool is not accessible from Amazon Bedrock, Google Vertex AI, or Microsoft Foundry | No |37| `RemoteTrigger` | Creates, updates, runs, and lists [Routines](/en/routines) on claude.ai. Backs the `/schedule` command. {/* plan-availability: feature=routines plans=pro,max,team,enterprise providers=anthropic */}Routines live on claude.ai and require a Pro, Max, Team, or Enterprise plan, so this tool is not accessible from Amazon Bedrock, Google Vertex AI, or Microsoft Foundry | No |

38| `ScheduleWakeup` | Reschedules the next iteration of a [self-paced `/loop`](/en/scheduled-tasks#let-claude-choose-the-interval). Claude calls this at the end of each iteration to pick when the next one runs, between one minute and one hour out; you don't call it directly. The pending wakeup appears in `session_crons` in [Stop hook input](/en/hooks#stop-input). {/* plan-availability: feature=loop-dynamic providers=anthropic */}Not available on Amazon Bedrock, Google Vertex AI, or Microsoft Foundry, where a `/loop` prompt with no interval runs on a fixed schedule instead | No |38| `ScheduleWakeup` | Reschedules the next iteration of a [self-paced `/loop`](/en/scheduled-tasks#let-claude-choose-the-interval). Claude calls this at the end of each iteration to pick when the next one runs, between one minute and one hour out; you don't call it directly. The pending wakeup appears in `session_crons` in [Stop hook input](/en/hooks#stop-input). {/* plan-availability: feature=loop-dynamic providers=anthropic */}Not available on Amazon Bedrock, Google Vertex AI, or Microsoft Foundry, where a `/loop` prompt with no interval runs on a fixed schedule instead | No |

39| `SendMessage` | Sends a message to an [agent team](/en/agent-teams) teammate, or [resumes a subagent](/en/sub-agents#resume-subagents) by its agent ID. Stopped subagents auto-resume in the background. Only available when `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` is set | No |39| `SendMessage` | Sends a message to an [agent team](/en/agent-teams) teammate, or [resumes a subagent](/en/sub-agents#resume-subagents) by its agent ID. Stopped subagents auto-resume in the background. Structured team-protocol messages require agent teams | No |

40| `ShareOnboardingGuide` | {/* plan-availability: feature=onboarding-guide-share plans=pro,max,team,enterprise providers=anthropic */}Uploads `ONBOARDING.md` and returns a share link teammates can open in Claude Code. Called from `/team-onboarding` after the guide is written. Available to claude.ai subscribers on Pro, Max, Team, and Enterprise plans | Yes |40| `ShareOnboardingGuide` | {/* plan-availability: feature=onboarding-guide-share plans=pro,max,team,enterprise providers=anthropic */}Uploads `ONBOARDING.md` and returns a share link teammates can open in Claude Code. Called from `/team-onboarding` after the guide is written. Available to claude.ai subscribers on Pro, Max, Team, and Enterprise plans | Yes |

41| `Skill` | Executes a [skill](/en/skills#control-who-invokes-a-skill) within the main conversation | Yes |41| `Skill` | Executes a [skill](/en/skills#control-who-invokes-a-skill) within the main conversation | Yes |

42| `TaskCreate` | Creates a new task in the task list | No |42| `TaskCreate` | Creates a new task in the task list | No |


99Launching the subagent does not itself prompt for permission. The subagent's own tool calls are checked against your permission rules as it runs:99Launching the subagent does not itself prompt for permission. The subagent's own tool calls are checked against your permission rules as it runs:

100 100 

101* **Foreground subagents** show the same permission prompts you would see in the main conversation, at the moment each tool call happens.101* **Foreground subagents** show the same permission prompts you would see in the main conversation, at the moment each tool call happens.

102* **Background subagents** do not show prompts. They run with the permissions already granted in the session and auto-deny any tool call that would otherwise prompt. After a denial, the subagent keeps going without that tool.102* **Background subagents** {/* min-version: 2.1.186 */}surface permission prompts in your main session as of v2.1.186. The prompt names which subagent is asking, and pressing Esc denies that one tool call without stopping the subagent. Before v2.1.186, background subagents auto-denied any tool call that would otherwise prompt and continued without that tool.

103 103 

104To limit what a subagent can reach in the first place, narrow its `tools` field, leave Bash off the list, or set deny rules in your settings, as described in [Control subagent capabilities](/en/sub-agents#control-subagent-capabilities). For more on choosing between foreground and background, see [Run subagents in foreground or background](/en/sub-agents#run-subagents-in-foreground-or-background).104To limit what a subagent can reach in the first place, narrow its `tools` field, leave Bash off the list, or set deny rules in your settings, as described in [Control subagent capabilities](/en/sub-agents#control-subagent-capabilities). For more on choosing between foreground and background, see [Run subagents in foreground or background](/en/sub-agents#run-subagents-in-foreground-or-background).

105 105 

ultrareview.md +13 −12

Details

12 12 

13Ultrareview is a deep code review that runs on Claude Code on the web infrastructure. When you run `/code-review ultra`, Claude Code launches a fleet of reviewer agents in a remote sandbox to find bugs in your branch or pull request.13Ultrareview is a deep code review that runs on Claude Code on the web infrastructure. When you run `/code-review ultra`, Claude Code launches a fleet of reviewer agents in a remote sandbox to find bugs in your branch or pull request.

14 14 

15Compared to a local `/review`, ultrareview offers:15Compared to a local `/code-review` or `/review`, ultrareview offers:

16 16 

17* **Higher signal**: every reported finding is independently reproduced and verified, so the results focus on real bugs rather than style suggestions17* **Higher signal**: every reported finding is independently reproduced and verified, so the results focus on real bugs rather than style suggestions

18* **Broader coverage**: many reviewer agents explore the change in parallel, which surfaces issues that a single-pass review can miss18* **Broader coverage**: a larger fleet of reviewer agents explores the change in parallel, which surfaces issues that a medium-effort local review can miss

19* **No local resource use**: the review runs entirely in a remote sandbox, so your terminal stays free for other work while it runs19* **No local resource use**: the review runs entirely in a remote sandbox, so your terminal stays free for other work while it runs

20 20 

21Ultrareview requires authentication with a Claude.ai account because it runs on Claude Code on the web infrastructure. If you are signed in with an API key only, run `/login` and authenticate with Claude.ai first. Ultrareview is not available when using Claude Code with Amazon Bedrock, Google Cloud Vertex AI, or Microsoft Foundry, and it is not available to organizations that have enabled Zero Data Retention.21Ultrareview requires authentication with a Claude.ai account because it runs on Claude Code on the web infrastructure. If you are signed in with an API key only, run `/login` and authenticate with Claude.ai first. Ultrareview is not available when using Claude Code with Amazon Bedrock, Google Cloud Vertex AI, or Microsoft Foundry, and it is not available to organizations that have enabled Zero Data Retention.


89 89 

90For automatic reviews on GitHub pull requests, [Code Review](/en/code-review) integrates with your repository directly and posts findings as inline PR comments without a CLI step.90For automatic reviews on GitHub pull requests, [Code Review](/en/code-review) integrates with your repository directly and posts findings as inline PR comments without a CLI step.

91 91 

92## How ultrareview compares to /review92## How ultrareview compares to /code-review and /review

93 93 

94Both commands review code, but they target different stages of your workflow.94All three commands review code, but they target different stages of your workflow.

95 95 

96| | `/review` | `/code-review ultra` |96| | `/code-review` | `/review <pr>` | `/code-review ultra` |

97| -------- | ------------------------------ | --------------------------------------------------------------- |97| -------- | ------------------------------- | ------------------------------------------ | --------------------------------------------------------------- |

98| Runs | locally in your session | remotely in a cloud sandbox |98| Target | your working diff | a GitHub pull request | your working diff or a pull request |

99| Depth | single-pass review | multi-agent fleet with independent verification |99| Runs | locally in your session | locally in your session | remotely in a cloud sandbox |

100| Duration | seconds to a few minutes | roughly 5 to 10 minutes |100| Depth | scales with the effort argument | the medium `/code-review` engine | multi-agent fleet with independent verification |

101| Cost | counts toward normal usage | free runs, then roughly \$5 to \$20 per review as usage credits |101| Duration | seconds to a few minutes | a few minutes | roughly 5 to 10 minutes |

102| Best for | quick feedback while iterating | pre-merge confidence on substantial changes |102| Cost | counts toward normal usage | counts toward normal usage | free runs, then roughly \$5 to \$20 per review as usage credits |

103| Best for | quick feedback while iterating | reviewing a teammate's PR before approving | pre-merge confidence on substantial changes |

103 104 

104Use `/review` for fast feedback as you work. Use `/code-review ultra` before merging a substantial change when you want a deeper pass that catches issues a single review might miss.105Use `/code-review` for fast feedback as you work. Use `/review <pr>` to look over a pull request the same way you would before approving it. Use `/code-review ultra` before merging a substantial change when you want a deeper pass that catches issues a local review might miss.

105 106 

106## Related resources107## Related resources

107 108 

workflows.md +2 −1

Details

97The progress view shows each phase with its agent counts, token totals, and elapsed time. The footer lists the key for each action:97The progress view shows each phase with its agent counts, token totals, and elapsed time. The footer lists the key for each action:

98 98 

99| Key | Action |99| Key | Action |

100| :------------- | :-------------------------------------------------------------------------------------------------- |100| :------------- | :------------------------------------------------------------------------------------------------------ |

101| `↑` / `↓` | Select a phase or agent |101| `↑` / `↓` | Select a phase or agent |

102| `Enter` or `→` | Drill into the selected phase, then into an agent to read its prompt, recent tool calls, and result |102| `Enter` or `→` | Drill into the selected phase, then into an agent to read its prompt, recent tool calls, and result |

103| `Esc` | Back out one level |103| `Esc` | Back out one level |

104| `j` / `k` | Scroll within the agent detail when it overflows |104| `j` / `k` | Scroll within the agent detail when it overflows |

105| `f` | {/* min-version: 2.1.186 */}Filter the agent list in the selected phase by status. Press again to cycle |

105| `p` | Pause or resume the run |106| `p` | Pause or resume the run |

106| `x` | Stop the selected agent, or stop the whole workflow when focus is on the run |107| `x` | Stop the selected agent, or stop the whole workflow when focus is on the run |

107| `r` | Restart the selected running agent |108| `r` | Restart the selected running agent |