references/channels/channels-reference.md
<!-- source: https://code.claude.com/docs/en/channels-reference.md / last verified: 2026-08-07 -->
# Channels reference
Build an MCP server that pushes webhooks, alerts, and chat messages into a Claude Code session. Covers the channel contract: capability declaration, notification format, reply tools, sender gating, and permission relay. To use an existing channel instead, see `channels.md`.
## Signature / Usage
```ts
import { Server } from '@modelcontextprotocol/sdk/server/index.js'
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'
const mcp = new Server(
{ name: 'webhook', version: '0.0.1' },
{
// 'claude/channel' is what makes it a channel — Claude Code registers a listener
capabilities: { experimental: { 'claude/channel': {} } },
instructions: 'Events arrive as <channel source="webhook" ...>. One-way: read and act.',
},
)
await mcp.connect(new StdioServerTransport())
// push an event
await mcp.notification({
method: 'notifications/claude/channel',
params: { content: 'build failed on main', meta: { severity: 'high' } },
})
```
```bash
# test a custom channel during the research preview (not on the approved allowlist)
claude --dangerously-load-development-channels server:webhook
claude --dangerously-load-development-channels plugin:yourplugin@yourmarketplace
```
## Options / Props
| Field | Type | Description |
| --- | --- | --- |
| `capabilities.experimental['claude/channel']` | `object` | Required, always `{}`. Presence registers the notification listener. |
| `capabilities.experimental['claude/channel/permission']` | `object` | Optional, always `{}`. Opts in to receiving permission-relay requests. |
| `capabilities.tools` | `object` | Two-way only, always `{}`. Standard MCP tool capability for a reply tool. |
| `instructions` | `string` | Recommended. Added to Claude's system prompt: what events to expect, `<channel>` tag attributes, whether/how to reply. |
| `notifications/claude/channel` params.`content` | `string` | Event body, delivered as the body of the `<channel>` tag. |
| `notifications/claude/channel` params.`meta` | `Record<string,string>` | Optional; each entry becomes a `<channel>` tag attribute. Keys must be letters/digits/underscores only (hyphenated keys silently dropped). |
| `notifications/claude/channel/permission_request` params | `request_id`, `tool_name`, `description`, `input_preview` | Outbound from Claude Code when a permission dialog opens; server formats these into an outgoing prompt. |
| `notifications/claude/channel/permission` params | `request_id`, `behavior` (`'allow'\|'deny'`) | Inbound verdict from the server; applied only if `request_id` matches an open request. |
## Notes
- Transport is standard MCP stdio; Claude Code spawns the channel server as a subprocess. Only `@modelcontextprotocol/sdk` + a Node-compatible runtime (Bun, Node, or Deno) is required.
- `mcp.notification()` resolves when the message is written to the transport, not when Claude has processed it — Claude Code does not acknowledge notifications, and drops events silently if the server isn't loaded as a channel or org policy blocks it. For delivery confirmation, expose a reply tool the server can use to report status.
- Events queue into the session and are delivered together on Claude's next turn if several arrive while busy; run separate sessions to process independent event streams concurrently.
- Gate inbound messages on sender identity (e.g. `message.from.id`), not room/chat identity — gating on the room lets anyone in an allowlisted group inject messages.
- Permission relay: `request_id` is five lowercase letters excluding `l` (never misread as `1`/`I`). Only declare the permission capability if the channel authenticates the sender, since anyone who can reply can approve/deny tool use. Relay covers tool-use approvals (`Bash`, `Write`, `Edit`, etc.); project-trust and MCP-server-consent dialogs never relay. The local terminal dialog stays open in parallel — whichever answer (local or remote) arrives first is applied.
- During the research preview, custom channels must use `--dangerously-load-development-channels` (bypasses only the allowlist, not the `channelsEnabled` org policy) since they aren't on the Anthropic-curated default allowlist.
- Package as a plugin (`/plugin install`) and publish to a marketplace to make a custom channel installable and shareable; still needs the development flag unless added to an org's `allowedChannelPlugins` or an official-marketplace listing.
- This is a Claude Code CLI research-preview extension of the standard MCP server contract described in `mcp.md`; the `claude/channel*` capabilities and `notifications/claude/channel*` methods are Claude Code-specific, not part of core MCP.
- Channels are a Claude Code CLI-only extension of MCP. This is distinct from the Claude API's MCP connector / MCP tunnels, covered in the anthropic-api-tools-mcp skill, and from the Agent SDK's own MCP server configuration, covered in the anthropic-agent-sdk skill.
## Related
- [Push events into a running session with channels](./channels.md)
- [Connect Claude Code to tools via MCP](../mcp/mcp.md)
- [Package a plugin](../plugins/plugins.md)
references/channels/channels.md
<!-- source: https://code.claude.com/docs/en/channels.md / last verified: 2026-08-07 -->
# Push events into a running session with channels
Use channels to push messages, alerts, and webhooks into a running Claude Code session from an MCP server. Forward CI results, chat messages, and monitoring events so Claude can react while you're away. Research preview: requires Anthropic authentication (claude.ai or Console API key), not available on Amazon Bedrock, Google Cloud's Agent Platform, or Microsoft Foundry, and Team/Enterprise orgs must explicitly enable it.
## Signature / Usage
```bash
# install a channel plugin, configure credentials, then enable it per session
/plugin install telegram@claude-plugins-official
/telegram:configure <token>
claude --channels plugin:telegram@claude-plugins-official
# several plugins, space-separated
claude --channels plugin:telegram@claude-plugins-official plugin:discord@claude-plugins-official
# fakechat quickstart (no external service, http://localhost:8787)
/plugin install fakechat@claude-plugins-official
claude --channels plugin:fakechat@claude-plugins-official
```
## Options / Props
| Item | Description |
| --- | --- |
| `--channels <entry> [<entry> ...]` | Opts channel servers into the session; entries are `plugin:<name>@<marketplace>`, space-separated for multiple |
| Supported plugins (research preview) | `telegram`, `discord`, `imessage` (macOS only, reads `~/Library/Messages/chat.db`), `fakechat` (local demo) |
| Requires | [Bun](https://bun.sh) runtime for the pre-built plugins |
| `channelsEnabled` | Org managed setting; master switch, must be `true` for any channel to deliver messages |
| `allowedChannelPlugins` | Org managed setting; replaces the Anthropic-maintained plugin allowlist when set |
| Credential storage | Saved to `~/.claude/channels/<plugin>/.env`; or set `TELEGRAM_BOT_TOKEN` / `DISCORD_BOT_TOKEN` in the shell before launching Claude Code |
| Sender allowlist commands | `/telegram:access pair <code>`, `/telegram:access policy allowlist`, `/discord:access pair <code>`, `/discord:access policy allowlist`, `/imessage:access allow <handle>` |
## Notes
- A channel is an MCP server that pushes events into the running session (inverts the normal "Claude queries the server" MCP model). Two-way channels (chat bridges) let Claude reply back through the same tool call.
- Events only arrive while the session is open; run Claude in a background process or persistent terminal for always-on delivery.
- Every approved channel plugin maintains a sender allowlist — only paired/allowlisted senders can push messages, others are silently dropped. Telegram/Discord bootstrap via a pairing code; iMessage self-chat bypasses the gate automatically.
- Being listed in `.mcp.json` is not enough to push messages — the server also has to be named in `--channels` for the session.
- Channel servers that declare the permission-relay capability can forward tool-approval prompts to a remote device (e.g. phone) so you can approve/deny while away from the terminal; see `channels-reference.md`.
- In non-interactive `-p` mode, tools that need terminal input (multiple-choice questions, plan mode approval) are disabled so a channel-driven session never stalls.
- This is a Claude Code CLI research-preview feature, distinct from the standard MCP server model in `mcp.md` (Claude queries on demand; nothing is pushed) and from `Remote Control` (you drive an existing session from claude.ai/mobile) — see "How channels compare" in the official docs for the full comparison table.
- Channels are a Claude Code CLI-only extension of the MCP server contract (`claude/channel` experimental capability). This is distinct from the Claude API's MCP connector / MCP tunnels, covered in the anthropic-api-tools-mcp skill, and from the Agent SDK's own MCP server configuration, covered in the anthropic-agent-sdk skill.
## Related
- [Channels reference (build your own channel)](./channels-reference.md)
- [Connect Claude Code to tools via MCP](../mcp/mcp.md)
- [Discover plugins](../plugins/discover-plugins.md)
references/channels/README.md
# Channels
| Name | Description | Path |
|------|-------------|------|
| Channels reference | Build an MCP server that pushes webhooks, alerts… | [channels-reference.md](./channels-reference.md) |
| Push events into a running session with channels | Use channels to push messages, alerts, and webhooks… | [channels.md](./channels.md) |
references/hooks/hooks-guide.md
<!-- source: https://code.claude.com/docs/en/hooks-guide / last verified: 2026-08-07 -->
# Automate actions with hooks (guide)
Task-oriented walkthrough for hooks: deterministic control so certain actions always happen instead of relying on the LLM to choose to run them. For full event schemas and JSON formats, see `hooks.md`.
## Signature / Usage
Desktop notification when Claude needs input (`~/.claude/settings.json`):
```json
{
"hooks": {
"Notification": [
{
"matcher": "",
"hooks": [
{ "type": "command", "command": "osascript -e 'display notification \"Claude Code needs your attention\" with title \"Claude Code\"'" }
]
}
]
}
}
```
Auto-format after edits (`.claude/settings.json`):
```json
{
"hooks": {
"PostToolUse": [
{ "matcher": "Edit|Write", "hooks": [{ "type": "command", "command": "jq -r '.tool_input.file_path' | xargs npx prettier --write" }] }
]
}
}
```
## Options / Props
`Notification` matcher values: `permission_prompt`, `idle_prompt`, `auth_success`, `elicitation_dialog`, `elicitation_complete`, `elicitation_response`, `agent_needs_input`, `agent_completed`.
Worked examples in this guide: notify on input needed, auto-format after `Edit|Write`, block edits to protected files (`PreToolUse` + exit 2 script), re-inject context after compaction (`SessionStart` with `compact` matcher), audit config changes (`ConfigChange`), reload env on `SessionStart`/`CwdChanged`/`FileChanged` via `CLAUDE_ENV_FILE`, auto-approve specific `PermissionRequest` prompts (e.g. `ExitPlanMode`).
Prompt-based hooks (`type: "prompt"`): sends the hook input to a Claude model (Haiku by default) for a yes/no `{"ok": bool, "reason": "..."}` decision — use for judgment calls instead of deterministic shell logic. `continueOnBlock: true` feeds a `PreToolUse`/`PostToolUse` deny reason back to Claude to continue rather than ending the turn.
Agent-based hooks (`type: "agent"`, experimental): spawns a subagent with tool access (read files, run commands) before returning the same `ok`/`reason` shape; default timeout 60s, up to 50 tool-use turns.
## Notes
- Command hooks communicate only through stdout/stderr/exit code — they can't trigger `/` commands or tool calls directly.
- `PostToolUse` hooks can't undo actions since the tool already ran.
- `PreToolUse` hooks fire before any permission-mode check in every mode including `bypassPermissions`/`dontAsk` — a `deny` from a hook can't be bypassed by the user's permission mode, but an `allow` from a hook can't loosen deny rules or force-skip a required MCP `requiresUserInteraction` prompt either.
- JSON output requires exiting 0; if the JSON also carries `if` validation issues on exit 2, stderr is used as the blocking reason (v2.1.214+).
- Shell-form command hooks that source a profile with unconditional `echo` can corrupt the JSON on stdout — guard profile echoes with an interactive-shell check (`[[ $- == *i* ]]`).
- This is a Claude Code CLI feature. For the Agent SDK equivalent, see anthropic-agent-sdk. For the Claude API (Messages API) Agent Skills / tool use, see anthropic-api-tools-mcp.
## Related
- [hooks.md](./hooks.md) — full event schema reference, decision-control tables, HTTP/MCP hook fields
references/hooks/hooks.md
<!-- source: https://code.claude.com/docs/en/hooks / last verified: 2026-08-07 -->
# Hooks reference
Hooks are user-defined shell commands, HTTP endpoints, MCP tool calls, or LLM prompts that execute automatically at specific points in Claude Code's lifecycle. They run wherever Claude Code runs (terminal, IDE extensions, Desktop, Claude Code on the web) and fire the same events everywhere. Configuration has three levels of nesting: a hook event (e.g. `PreToolUse`), a matcher group filtering when it fires, and one or more hook handlers to run.
## Signature / Usage
```json
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"if": "Bash(rm *)",
"command": "${CLAUDE_PROJECT_DIR}/.claude/hooks/block-rm.sh"
}
]
}
]
}
}
```
```bash
#!/bin/bash
COMMAND=$(jq -r '.tool_input.command')
if echo "$COMMAND" | grep -q 'rm -rf'; then
jq -n '{hookSpecificOutput:{hookEventName:"PreToolUse",permissionDecision:"deny",permissionDecisionReason:"Destructive command blocked by hook"}}'
else
exit 0
fi
```
## Options / Props
Hook events (cadence: once per session, once per turn, or on every tool call):
| Event | When it fires |
| --- | --- |
| `SessionStart` | Session begins or resumes |
| `Setup` | `--init-only`, or `--init`/`--maintenance` in `-p` mode |
| `UserPromptSubmit` | Prompt submitted, before Claude processes it |
| `UserPromptExpansion` | A typed command expands into a prompt |
| `PreToolUse` / `PostToolUse` / `PostToolUseFailure` | Before / after success / after failure of a tool call |
| `PermissionRequest` / `PermissionDenied` | Permission decision needed / auto-mode denial |
| `PostToolBatch` | After a full batch of parallel tool calls resolves |
| `Notification` | Claude Code sends a notification |
| `MessageDisplay` | While assistant text is displayed |
| `SubagentStart` / `SubagentStop` | Subagent spawned / finishes |
| `TaskCreated` / `TaskCompleted` | Task created via `TaskCreate` / marked completed |
| `Stop` / `StopFailure` | Claude finishes responding / turn ends on API error |
| `TeammateIdle` | An agent-team teammate is about to go idle |
| `InstructionsLoaded` | CLAUDE.md or `.claude/rules/*.md` loaded |
| `ConfigChange` | A configuration file changes mid-session |
| `CwdChanged` / `DirectoryAdded` | Working directory changes / added via `/add-dir` |
| `FileChanged` | A watched file changes on disk |
| `WorktreeCreate` / `WorktreeRemove` | Worktree created / removed |
| `PreCompact` / `PostCompact` | Before / after context compaction |
| `Elicitation` / `ElicitationResult` | MCP server requests input / user responds |
| `SessionEnd` | Session terminates |
Hook handler types: `command` (shell), `http` (POST to a URL), `mcp_tool` (call a connected MCP server tool), `prompt` (single-turn Claude yes/no eval), `agent` (subagent with tool access, experimental).
Common handler fields: `type` (required), `if` (permission-rule-syntax filter, tool events only), `timeout` (seconds; defaults 600 command/http/mcp_tool, 30 prompt, 60 agent), `statusMessage`, `once` (skill frontmatter only).
Command hook fields: `command`, `args` (exec form — no shell, no quoting needed), `async`, `asyncRewake`, `shell` (`bash`/`powershell`). HTTP hook fields: `url`, `headers`, `allowedEnvVars`. MCP tool hook fields: `server`, `tool`, `input`. Prompt/agent hook fields: `prompt`, `model`.
Hook locations and scope:
| Location | Scope | Shareable |
| --- | --- | --- |
| `~/.claude/settings.json` | All your projects | No |
| `.claude/settings.json` | Single project | Yes |
| `.claude/settings.local.json` | Single project | No (gitignored) |
| Managed policy settings | Organization-wide | Yes |
| Plugin `hooks/hooks.json` | While plugin enabled | Yes |
| Skill or agent frontmatter | While component active | Yes |
Exit code contract: **0** = success, JSON on stdout is parsed; **2** = blocking error, stderr fed to Claude as the reason (exact effect varies per event — see the event's "can block?" behavior); any other code = non-blocking error, action proceeds, transcript shows a `<hook name> hook error` notice.
JSON output universal fields: `continue` (default `true`), `stopReason`, `suppressOutput`, `systemMessage`, `terminalSequence` (allowlisted OSC escape sequences for notifications). Decision fields vary by event: top-level `decision: "block"` + `reason` for most post-hoc events; `hookSpecificOutput.permissionDecision` (`allow`/`deny`/`ask`/`defer`) for `PreToolUse`; `hookSpecificOutput.decision.behavior` for `PermissionRequest`; `hookSpecificOutput.additionalContext` injects text into Claude's context (10,000-char cap per value, overflow saved to a file).
## Notes
- All matching hooks in a matched group run in parallel; the most restrictive `PreToolUse` decision wins (`deny` > `defer` > `ask` > `allow`), and `additionalContext` from every hook is kept.
- Matcher syntax: `"*"`/empty/omitted matches all; letters/digits/`_`/`-`/spaces/`,`/`|` only → exact-string match (or list); any other character → unanchored JS regex. `FileChanged` and `StopFailure` use a narrower exact-match set (`|` only for alternatives).
- `if` uses permission-rule syntax (`"Bash(git *)"`, `"Edit(*.ts)"`) to filter by tool name **and** arguments together; only evaluated on `PreToolUse`, `PostToolUse`, `PostToolUseFailure`, `PermissionRequest`, `PermissionDenied`.
- Path placeholders: `${CLAUDE_PROJECT_DIR}`, `${CLAUDE_PLUGIN_ROOT}`, `${CLAUDE_PLUGIN_DATA}` — prefer exec form (`args` set) whenever a hook references one, since shell form needs manual quoting.
- Hooks defined in skill/subagent frontmatter are scoped to the component's lifecycle; for subagents, `Stop` hooks convert to `SubagentStop`.
- `disableAllHooks: true` disables user/project/local hooks but cannot disable managed-policy hooks from outside managed settings.
- Stop hooks that block 8 times in a row without progress are overridden automatically; check `stop_hook_active` in the input to avoid loops.
- This is a Claude Code CLI feature. For the Agent SDK equivalent, see anthropic-agent-sdk. For the Claude API (Messages API) Agent Skills / tool use, see anthropic-api-tools-mcp.
## Related
- [hooks-guide.md](./hooks-guide.md) — task-oriented walkthroughs and troubleshooting for the same event/config model
references/hooks/README.md
# hooks
| Name | Description | Path |
| --- | --- | --- |
| Hooks reference | セッション lifecycle event (SessionStart / PreToolUse / PermissionRequest 等) の hook event 設定 | [hooks.md](./hooks.md) |
| Automate actions with hooks (guide) | hook event の実装パターン・worked example 集 | [hooks-guide.md](./hooks-guide.md) |
references/mcp/managed-mcp.md
<!-- source: https://code.claude.com/docs/en/managed-mcp.md / last verified: 2026-08-07 -->
# Control MCP server access for your organization
Restrict which MCP servers users can add or connect to with managed configuration files, allowlists, and denylists.
## Signature / Usage
```json
// managed-mcp.json — deploy at a system path for exclusive control
{
"mcpServers": {
"github": { "type": "http", "url": "https://api.githubcopilot.com/mcp/" },
"sentry": { "type": "http", "url": "https://mcp.sentry.dev/mcp" }
}
}
```
```json
// managed-settings.json — allowlist pattern
{
"allowManagedMcpServersOnly": true,
"allowedMcpServers": [
{ "serverUrl": "https://api.githubcopilot.com/*" },
{ "serverUrl": "https://*.internal.example.com/*" }
],
"deniedMcpServers": [
{ "serverName": "dangerous-server" }
]
}
```
## Options / Props
| Pattern | What it does | Configure |
| --- | --- | --- |
| Disable MCP | No servers load anywhere | `managed-mcp.json` with `{"mcpServers": {}}` |
| Fixed deployment | Every user gets the same servers, can't add others | `managed-mcp.json` with the servers |
| Approved catalog | Users add from an approved list; anything else blocked | `allowedMcpServers` + `allowManagedMcpServersOnly: true` |
| Soft allowlist | Enforced allowlist, users can broaden in own settings | `allowedMcpServers` without the `Only` flag |
| Denylist only | Block known-bad servers, allow everything else | `deniedMcpServers` |
| `managed-mcp.json` path | Platform |
| --- | --- |
| `/Library/Application Support/ClaudeCode/managed-mcp.json` | macOS |
| `/etc/claude-code/managed-mcp.json` | Linux and WSL |
| `C:\Program Files\ClaudeCode\managed-mcp.json` | Windows |
| Match key | Matches |
| --- | --- |
| `serverUrl` | Remote server URL, exact or `*` wildcard |
| `serverCommand` | Exact command + args (all arguments, in order) |
| `serverName` | User-assigned label — not a security control by itself, exact match only |
## Notes
- This managed policy governs the Claude Code **CLI**'s own MCP server connections. It does not control the Agent SDK's MCP configuration (see anthropic-agent-sdk) or the Claude API's MCP connector / MCP tunnels (see anthropic-api-tools-mcp).
- `managed-mcp.json` is a standalone file (not deliverable via server-managed settings); any process with admin privileges (MDM, GPO, fleet tooling) can deploy it. It also suppresses claude.ai connectors unless `allowAllClaudeAiMcps: true` is set.
- Don't put credentials in `managed-mcp.json` `env` blocks (world-readable); use `${VAR}` expansion, OAuth/per-user headers, or `headersHelper` instead.
- Evaluation order: merge allow/deny lists from every settings source → check denylist (always blocks) → check allowlist (if unset, everything passes; if set, remote servers need `serverUrl` match, stdio servers need `serverCommand` match).
- When a restriction blocks an already-configured server, it silently disappears from `/mcp` and `claude mcp list` with no in-app warning — communicate blocked servers to affected users directly.
- Set `OTEL_LOG_TOOL_DETAILS=1` with OpenTelemetry export configured to record which MCP servers/tools users actually invoke.
## Related
- [Connect Claude Code to tools via MCP](./mcp.md)
- [Connect to MCP servers (quickstart)](./mcp-quickstart.md)
references/mcp/mcp-quickstart.md
<!-- source: https://code.claude.com/docs/en/mcp-quickstart.md / last verified: 2026-08-07 -->
# Connect to MCP servers
Add an MCP server to Claude Code, verify the connection, and find the configuration on disk. Step-by-step walkthrough; see the MCP reference for every configuration option.
## Signature / Usage
```bash
# 1. Add
claude mcp add --transport http claude-code-docs https://code.claude.com/docs/mcp
# 2. Verify
claude mcp list
# 3. Use (inside a session)
# "Use the claude-code-docs server to look up what MCP_TIMEOUT does"
# 4. Remove (optional cleanup)
claude mcp remove claude-code-docs
```
```json
// .mcp.json (project scope, hand-written)
{
"mcpServers": {
"claude-code-docs": { "type": "http", "url": "https://code.claude.com/docs/mcp" },
"playwright": { "type": "stdio", "command": "npx", "args": ["-y", "@playwright/mcp@latest"] }
}
}
```
## Options / Props
| `claude mcp list` status | Meaning |
| --- | --- |
| `✔ Connected` | Ready to use |
| `! Connected · tools fetch failed` | Connected but tool listing failed; run `claude mcp get <name>` |
| `! Needs authentication` | Needs browser sign-in or a `--header` token |
| `✘ Failed to connect` / `✘ Connection error` | Server didn't respond / threw an error |
| `⏸ Pending approval (run claude to approve)` | Project-scoped server awaiting approval |
| Scope | File | Available to |
| --- | --- | --- |
| `local` (default) | `~/.claude.json`, under the project entry | Only you, only this project |
| `project` | `.mcp.json` in project root | Everyone who clones the project |
| `user` | `~/.claude.json`, top-level `mcpServers` | Only you, all projects |
## Notes
- This is the Claude Code **CLI** connection setup. For the Agent SDK's own MCP configuration surface, see anthropic-agent-sdk. For the Claude API's MCP connector / MCP tunnels, see anthropic-api-tools-mcp.
- The first time Claude Code sees a project-scoped `.mcp.json` server, it prompts for approval before connecting (protects against a cloned repo launching processes without consent).
- Sign-in-required servers (Sentry, Linear, Notion, etc.) show `! Needs authentication` after `claude mcp add`; complete OAuth via `/mcp` inside a session.
- Every Claude Code surface can connect to MCP servers: desktop app (Connectors UI), Claude Desktop chat app (`claude mcp add-from-claude-desktop` on macOS/WSL), VS Code, Claude Code on the web (reads `.mcp.json`), and claude.ai connectors.
## Related
- [Connect Claude Code to tools via MCP](./mcp.md)
- [Control MCP server access for your organization](./managed-mcp.md)
references/mcp/mcp.md
<!-- source: https://code.claude.com/docs/en/mcp.md / last verified: 2026-08-07 -->
# Connect Claude Code to tools via MCP
Learn how to connect Claude Code to your tools with the Model Context Protocol (MCP). Full reference; see the MCP quickstart for a step-by-step walkthrough.
## Signature / Usage
```bash
# HTTP (recommended)
claude mcp add --transport http notion https://mcp.notion.com/mcp
claude mcp add --transport http secure-api https://api.example.com/mcp \
--header "Authorization: Bearer your-token"
# stdio (local process)
claude mcp add --env AIRTABLE_API_KEY=YOUR_KEY --transport stdio airtable \
-- npx -y airtable-mcp-server
# WebSocket / SSE (SSE deprecated, use HTTP where available)
claude mcp add-json events-server \
'{"type":"ws","url":"wss://mcp.example.com/socket","headers":{"Authorization":"Bearer YOUR_TOKEN"}}'
claude mcp list
claude mcp get <name>
claude mcp remove <name>
/mcp # inside a session: status, auth, tool inspection
```
## Options / Props
| Scope | Loads in | Shared with team | Stored in |
| --- | --- | --- | --- |
| `local` (default) | Current project only | No | `~/.claude.json` (per-project entry) |
| `project` | Current project only | Yes, via `.mcp.json` in repo root | `.mcp.json` |
| `user` | All your projects | No | `~/.claude.json` (top-level `mcpServers`) |
| `claude mcp add` flag | Description |
| --- | --- |
| `--transport http\|sse\|stdio` | Transport (`-t`); WebSocket configured via `add-json` with `"type":"ws"` |
| `--header "Key: value"` | Static auth header (`-H`) |
| `--env KEY=value` | Environment variable for the server process (`-e`) |
| `--scope local\|project\|user` | Installation scope (`-s`) |
| `--callback-port <n>` | Fixed OAuth callback port |
| `--client-id` / `--client-secret` | Pre-configured OAuth credentials |
Scope/duplicate precedence when the same server name/endpoint appears in multiple sources: local > project > user > plugin-provided servers > claude.ai connectors.
## Notes
- Precedence for MCP config in this skill is the Claude Code **CLI** connection surface. For the Agent SDK's own MCP configuration (in-process/subprocess servers passed programmatically), see the anthropic-agent-sdk skill. For the Claude API's MCP connector / MCP tunnels (server-side, not CLI), see anthropic-api-tools-mcp.
- `${VAR}` and `${VAR:-default}` expansion is supported in `command`, `args`, `env`, `url`, and `headers` of `.mcp.json` entries.
- Reserved server names (`workspace`, `claude-in-chrome`, `computer-use`, `Claude Preview`, `Claude Browser`) cannot be registered by users.
- `claude mcp login <name>` / `claude mcp logout <name>` run and clear OAuth flows from the shell without opening `/mcp`.
- `headersHelper` runs a script to generate dynamic auth headers (e.g. Kerberos, short-lived tokens) at connection time; can't reference `${user_config.*}` (shell-executed).
- MCP tool output over 10,000 tokens triggers a warning; output is capped at 25,000 tokens by default (`MAX_MCP_OUTPUT_TOKENS` to raise it).
- Long-running tool calls (>2 min) in the main conversation move to a background task automatically (`CLAUDE_CODE_MCP_AUTO_BACKGROUND_MS` to tune, `0` to disable).
- Servers from claude.ai (connectors, added at claude.ai/customize/connectors) are auto-available when logged in with a claude.ai subscription account; not loaded when API-key or third-party-provider auth is active.
- Organizations can set per-tool `ask`/`blocked` controls on claude.ai connector tools, enforced locally by Claude Code.
## Related
- [Connect to MCP servers (quickstart)](./mcp-quickstart.md)
- [Control MCP server access for your organization](./managed-mcp.md)
references/mcp/README.md
# mcp
| Name | Description | Path |
| --- | --- | --- |
| Control MCP server access for your organization | Restrict which MCP servers users can add or connect to with managed configuration files, allowlists, and denylists. | [managed-mcp.md](./managed-mcp.md) |
| Connect to MCP servers | Add an MCP server to Claude Code, verify the connection, and find the configuration on disk. Step-by-step walkthrough; see the MCP reference for every configuration option. | [mcp-quickstart.md](./mcp-quickstart.md) |
| Connect Claude Code to tools via MCP | Learn how to connect Claude Code to your tools with the Model Context Protocol (MCP). Full reference; see the MCP quickstart for a step-by-step walkthrough. | [mcp.md](./mcp.md) |
references/plugins/discover-plugins.md
<!-- source: https://code.claude.com/docs/en/discover-plugins.md / last verified: 2026-08-07 -->
# Discover and install prebuilt plugins through marketplaces
Find and install plugins from marketplaces to extend Claude Code with new skills, agents, and capabilities.
## Signature / Usage
```shell
# Official marketplace is added automatically on first interactive launch
/plugin marketplace add anthropics/claude-plugins-official # if needed
/plugin install github@claude-plugins-official
# Community marketplace
/plugin marketplace add anthropics/claude-plugins-community
/plugin install <plugin-name>@claude-community
/plugin # interactive manager: Discover / Installed / Marketplaces / Errors
/plugin list [--enabled|--disabled]
/plugin disable plugin-name@marketplace-name
/plugin enable plugin-name@marketplace-name
/plugin uninstall plugin-name@marketplace-name
/reload-plugins [--force]
```
## Options / Props
| Official marketplace category | Examples |
| --- | --- |
| Code intelligence (LSP) | `clangd-lsp`, `csharp-lsp`, `gopls-lsp`, `pyright-lsp`, `rust-analyzer-lsp`, `typescript-lsp` (binary must be installed separately) |
| External integrations | `github`, `gitlab`, `atlassian`, `asana`, `linear`, `notion`, `figma`, `vercel`, `firebase`, `supabase`, `slack`, `sentry` |
| Security | `security-guidance` |
| Development workflows | `commit-commands`, `pr-review-toolkit`, `agent-sdk-dev`, `plugin-dev` |
| Output styles | `explanatory-output-style`, `learning-output-style` |
| Installation scope | Availability |
| --- | --- |
| `user` (default) | Yourself, all projects |
| `project` | All collaborators, written to `.claude/settings.json` |
| `local` | Yourself, this repository only |
| `managed` | Set by administrators (read-only) |
## Notes
- `/plugin marketplace add` accepts GitHub `owner/repo`, other git URLs (must include `https://` and `.git` suffix), local paths, or remote `marketplace.json` URLs.
- Install summary reports either `Plugin is now active.` or `Run /reload-plugins to activate.`; the latter is required when activation would invalidate the prompt cache.
- Plugins and marketplaces execute arbitrary code with user privileges — only install/add from trusted sources. Organizations can restrict via managed marketplace policies (`strictKnownMarketplaces`).
- Auto-update: official Anthropic marketplaces default to on, third-party/local marketplaces default to off; `DISABLE_AUTOUPDATER` / `FORCE_AUTOUPDATE_PLUGINS` env vars control global behavior.
- Team marketplaces: `.claude/settings.json` can declare `extraKnownMarketplaces`, prompting collaborators to install on trust.
- Troubleshooting: clear `~/.claude/plugins/cache` and reinstall if plugin skills don't appear after install.
## Related
- [Create plugins](./plugins.md)
- [Plugins reference](./plugins-reference.md)
- [Create and distribute a plugin marketplace](./plugin-marketplaces.md)
- [Recommend plugins for your org](./plugin-relevance.md)
references/plugins/plugin-dependencies.md
<!-- source: https://code.claude.com/docs/en/plugin-dependencies.md / last verified: 2026-08-07 -->
# Constrain plugin dependency versions
Declare version constraints on plugin dependencies, and bundle a curated plugin set behind one install.
## Signature / Usage
```json
// .claude-plugin/plugin.json
{
"name": "deploy-kit",
"version": "3.1.0",
"dependencies": [
"audit-logger",
{ "name": "secrets-vault", "version": "~2.1.0" }
]
}
```
```bash
claude plugin tag --push # tag {plugin-name}--v{version} and push to origin
claude plugin prune [--dry-run] [-y]
claude plugin list --json # inspect dependency errors
```
## Options / Props
| Dependency object field | Type | Description |
| --- | --- | --- |
| `name` | string | Plugin name, resolved in the same marketplace by default. Required |
| `version` | string | Semver range (`~2.1.0`, `^2.0`, `>=1.4`, `=2.1.0`); highest tagged version satisfying it is fetched |
| `marketplace` | string | Resolve `name` in a different marketplace; requires `allowCrossMarketplaceDependenciesOn` in the root marketplace's `marketplace.json` |
| Error | Meaning |
| --- | --- |
| `dependency-unsatisfied` | Dependency not installed, or installed but disabled |
| `range-conflict` | Combined version ranges can't be satisfied |
| `dependency-version-unsatisfied` | Installed dependency version outside declared range |
| `no-matching-tag` | No `{name}--v*` tag satisfies the range |
## Notes
- Tags must follow `{plugin-name}--v{version}`; `claude plugin tag --push` derives and validates this automatically.
- Enabling a plugin also enables its dependencies at the same scope; disabling is blocked while a dependent plugin is still enabled (error names the chained `claude plugin disable` command to run).
- `claude plugin prune [--scope ...] [--dry-run] [-y]` removes auto-installed dependencies no longer required by any installed plugin; pass `--prune` to `claude plugin uninstall` to combine both steps.
- A manifest consisting only of `name` + `dependencies` is a valid "bundle" plugin for packaging a curated set behind one install.
- For npm-sourced marketplaces, tag-based resolution doesn't apply; the constraint is checked at load time only.
## Related
- [Plugins reference](./plugins-reference.md)
- [Create and distribute a plugin marketplace](./plugin-marketplaces.md)
references/plugins/plugin-hints.md
<!-- source: https://code.claude.com/docs/en/plugin-hints.md / last verified: 2026-08-07 -->
# Recommend your plugin from your CLI
Emit a one-line marker from your CLI so Claude Code prompts users to install your official plugin.
## Signature / Usage
```javascript
// Node.js
if (process.env.CLAUDECODE) {
process.stderr.write(
'<claude-code-hint v="1" type="plugin" value="example-cli@claude-plugins-official" />\n',
)
}
```
```python
# Python
import os, sys
if os.environ.get("CLAUDECODE"):
print('<claude-code-hint v="1" type="plugin" value="example-cli@claude-plugins-official" />', file=sys.stderr)
```
## Options / Props
| Attribute | Required | Description |
| --- | --- | --- |
| `v` | Yes | Protocol version; `1` is the only supported value |
| `type` | Yes | Hint kind; `plugin` is the only supported value |
| `value` | Yes | Plugin identifier in `name@marketplace` form |
| Gating variable | Reaches |
| --- | --- |
| `CLAUDECODE` | Every Bash/PowerShell subprocess Claude Code runs, plus tmux sessions and IDE integrated terminals (may reach a human directly) |
| `CLAUDE_CODE_CHILD_SESSION` | Only subprocesses Claude Code itself spawns (v2.1.172+) |
## Notes
- Hint prompts only fire for plugins listed in the official Anthropic marketplace (`claude-plugins-official`); hints pointing elsewhere are silently dropped.
- The tag must occupy its own line; embedding mid-line (e.g. inside a log statement) is ignored. It is always stripped before reaching the model and never counted toward token usage.
- Prompt frequency is bounded: once per plugin ever, at most one hint prompt per Claude Code session across all CLIs, and never shown when telemetry is disabled.
- Claude Code never installs a plugin automatically — the user always confirms.
## Related
- [Discover and install plugins](./discover-plugins.md)
- [Create plugins](./plugins.md)
references/plugins/plugin-marketplaces.md
<!-- source: https://code.claude.com/docs/en/plugin-marketplaces.md / last verified: 2026-08-07 -->
# Create and distribute a plugin marketplace
Build and host plugin marketplaces to distribute Claude Code extensions across teams and communities.
## Signature / Usage
```json
// .claude-plugin/marketplace.json
{
"name": "company-tools",
"owner": { "name": "DevTools Team", "email": "devtools@example.com" },
"plugins": [
{
"name": "code-formatter",
"source": "./plugins/formatter",
"description": "Automatic code formatting on save",
"version": "2.1.0"
},
{
"name": "deployment-tools",
"source": { "source": "github", "repo": "company/deploy-plugin" },
"description": "Deployment automation tools"
}
]
}
```
```shell
/plugin marketplace add ./my-marketplace
/plugin install quality-review-plugin@my-plugins
```
## Options / Props
### marketplace.json required fields
| Field | Type | Description |
| --- | --- | --- |
| `name` | string | Marketplace identifier (kebab-case); one registration per name per user |
| `owner` | object | `name` required; `email`, `url` optional |
| `plugins` | array | List of plugin entries |
### Plugin entry fields
| Field | Type | Description |
| --- | --- | --- |
| `name` | string | Required, kebab-case |
| `source` | string \| object | Required — see source types below |
| `strict` | boolean | Default `true`: `plugin.json` is authority. `false`: marketplace entry is the entire definition |
| `relevance` | object | Contextual install-suggestion signals |
| `defaultEnabled` | boolean | Whether enabled after install (default `true`) |
### Plugin source types
| Source | Fields | Notes |
| --- | --- | --- |
| Relative path | `"./my-plugin"` | Resolved from marketplace root; no `..` |
| `github` | `repo`, `ref?`, `sha?` | |
| `url` | `url`, `ref?`, `sha?` | Any git host |
| `git-subdir` | `url`, `path`, `ref?`, `sha?` | Sparse clone of a monorepo subdirectory |
| `npm` | `package`, `version?`, `registry?` | Installed via `npm install` |
## Notes
- Reserved marketplace names (e.g. `claude-plugins-official`, `claude-code-plugins`, `anthropic-marketplace`) cannot be used by third parties; impersonating names are also blocked.
- Version resolution order: `plugin.json` `version` → marketplace entry `version` → git commit SHA. Omitting `version` on a git-based source makes every commit a new version.
- Rename/remove a plugin safely via a top-level `renames` map (`{"old-name": "new-name-or-null"}`) so existing installs migrate instead of erroring `plugin-not-found`.
- `metadata.pluginRoot` lets entries use short relative sources (e.g. `"formatter"` instead of `"./plugins/formatter"`).
- Validate with `claude plugin validate .` (marketplace) or `claude plugin validate ./plugins/my-plugin` (individual plugin) before publishing; `--strict` treats warnings as errors.
- Administrators restrict which marketplaces can be added via `strictKnownMarketplaces` in managed settings (undefined = no restriction, `[]` = complete lockdown, populated = allowlist by `github`/`url`/`hostPattern`/`pathPattern`).
- URL-based marketplaces (direct `marketplace.json` URL) only fetch that file — relative-path plugin sources fail; use GitHub/npm/git-URL sources instead for URL-based distribution.
## Related
- [Discover and install plugins](./discover-plugins.md)
- [Plugins reference](./plugins-reference.md)
- [Constrain plugin dependency versions](./plugin-dependencies.md)
- [Recommend plugins for your org](./plugin-relevance.md)
references/plugins/plugin-relevance.md
<!-- source: https://code.claude.com/docs/en/plugin-relevance.md / last verified: 2026-08-07 -->
# Recommend plugins for your org
Add a relevance block to marketplace plugin entries so Claude Code suggests them when a user's work matches.
## Signature / Usage
```json
{
"name": "terraform-helpers",
"source": "./plugins/terraform-helpers",
"relevance": {
"topic": "Terraform",
"signals": {
"cli": ["terraform"],
"filesRead": ["**/*.tf"]
}
}
}
```
```json
// managed-settings.json — required to activate suggestions
{
"extraKnownMarketplaces": {
"acme-corp-plugins": { "source": { "source": "github", "repo": "acme-corp/claude-plugins" } }
},
"pluginSuggestionMarketplaces": ["acme-corp-plugins"]
}
```
## Options / Props
| `relevance.signals` field | Type | Matches |
| --- | --- | --- |
| `cwd` | string[] (max 10) | Glob against session working directory; only signal that can match before the first turn |
| `cli` | string[] (max 10) | Exact command names run this session |
| `hosts` | string[] (max 20) | Bare lowercase hostnames from `http(s)://` URLs in Bash commands |
| `filesRead` | string[] (max 10) | Glob against paths of files Claude has read |
| `manifestDeps` | object[] (max 10) | `{file, pattern}` regex pair matched against manifest file path/contents |
## Notes
- Declaring `relevance` in `marketplace.json` is not enough on its own — an administrator must allowlist the marketplace in `pluginSuggestionMarketplaces` (managed settings) before suggestions appear; this applies even to the official Anthropic marketplace.
- Signal matching happens entirely locally; no network traffic and no reporting of matched signals to Anthropic or the marketplace operator.
- Surfaces: spinner tip (`Working with <topic>? Install the <plugin> plugin`), session-start notification (`cwd` signal only), and a pinned entry in the `/plugin` Discover tab.
- Requires Claude Code v2.1.152+; older clients ignore `relevance`.
- Claude Code never installs a plugin automatically — the user always confirms.
## Related
- [Create and distribute a plugin marketplace](./plugin-marketplaces.md)
- [Recommend your plugin from your CLI](./plugin-hints.md)
references/plugins/plugins-reference.md
<!-- source: https://code.claude.com/docs/en/plugins-reference.md / last verified: 2026-08-07 -->
# Plugins reference
Complete technical reference for the Claude Code plugin system: components, manifest schema, caching, directory structure, and CLI commands.
## Signature / Usage
```json
// .claude-plugin/plugin.json — complete schema
{
"name": "plugin-name",
"displayName": "Plugin Name",
"version": "1.2.0",
"description": "Brief plugin description",
"author": { "name": "Author Name", "email": "author@example.com", "url": "https://github.com/author" },
"homepage": "https://docs.example.com/plugin",
"repository": "https://github.com/author/plugin",
"license": "MIT",
"keywords": ["keyword1", "keyword2"],
"metadata": { "catalogId": "cat-123" },
"skills": "./custom/skills/",
"commands": ["./custom/commands/special.md"],
"agents": ["./custom/agents/reviewer.md"],
"hooks": "./config/hooks.json",
"mcpServers": "./mcp-config.json",
"outputStyles": "./styles/",
"lspServers": "./.lsp.json",
"experimental": { "themes": "./themes/", "monitors": "./monitors.json" },
"dependencies": ["helper-lib", { "name": "secrets-vault", "version": "~2.1.0" }]
}
```
## Options / Props
| Component | Default location | Notes |
| --- | --- | --- |
| Skills | `skills/` or `commands/`, or root `SKILL.md` | Boolean frontmatter fields accept `yes/no/on/off/1/0` too |
| Agents | `agents/` | Frontmatter: `name`, `description`, `model`, `effort`, `maxTurns`, `tools`, `disallowedTools`, `skills`, `memory`, `background`, `isolation` (`"worktree"` only); `hooks`/`mcpServers`/`permissionMode` not supported |
| Hooks | `hooks/hooks.json` or inline | Types: `command`, `http`, `mcp_tool`, `prompt`, `agent`. Plugin MCP tool matchers use `mcp__plugin_<plugin-name>_<server-name>__<tool>` |
| MCP servers | `.mcp.json` or inline | Start automatically when plugin enabled; independent of user MCP servers |
| LSP servers | `.lsp.json` or inline | Requires `command`, `extensionToLanguage`; optional `args`, `transport`, `env`, `initializationOptions`, `settings`, `startupTimeout`, `shutdownTimeout`, `restartOnCrash`, `maxRestarts`, `diagnostics` |
| Monitors | `monitors/monitors.json` or `experimental.monitors` | Fields: `name`, `command` (required), `description` (required), `when` (`"always"` default or `"on-skill-invoke:<skill>"`) |
| Themes | `themes/` or `experimental.themes` | JSON with `name`, `base` (`dark`/`light`), `overrides` color-token map |
### Manifest metadata fields
| Field | Type | Description |
| --- | --- | --- |
| `name` | string | Required if manifest present. Kebab-case, unique, used for namespacing |
| `displayName` | string | Human-readable name in UI; falls back to `name` |
| `version` | string | Pins the plugin; omit to fall back to git commit SHA |
| `defaultEnabled` | boolean | Whether the plugin starts enabled (default `true`) |
| `metadata` | object | Free-form, never read by Claude Code |
### Component path fields
| Field | Replaces vs adds to default |
| --- | --- |
| `commands`, `agents`, `workflows`, `outputStyles`, `experimental.themes`, `experimental.monitors` | Replaces the default folder |
| `skills` | Adds to the default `skills/` scan (exception: marketplace-root `source` entries) |
| `hooks`, `mcpServers`, `lspServers` | Own merge rules |
### Environment variables
| Variable | Resolves to |
| --- | --- |
| `${CLAUDE_PLUGIN_ROOT}` | Plugin's installation directory |
| `${CLAUDE_PLUGIN_DATA}` | Persistent directory `~/.claude/plugins/data/{id}/`, survives updates |
| `${CLAUDE_PROJECT_DIR}` | Project root |
## Notes
- Installed (marketplace) plugins are copied into `~/.claude/plugins/cache`; paths that traverse outside the plugin root (`../shared-utils`) do not work. Use symlinks within the plugin's own directory, or elsewhere in the same marketplace (dereferenced on copy), to share files.
- `userConfig` in `plugin.json` declares values Claude Code prompts for at enable time (`type`: `string`/`number`/`boolean`/`directory`/`file`; optional `sensitive`, `required`, `default`, `multiple`, `min`/`max`). Substituted as `${user_config.KEY}`; shell-executed fields (hook shell-form commands, monitor commands, `headersHelper`) reject the substitution for security.
- `channels` field declares MCP-server-backed message channels (Telegram/Slack/Discord style) for pushing content into a session.
- Plugin installation scopes: `user` (`~/.claude/settings.json`, default), `project` (`.claude/settings.json`), `local` (`.claude/settings.local.json`), `managed` (read-only).
- Skills-directory plugins: any folder with `.claude-plugin/plugin.json` under a skills directory loads as `<name>@skills-dir` automatically; scaffold with `claude plugin init <name>`.
- CLI: `claude plugin install|uninstall|prune|enable|disable <plugin>[@marketplace]`, `claude plugin validate ./path [--strict]`, `claude plugin tag --push`, `claude plugin list [--json]`.
## Related
- [Create plugins](./plugins.md)
- [Discover and install plugins](./discover-plugins.md)
- [Constrain plugin dependency versions](./plugin-dependencies.md)
- [Create and distribute a plugin marketplace](./plugin-marketplaces.md)
references/plugins/plugins.md
<!-- source: https://code.claude.com/docs/en/plugins.md / last verified: 2026-08-07 -->
# Create plugins
Create custom plugins to extend Claude Code with skills, agents, hooks, and MCP servers, shareable across projects and teams.
## Signature / Usage
```bash
mkdir my-first-plugin
mkdir my-first-plugin/.claude-plugin
# my-first-plugin/.claude-plugin/plugin.json
# {
# "name": "my-first-plugin",
# "description": "A greeting plugin to learn the basics",
# "version": "1.0.0",
# "author": { "name": "Your Name" }
# }
mkdir -p my-first-plugin/skills/hello
# my-first-plugin/skills/hello/SKILL.md
# ---
# description: Greet the user with a friendly message
# ---
# Greet the user warmly and ask how you can help them today.
claude --plugin-dir ./my-first-plugin
# /my-first-plugin:hello
```
## Options / Props
| Directory / File | Location | Purpose |
| --- | --- | --- |
| `.claude-plugin/plugin.json` | Plugin root | Manifest: name, description, version, author (optional) |
| `skills/` | Plugin root | Skills as `<name>/SKILL.md` directories |
| `commands/` | Plugin root | Skills as flat Markdown files (legacy; prefer `skills/`) |
| `agents/` | Plugin root | Custom agent definitions |
| `hooks/` | Plugin root | Event handlers in `hooks.json` |
| `.mcp.json` | Plugin root | MCP server configurations |
| `.lsp.json` | Plugin root | LSP server configurations |
| `monitors/` | Plugin root | Background monitor configurations in `monitors.json` |
| `bin/` | Plugin root | Executables added to the Bash tool's `PATH` |
| `settings.json` | Plugin root | Default settings (only `agent` and `subagentStatusLine` keys) |
## Notes
- Standalone (`.claude/`) configuration is best for personal/project-specific work; plugins are best for sharing, versioned releases, and reuse. Plugin skills are always namespaced (`/plugin-name:hello`).
- Only `plugin.json` goes inside `.claude-plugin/`; all other component directories (`commands/`, `agents/`, `skills/`, `hooks/`, etc.) must be at the plugin root, never inside `.claude-plugin/` and never under `~/.claude/`.
- `claude plugin init <name>` scaffolds a plugin under `~/.claude/skills/<name>/` that auto-loads as `<name>@skills-dir` with no marketplace or install step.
- A plugin with exactly one skill can place `SKILL.md` directly at the plugin root instead of using `skills/`.
- Test locally with `claude --plugin-dir ./my-plugin` (repeatable, also accepts `.zip`) or `claude --plugin-url <zip-url>` for a hosted archive. Run `/reload-plugins` after edits.
- To submit a plugin to the community marketplace, run `claude plugin validate ./your-plugin` first, then use the claude.ai or Console submission form. The official marketplace (`claude-plugins-official`) is curated separately by Anthropic; there is no application process for it.
- Migrating from `.claude/` to a plugin: copy `commands/`, `agents/`, `skills/` into the plugin root, move hook config from `settings.json` into `hooks/hooks.json`, then remove the originals from `.claude/` (project/user `agents/` definitions override same-named plugin agents until removed; namespaced skills coexist with the original).
- Loading a plugin from the SDK is a distinct integration surface; for details see the Agent SDK plugin-loading docs (`anthropic-agent-sdk`).
## Related
- [Plugins reference](./plugins-reference.md)
- [Discover and install plugins](./discover-plugins.md)
- [Create and distribute a plugin marketplace](./plugin-marketplaces.md)
references/plugins/README.md
# plugins
| Name | Description | Path |
| --- | --- | --- |
| Discover and install prebuilt plugins through marketplaces | marketplace からの plugin 発見・install・enable 管理 | [discover-plugins.md](./discover-plugins.md) |
| Constrain plugin dependency versions | plugin dependency の semver constraint 宣言・bundle 形式 | [plugin-dependencies.md](./plugin-dependencies.md) |
| Recommend your plugin from your CLI | CLI 実行時に hint marker 出力して Claude Code に plugin 推奨 | [plugin-hints.md](./plugin-hints.md) |
| Create and distribute a plugin marketplace | team / community 向け marketplace の構築・配布 | [plugin-marketplaces.md](./plugin-marketplaces.md) |
| Recommend plugins for your org | marketplace plugin の relevance block (topic / signals) | [plugin-relevance.md](./plugin-relevance.md) |
| Create plugins | skill / agent / hook / MCP / LSP / output-style を含む custom plugin 作成 | [plugins.md](./plugins.md) |
| Plugins reference | plugin.json manifest schema・component paths・CLI commands 完全リファレンス | [plugins-reference.md](./plugins-reference.md) |
references/skills-commands/commands.md
<!-- source: https://code.claude.com/docs/en/commands / last verified: 2026-08-07 -->
# Commands
Commands control Claude Code from inside a session: switch models, manage permissions, clear context, run a workflow. Type `/` to see available commands, or `/` followed by letters to filter. A command is only recognized at the start of a message; text after it becomes arguments. As of v2.1.199, chaining multiple skill invocations (`/skill-a /skill-b do XYZ`) loads every named skill and passes the trailing text to each, up to six skills.
## Signature / Usage
```text
/code-review high 1234
/model opus
/effort xhigh
```
## Options / Props
Selected commands (not exhaustive — see the official page for the full alphabetical table):
| Name | Description |
| --- | --- |
| `/advisor [model\|off]` | Enable/disable the advisor tool; accepts `opus`, `sonnet`, a full model ID |
| `/agents` | Reminder to ask Claude to create/manage subagents (v2.1.198+); interactive UI on older versions |
| `/batch <instruction>` | **Skill.** Decomposes a large change into 5–30 units, one background subagent per git worktree, each opening a PR |
| `/clear [name]` | Start a new conversation with empty context; keeps project memory |
| `/code-review [level] [--fix] [--comment] [pr#\|branch\|path]` | **Skill.** Reviews the current diff/PR/branch/path; `ultra` runs a cloud multi-agent review (see `ultrareview.md`). Runs as a background subagent |
| `/compact [instructions]` | Summarize the conversation so far to free context |
| `/config [key=value ...]` | Open Settings UI, or set a key directly, e.g. `/config model=sonnet` |
| `/context [all]` | Visualize context window usage as a colored grid |
| `/debug [description]` | **Skill.** Enable debug logging and troubleshoot via the session debug log |
| `/doctor` | **Skill.** Setup checkup: installation health, unused skills/MCP/plugins, slow hooks, `CLAUDE.md` trimming |
| `/effort [level\|auto]` | Set model effort: `low`, `medium`, `high`, `xhigh`, `max`, or `ultracode` |
| `/fork [prompt]` | Copy the conversation into a new background session |
| `/goal [condition\|clear]` | Set a completion condition; Claude keeps working across turns until met |
| `/hooks` | Read-only browser for configured hook events |
| `/loop [interval] [prompt]` | **Skill.** Run a prompt repeatedly while the session stays open; self-paces if interval omitted |
| `/mcp [reconnect\|enable\|disable]` | Manage MCP server connections and OAuth |
| `/model [model]` | Switch AI model and save as default |
| `/permissions` | Interactive permission-rule editor; `--export`/`--import` for JSON |
| `/plugin` | Manage extensions and plugins |
| `/rewind [N\|name]` | Roll back code and conversation to an earlier checkpoint |
| `/security-review [--fix] [branch\|path]` | **Skill.** Review diff/branch/path for security vulnerabilities |
| `/simplify [low\|medium\|high]` | **Skill.** Refactor without changing functionality |
| `/skills` | Interactive skill browser: view/enable/disable/uninstall; `--list` for text summary |
| `/subtask <instruction>` | Hand a side task to a subagent whose result returns into this conversation |
| `/usage` | Token/API usage for the session; alias `/cost` |
| `/verify` | **Skill.** Build and run the app to confirm a change works; manual-only since v2.1.215 |
| `/web-search <query>` | **Skill.** Search the web and summarize with cited sources |
| `/worktree [create\|list\|remove]` | Manage isolated git worktrees |
Two annotations appear in the full table:
- **Skill**: a bundled skill — a prompt handed to Claude, invocable the same way as a user-authored skill, and it can be overridden by a same-named skill in `.claude/skills/`.
- **Workflow**: a bundled dynamic workflow that fans work out across many subagents in the background.
## Notes
- Not every command appears for every user; availability depends on platform, plan, and environment.
- Bundled skills are available in every session; `disableBundledSkills` turns off all except `/doctor`.
- To add custom commands, write a skill (see `skills.md`).
- This is a Claude Code CLI feature. For the Agent SDK equivalent, see anthropic-agent-sdk. For the Claude API (Messages API) Agent Skills / tool use, see anthropic-api-tools-mcp.
## Related
- [skills.md](./skills.md) — how bundled and custom skills are authored
- [output-styles.md](./output-styles.md) — `/config` output style selection
references/skills-commands/output-styles.md
<!-- source: https://code.claude.com/docs/en/output-styles / last verified: 2026-08-07 -->
# Output styles
Output styles change how Claude responds, not what Claude knows — they modify the system prompt to set role, tone, and output format. Use one when you keep re-prompting for the same voice/format every turn, or want Claude to act as something other than a software engineer. For project/codebase instructions, use CLAUDE.md instead.
## Signature / Usage
```markdown
---
name: Diagrams first
description: Lead every explanation with a diagram
keep-coding-instructions: true
---
When explaining code, architecture, or data flow, start with a Mermaid diagram showing the structure, then explain in prose.
```
Set without the menu:
```json
{
"outputStyle": "Explanatory"
}
```
## Options / Props
Frontmatter fields:
| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `name` | string | file name | Style name |
| `description` | string | none | Shown in the `/config` picker |
| `keep-coding-instructions` | boolean | `false` | Keep Claude Code's built-in software-engineering instructions alongside the custom instructions |
| `force-for-plugin` | boolean | `false` | Plugin styles only — auto-apply whenever the plugin is enabled, overriding the user's `outputStyle` setting |
Built-in styles: **Default** (existing system prompt), **Proactive** (executes immediately, assumes reasonable defaults, stronger autonomy than auto mode but still shows permission prompts), **Explanatory** (adds "Insights" between steps), **Learning** (collaborative; adds `TODO(human)` markers for you to fill in).
File locations: `~/.claude/output-styles` (user), `.claude/output-styles` (project — loads from every nested directory between cwd and repo root, closest wins on name clash), `.claude/output-styles` under managed policy (org). Plugins ship an `output-styles/` directory.
## Notes
- Applies to the main conversation only; a subagent runs its own system prompt and isn't affected, except a fork which inherits the parent's full system prompt.
- Takes effect after `/clear` or a new session — it's read once at session start.
- The standalone `/output-style` command was removed in v2.1.91; use `/config` or edit `outputStyle` directly.
- This is a Claude Code CLI feature. For the Agent SDK equivalent, see anthropic-agent-sdk. For the Claude API (Messages API) Agent Skills / tool use, see anthropic-api-tools-mcp.
## Related
- [commands.md](./commands.md) — `/config` command that opens the style picker
- [skills.md](./skills.md) — task-specific instructions loaded on invocation, vs. an always-on style
references/skills-commands/prompt-library.md
<!-- source: https://code.claude.com/docs/en/prompt-library / last verified: 2026-08-07 -->
# Prompt library
A library of copy-paste prompts for Claude Code, tagged by task and SDLC phase. Collected from Anthropic's Common workflows, Best practices, and "How Anthropic teams use Claude Code" guides. Prompts are starting points rather than scripts — open "Why this works" on the live page under any prompt to see the pattern behind it.
## Signature / Usage
```text
give me an overview of this codebase: architecture, key directories, and how the pieces connect
```
```text
write tests for {path}, run them, and fix any failures
```
## Options / Props
Categories (SDLC phase → tags), representative prompts per phase:
| Phase | Tag | Example prompt |
| --- | --- | --- |
| Discover | Onboard / Understand | "give me an overview of this codebase" · "where do we {behavior}?" |
| Design | Plan / Prototype | "plan how to refactor the {target} to {goal}. list the files you would change, but don't edit anything yet" |
| Build | Implement / Test / Refactor / Review / Steer | "write tests for {feature} first, then implement it until they pass" · "review my uncommitted changes and flag anything that looks risky" |
| Ship | Git / Release | "commit these changes with a message that summarizes what I did" · "write a GitHub Actions workflow that {steps} on every push to {branch}" |
| Operate | Debug / Incident / Data / Automate | "the {test} test is failing, find out why and fix it" · "create a /{name} skill for this project that {steps}" |
## Notes
- Six recurring patterns make these prompts work: describe the outcome not the steps; give Claude a way to check its own work (run/test/compare/verify); point at a reference file or pattern to match; state a measurable target; paste the artifact (error/log/screenshot) directly or `@`-mention a file; say how you want the answer formatted (pair with an output style for a lasting default).
- This page renders as an interactive filterable widget on the live site; the content above is the underlying prompt set, not a literal page transcript.
- This is a Claude Code CLI feature. For the Agent SDK equivalent, see anthropic-agent-sdk. For the Claude API (Messages API) Agent Skills / tool use, see anthropic-api-tools-mcp.
## Related
- [output-styles.md](./output-styles.md) — make a prompt's answer format the session default
- [skills.md](./skills.md) — turn a recurring prompt into a reusable `/command`
references/skills-commands/README.md
# skills-commands
| Name | Description | Path |
| --- | --- | --- |
| Commands | Commands control Claude Code from inside a session: switch models, manage permissions, clear context, run a workflow. | [commands.md](./commands.md) |
| Output styles | Output styles change how Claude responds, not what Claude knows — they modify the system prompt to set role, tone, and output format. | [output-styles.md](./output-styles.md) |
| Prompt library | A library of copy-paste prompts for Claude Code, tagged by task and SDLC phase. | [prompt-library.md](./prompt-library.md) |
| Skills | Create a `SKILL.md` file with instructions and Claude Code adds it to its toolkit. | [skills.md](./skills.md) |
references/skills-commands/skills.md
<!-- source: https://code.claude.com/docs/en/skills / last verified: 2026-08-07 -->
# Skills
Create a `SKILL.md` file with instructions and Claude Code adds it to its toolkit. Claude loads a skill automatically when relevant, or you invoke it directly with `/skill-name`. Claude Code skills follow the [Agent Skills](https://agentskills.io) open standard, extended with invocation control, subagent execution, and dynamic context injection.
Create a skill when you keep pasting the same instructions into chat, or when a CLAUDE.md section has grown into a procedure rather than a fact. Unlike CLAUDE.md, a skill's body loads only when used, so long reference material costs almost nothing until needed.
Custom commands (`.claude/commands/deploy.md`) and skills (`.claude/skills/deploy/SKILL.md`) both create `/deploy` and work the same way; existing `.claude/commands/` files keep working, but a skill of the same name takes precedence.
## Signature / Usage
```yaml
---
name: my-skill
description: What this skill does
disable-model-invocation: true
allowed-tools: Read Grep
---
Your skill instructions here...
```
Minimal example (`~/.claude/skills/summarize-changes/SKILL.md`):
```yaml
---
description: Summarizes uncommitted changes and flags anything risky. Use when the user asks what changed, wants a commit message, or asks to review their diff.
---
## Current changes
!`git diff HEAD`
## Instructions
Summarize the changes above in two or three bullet points, then list any risks.
```
## Options / Props
Frontmatter fields (all optional; only `description` recommended):
| Name | Type | Description |
| --- | --- | --- |
| `name` | string | Display name in skill listings. Defaults to directory name |
| `description` | string | What the skill does and when to use it. Combined with `when_to_use`, truncated at 1,536 characters |
| `when_to_use` | string | Additional trigger context appended to `description` |
| `argument-hint` | string | Autocomplete hint, e.g. `[issue-number]` |
| `arguments` | string or list | Named positional arguments for `$name` substitution |
| `disable-model-invocation` | boolean | `true` prevents Claude from auto-invoking; manual `/name` only. Default `false` |
| `user-invocable` | boolean | `false` hides from `/` menu; Claude can still invoke. Default `true` |
| `allowed-tools` | string or list | Tools pre-approved without prompting for the invoking turn |
| `disallowed-tools` | string or list | Tools removed from the pool while the skill is active |
| `model` | string | Model override while active (`opus`, `sonnet`, or `inherit`) |
| `effort` | string | Effort override: `low`, `medium`, `high`, `xhigh`, `max` |
| `context` | string | `fork` runs the skill in a forked subagent |
| `agent` | string | Subagent type when `context: fork` (`Explore`, `Plan`, `general-purpose`, or custom) |
| `background` | boolean | With `context: fork`, `false` waits for the result inline instead of backgrounding. Default `true` |
| `hooks` | object | Hooks scoped to the skill's lifecycle |
| `paths` | string or list | Glob patterns limiting auto-activation to matching files |
| `shell` | string | `bash` (default) or `powershell` for `` !`command` `` blocks |
| `metadata` | map | Free-form key-value data for external tooling; not acted on by Claude Code |
| `license` | string | Agent Skills spec field; accepted but unused by Claude Code |
| `compatibility` | string | Agent Skills spec field, up to 500 chars; accepted but unused |
Outside Claude Code (claude.ai uploads, Skills API, `package_skill.py`), only `name`, `description`, `license`, `compatibility`, `metadata`, `allowed-tools` are valid — any other field is a hard packaging error.
String substitutions available in skill content: `$ARGUMENTS`, `$ARGUMENTS[N]` / `$N`, `$name` (from `arguments`), `${CLAUDE_SESSION_ID}`, `${CLAUDE_EFFORT}`, `${CLAUDE_SKILL_DIR}`, `${CLAUDE_PROJECT_DIR}`.
## Notes
- Where a skill lives determines scope: enterprise (managed settings) > personal (`~/.claude/skills/`) > project (`.claude/skills/`) > plugin (`<plugin>/skills/`); same-name skills at a higher level override a lower one, and any level overrides a bundled skill of the same name.
- Nested `.claude/skills/` directories (e.g. `apps/web/.claude/skills/`) load lazily the first time Claude touches a file in that subdirectory, and a name clash surfaces as `/apps/web:deploy` alongside the unqualified `/deploy`.
- `context: fork` runs the skill as a background subagent by default (`background: false` to block); a forked skill's edits sit outside session checkpoints, so `/rewind` won't undo them.
- Rendered skill content stays in context for the rest of the session (not re-read per turn); auto-compaction re-attaches the most recent invocation of each skill up to a 25,000-token combined budget, 5,000 tokens each.
- `skillOverrides` in settings (`"on"`, `"name-only"`, `"user-invocable-only"`, `"off"`) controls visibility without editing the skill's own frontmatter — useful for skills checked into a shared repo.
- Cowork and cloud sessions (including routines) do not read `~/.claude/skills/`; only project skills committed to the repo, or skills enabled for your claude.ai account, are available there.
- This is a Claude Code CLI feature. For the Agent SDK equivalent, see anthropic-agent-sdk. For the Claude API (Messages API) Agent Skills / tool use — and the Skills API — see anthropic-api-tools-mcp.
## Related
- [commands.md](./commands.md)
- [hooks.md](../hooks/hooks.md)
references/subagents/agent-teams.md
<!-- source: https://code.claude.com/docs/en/agent-teams / last verified: 2026-08-07 -->
# Agent teams
Coordinate multiple Claude Code instances working together: one session acts as team lead, teammates work independently in their own context windows and communicate directly with each other. Experimental, disabled by default.
## Signature / Usage
```json title="settings.json"
{
"env": {
"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
}
}
```
```text
I'm designing a CLI tool that tracks TODO comments across the codebase.
Spawn three teammates to explore this from different angles:
one on UX, one on technical architecture, one playing devil's advocate.
```
## Options / Props
| Setting | Values | Description |
|---|---|---|
| `teammateMode` (`settings.json`) / `--teammate-mode` | `in-process` (default) \| `auto` \| `tmux` \| `iterm2` | Display mode: single terminal vs split panes (requires tmux or iTerm2 `it2` CLI) |
| Default teammate model (`/config`) | model name \| "Default (leader's model)" | Model used when a spawn prompt doesn't specify one |
| Component | Role |
|---|---|
| Team lead | Main session; spawns teammates, coordinates work |
| Teammates | Separate Claude Code instances working assigned tasks |
| Task list | Shared work items teammates claim/complete (`~/.claude/tasks/{team-name}/`) |
| Mailbox | Per-agent JSON message queue (`~/.claude/teams/{team-name}/inboxes/{agent-name}.json`) |
| vs Subagents | Subagents | Agent teams |
|---|---|---|
| Context | Own window; results return to caller | Own window; fully independent |
| Communication | Report to main agent only | Teammates message each other directly |
| Coordination | Main agent manages all work | Shared task list, self-coordination |
| Token cost | Lower | Higher |
## Notes
- Enable via `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1`; without it no team is set up and Claude never spawns teammates.
- Reference a [subagent](./sub-agents.md) definition by name when spawning a teammate to reuse a role; `skills`/`mcpServers` frontmatter fields don't apply when the definition runs as a teammate (teammates load skills/MCP from project/user settings normally).
- Teammates start with the lead's permission mode; `bypassPermissions` propagates, per-teammate mode can be changed after spawn but not set at spawn time. Plan approval requests route to the lead.
- Task claiming uses file locking; tasks can depend on other tasks and unblock automatically on completion.
- Limitations: no session resumption for in-process teammates (`/resume`/`/rewind`), task status can lag, one team per session, no nested teams (teammates can't spawn teammates), split panes require tmux/iTerm2.
- Best for research/review, new independent modules, competing-hypothesis debugging, cross-layer coordination; not for sequential/same-file work (use a single session or [subagents](./sub-agents.md) instead).
## Related
- [sub-agents.md](./sub-agents.md)
- [agents.md](./agents.md)
- [workflows.md](./workflows.md)
references/subagents/agent-view.md
<!-- source: https://code.claude.com/docs/en/agent-view / last verified: 2026-08-07 -->
# Agent view
Dispatch and manage many background Claude Code sessions from a single terminal screen. Research preview; requires Claude Code v2.1.139+.
## Signature / Usage
```bash
claude agents # open agent view
claude --bg "your task description" # dispatch from shell
claude --bg --name "session-name" "task"
claude --bg --model opus "task"
claude agents --json # list sessions as JSON
claude attach <id>
claude stop <id>
claude rm <id>
```
From inside a session: `/background` or `/bg` moves the current conversation to background; `/fork` (v2.1.212+) copies it to a new background session.
## Options / Props
| Session state | Meaning |
|---|---|
| Working | Actively running tools / generating |
| Needs input | Waiting for answer/permission/action |
| Idle | Ready for next prompt |
| Completed | Task finished successfully |
| Failed | Ended with error |
| Stopped | Stopped manually |
| Keyboard shortcut | Action |
|---|---|
| `↑`/`↓` | Navigate rows |
| `Space` | Open peek panel |
| `Enter` / `→` | Attach to full session |
| `←` | Return to shell/agent view |
| `Ctrl+T` | Pin session |
| `Ctrl+R` | Rename session |
| `Ctrl+X` | Stop session (twice to delete) |
| `Ctrl+S` | Toggle grouping by state/directory |
| CLI flag | Purpose |
|---|---|
| `--permission-mode`, `--model`, `--effort` | Configure dispatched sessions |
| `--settings`, `--mcp-config`, `--add-dir` | Settings/MCP/extra directories for agent view |
## Notes
- Background sessions automatically move into isolated git worktrees under `.claude/worktrees/` before editing files. Disable with `{"worktree": {"bgIsolation": "none"}}` in `.claude/settings.json`.
- Dispatch prefixes: `@agent-name` (run specific subagent), `@repo-name` (target directory), `/<command>`, `! <command>` (shell as background job), `Shift+Enter` (dispatch and attach immediately).
- Sessions run locally, persist across sleep, but stop on shutdown; managed by a supervisor process (`claude daemon status` / `claude daemon stop --any`).
- Commit changes before deleting sessions that edited files — worktrees are deleted with the session.
- Multiple agents consume rate-limit quota proportionally.
## Related
- [agents.md](./agents.md)
- [sub-agents.md](./sub-agents.md)
references/subagents/agents.md
<!-- source: https://code.claude.com/docs/en/agents / last verified: 2026-08-07 -->
# Run agents in parallel (overview)
Compares the four ways Claude Code takes on multiple tasks at once: subagents, agent view, agent teams, and dynamic workflows.
## Signature / Usage
```text
# Delegated worker inside one session
Use the code-reviewer subagent to review this PR
# Background, dispatched session
claude --bg "audit the auth module"
# Coordinated peer sessions (experimental)
Spawn three teammates to review PR #142 from different angles
# Script-orchestrated fan-out
ultracode: audit every API endpoint under src/routes/ for missing auth checks
```
## Options / Props
| Approach | What it gives you | Use it when |
|---|---|---|
| [Subagents](./sub-agents.md) | Delegated workers in one session, own context, return a summary | A side task would flood the main conversation |
| [Agent view](./agent-view.md) | One screen (`claude agents`) to dispatch/monitor background sessions | Several independent tasks to hand off and check later |
| [Agent teams](./agent-teams.md) | Coordinated sessions with shared task list + inter-agent messaging | Claude should split a project and keep workers in sync |
| [Dynamic workflows](./workflows.md) | A script running many subagents, cross-checking results | Work too big/too repeatable for turn-by-turn coordination |
## Notes
- Workers in every approach are Claude sessions; to involve a different tool, expose it via an MCP server.
- [Worktrees](https://code.claude.com/docs/en/worktrees) give each session a separate git checkout so parallel sessions don't collide; agent view moves each dispatched session into its own worktree automatically.
- `/batch` is a bundled skill that splits one large change into 5-30 worktree-isolated subagents, each opening a PR — a packaged use of subagents + worktrees, not a separate coordination style.
- A background bash command and a forked subagent (`/subtask`) are not separate "run agents" surfaces: the former runs one shell command without spawning an agent, the latter is a way to spawn a subagent.
- A [routine](./routines.md) runs a session on a schedule in Anthropic's cloud, not in parallel on your machine.
- Check running work: `claude agents` (agent view), `/tasks` (background items in the current session, including finished subagents), `/workflows` (dynamic workflow runs), `/agents` (prints subagent file locations, no longer opens a panel as of v2.1.198).
## Related
- [sub-agents.md](./sub-agents.md)
- [agent-view.md](./agent-view.md)
- [agent-teams.md](./agent-teams.md)
- [workflows.md](./workflows.md)
references/subagents/desktop-scheduled-tasks.md
<!-- source: https://code.claude.com/docs/en/desktop-scheduled-tasks / last verified: 2026-08-07 -->
# Desktop scheduled tasks
Local recurring or one-off tasks configured from the Claude Code Desktop app's **Routines** page. A task starts a new session automatically on your machine, with direct access to local files and tools, but only fires while the Desktop app is open and the computer is awake.
## Signature / Usage
```text
# In the Desktop app: Routines sidebar → New routine → Local
# Or describe it in any session:
set up a daily code review that runs every morning at 9am
remind me at 3pm tomorrow to check the deploy # one-time, self-disables after firing
```
```text
# Prompt lives on disk, editable directly:
~/.claude/scheduled-tasks/<task-name>/SKILL.md # YAML frontmatter (name, description) + prompt body
```
## Options / Props
| Field | Description |
|---|---|
| Name | Task identifier; converted to lowercase kebab-case and used as the folder name; must be unique |
| Description | Short summary shown in the task list |
| Instructions | The prompt Claude runs; includes permission-mode and model pickers, working folder, and isolated-worktree toggle |
| Schedule | Manual, Hourly, Daily (default 9:00 AM local), Weekdays, Weekly — or ask Claude in plain language for finer-grained intervals |
| Comparison | Cloud (Routines) | Desktop | `/loop` |
|---|---|---|---|
| Runs on | Cloud, Anthropic-managed by default | Your machine | Your machine |
| Requires machine on | No | Yes | Yes |
| Requires open session | No | No | Yes |
| Persistent across restarts | Yes | Yes | Restored on `--resume` if unexpired |
| Access to local files | No (fresh clone) | Yes | Yes |
| MCP servers | Connectors per task | Config files and connectors | Inherits from session |
| Permission prompts | No (runs autonomously) | Configurable per task | Inherits from session |
| Minimum interval | 1 hour | 1 minute | 1 minute |
## Notes
- Desktop checks the schedule every minute while the app is open; each task fires with a small, deterministic per-task delay to stagger API traffic.
- By default a run uses the working directory's current state, including uncommitted changes; enable the worktree toggle to give each run its own isolated Git worktree.
- Missed runs: on app start or wake, Desktop starts exactly one catch-up run for the most recently missed time in the last 7 days and discards older misses; add prompt guardrails (e.g. time-of-day checks) if exact timing matters.
- Each task has its own permission mode; in Manual mode an unapproved tool call stalls the run until you approve it, and future runs of that task auto-approve the same tools.
- A running task can reschedule itself or edit its own prompt via the `update_scheduled_task` MCP tool.
- Deleting a task with **Also delete files on disk** removes its `SKILL.md` and data from `~/.claude/scheduled-tasks/`.
- Distinct from Anthropic's Agent Skills (`SKILL.md` in this repository's sense): the on-disk task prompt happens to reuse the `SKILL.md` filename/frontmatter format but is a Desktop scheduling artifact, not a discoverable skill.
## Related
- [routines.md](./routines.md)
- [scheduled-tasks.md](./scheduled-tasks.md)
references/subagents/README.md
# Subagents
| Name | Description | Path |
|------|-------------|------|
| Agent teams | Coordinate multiple Claude Code instances working together: one session acts as team lead… | [agent-teams.md](./agent-teams.md) |
| Agent view | Dispatch and manage many background Claude Code sessions from a single terminal screen… | [agent-view.md](./agent-view.md) |
| Run agents in parallel (overview) | Compares the four ways Claude Code takes on multiple tasks at once: subagents, agent… | [agents.md](./agents.md) |
| Desktop scheduled tasks | Local recurring or one-off tasks configured from the Claude Code Desktop app's… | [desktop-scheduled-tasks.md](./desktop-scheduled-tasks.md) |
| Trigger a routine via API (/fire) | Start a Claude Code routine session on demand by sending an authenticated POST request… | [routines-fire.md](./routines-fire.md) |
| Routines | A saved Claude Code configuration (prompt, one or more repositories, connectors) that… | [routines.md](./routines.md) |
| Scheduled tasks (/loop) | Run a prompt repeatedly on an interval, poll for status, or set a one-time reminder… | [scheduled-tasks.md](./scheduled-tasks.md) |
| Subagents | Specialized AI assistants that handle specific types of tasks in their own context… | [sub-agents.md](./sub-agents.md) |
| Dynamic workflows | A JavaScript script that orchestrates subagents at scale (dozens to hundreds per run)… | [workflows.md](./workflows.md) |
references/subagents/routines-fire.md
<!-- source: https://platform.claude.com/docs/en/api/claude-code/routines-fire / last verified: 2026-08-07 -->
# Trigger a routine via API (/fire)
Start a Claude Code routine session on demand by sending an authenticated POST request. Experimental endpoint on the Claude Code product surface (not the general Claude Platform API); external HTTP entry point that starts a new run of an existing routine and returns the resulting session ID/URL.
## Signature / Usage
```http
POST https://api.anthropic.com/v1/claude_code/routines/{routine_id}/fire
```
```bash
curl -X POST https://api.anthropic.com/v1/claude_code/routines/$ROUTINE_ID/fire \
-H "Authorization: Bearer $ROUTINE_TOKEN" \
-H "anthropic-version: 2023-06-01" \
-H "anthropic-beta: experimental-cc-routine-2026-04-01" \
-H "Content-Type: application/json" \
-d '{"text": "Sentry alert SEN-4521 fired in prod. Stack trace attached."}'
```
Success response:
```json
{
"type": "routine_fire",
"claude_code_session_id": "session_01HJKLMNOPQRSTUVWXYZ",
"claude_code_session_url": "https://claude.ai/code/session_01HJKLMNOPQRSTUVWXYZ"
}
```
## Options / Props
| Header | Required | Description |
|---|---|---|
| `Authorization` | Yes | `Bearer <token>`, per-routine token prefixed `sk-ant-oat01-` |
| `anthropic-beta` | Yes | Must include `experimental-cc-routine-2026-04-01` |
| `anthropic-version` | Yes | API version, e.g. `2023-06-01` |
| `Content-Type` | When body present | `application/json` |
| Path parameter | Type | Description |
|---|---|---|
| `routine_id` | string | Routine identifier, prefixed `trig_` |
| Body field | Type | Required | Description |
|---|---|---|---|
| `text` | string | No | Freeform run-specific context (alert body, log line, diff). Not parsed. Max 65,536 characters. Passed alongside the routine's saved prompt |
| Response field | Type | Description |
|---|---|---|
| `type` | string | Always `routine_fire` |
| `claude_code_session_id` | string | New session ID |
| `claude_code_session_url` | string | claude.ai link to watch/review/continue the run |
| HTTP status | Error type | Cause |
|---|---|---|
| 400 | `invalid_request_error` | Missing/invalid `anthropic-beta`, `text` > 65,536 chars, or routine paused |
| 401 | `authentication_error` | No bearer token, or token doesn't match this routine |
| 403 | `permission_error` | Account/org lacks access to this endpoint |
| 404 | `not_found_error` | Routine does not exist |
| 429 | `rate_limit_error` | Daily routine run limit or usage limit reached (`Retry-After` header) |
| 500 | `api_error` | Unexpected server error; retry with backoff |
| 503 | `overloaded_error` | Temporarily overloaded; retry after a short delay |
## Notes
This is the API endpoint for triggering a Claude Code routine from outside the product (a separate surface from the general Claude Platform API). Authentication uses a per-routine bearer token (`sk-ant-oat01-...`) rather than a workspace-level `x-api-key`; the token can only fire that one routine and grants no read access. There is no idempotency key — retrying a request creates additional sessions. Not available in the Anthropic SDKs. Requires a claude.ai account (Pro/Max/Team/Enterprise) with Claude Code on the web enabled.
## Related
- [routines.md](./routines.md)
references/subagents/routines.md
<!-- source: https://code.claude.com/docs/en/routines / last verified: 2026-08-07 -->
# Routines
A saved Claude Code configuration (prompt, one or more repositories, connectors) that runs automatically on Anthropic-managed cloud infrastructure, triggered on a schedule, via API call, or on GitHub events. Research preview.
## Signature / Usage
```bash
# Create/manage from the CLI
/schedule daily PR review at 9am
/schedule list
/schedule update
/schedule run
```
```bash
# Trigger via API (see routines-fire.md for full reference)
curl -X POST https://api.anthropic.com/v1/claude_code/routines/$ROUTINE_ID/fire \
-H "Authorization: Bearer $ROUTINE_TOKEN" \
-H "anthropic-version: 2023-06-01" \
-H "anthropic-beta: experimental-cc-routine-2026-04-01" \
-H "Content-Type: application/json" \
-d '{"text": "Sentry alert SEN-4521 fired in prod. Stack trace attached."}'
```
## Options / Props
| Trigger type | Configured from | Behavior |
|---|---|---|
| Scheduled | Web, Desktop, `/schedule` | Recurring cadence (hourly/daily/weekly, min interval 1h) or one-off at a specific timestamp |
| API | Web only | Dedicated `/fire` HTTP endpoint with per-routine bearer token |
| GitHub | Web only | Fires on repo events (pull_request, release) after installing the Claude GitHub App, with optional filters |
| Setting | Description |
|---|---|
| Repositories | Cloned fresh from default branch each run; Claude pushes to `claude/`-prefixed branches |
| Environment | [Cloud environment](https://code.claude.com/docs/en/cloud-environments): network access level, env vars, setup script |
| Connectors | claude.ai MCP connectors; all included by default, remove unneeded ones — Claude can use every tool without asking |
| GitHub PR filter field | Matches |
|---|---|
| Author, Title, Body, Base branch, Head branch, Labels, Is draft, Is merged | equals / contains / starts with / is one of / is not one of / matches regex |
## Notes
- Routines run autonomously as full cloud sessions: no permission-mode picker, no approval prompts during a run.
- The routine's saved prompt is delivered as an authorized assigned task, not untrusted input; `text` sent via API `/fire` or **Run now** arrives wrapped in a `<routine-fire-payload>` block labeled untrusted, and the prompt must explicitly reference it to act on it.
- Belong to the individual claude.ai account (not shared with teammates); actions via GitHub/connectors appear as that user.
- Compare with `/loop` (session-scoped, local) and Desktop scheduled tasks (local, file access) — see scheduled-tasks.md.
- Daily cap on routine runs per account (separate from subscription usage limits); one-off runs are exempt from the daily cap.
- Team/Enterprise Owners can disable routines org-wide from admin settings.
## Related
- [routines-fire.md](./routines-fire.md)
- [scheduled-tasks.md](./scheduled-tasks.md)
references/subagents/scheduled-tasks.md
<!-- source: https://code.claude.com/docs/en/scheduled-tasks / last verified: 2026-08-07 -->
# Scheduled tasks (/loop)
Run a prompt repeatedly on an interval, poll for status, or set a one-time reminder within an open Claude Code session, using `/loop` and the cron scheduling tools (`CronCreate`/`CronList`/`CronDelete`). Session-scoped: tasks live in the current conversation and stop when a new one starts.
## Signature / Usage
```text
/loop 5m check if the deployment finished and tell me what happened
/loop check whether CI passed and address any review comments # Claude picks the interval
/loop # built-in maintenance prompt
/loop 20m /review-pr 1234 # re-run a skill each iteration
remind me at 3pm to push the release branch
in 45 minutes, check whether the integration tests passed
```
## Options / Props
| What you provide | Example | Behavior |
|---|---|---|
| Interval + prompt | `/loop 5m check the deploy` | Fixed-schedule cron job |
| Prompt only | `/loop check the deploy` | Claude chooses delay (1min–1h) each iteration based on observation |
| Neither | `/loop` | Built-in maintenance prompt (or project/user `loop.md`), dynamically scheduled |
| Tool | Purpose |
|---|---|
| `CronCreate` | Schedule a task: 5-field cron expression, prompt, recurring or one-shot |
| `CronList` | List tasks with IDs, schedules, prompts |
| `CronDelete` | Cancel by 8-char task ID |
| Comparison | Cloud (Routines) | Desktop | `/loop` |
|---|---|---|---|
| Runs on | Anthropic cloud | Your machine | Your machine |
| Requires machine on | No | Yes | Yes |
| Requires open session | No | No | Yes |
| Access to local files | No (fresh clone) | Yes | Yes |
| Minimum interval | 1 hour | 1 minute | 1 minute |
`loop.md` locations (first found wins): `.claude/loop.md` (project) > `~/.claude/loop.md` (user); replaces the default `/loop` maintenance prompt; ignored when a prompt is given on the command line; truncated beyond 25,000 bytes.
## Notes
- A session holds up to 50 scheduled tasks. All times interpreted in local timezone.
- Jitter: recurring tasks fire up to 30 min after scheduled time (or up to half the interval for sub-hourly jobs); one-shot tasks at `:00`/`:30` fire up to 90s early. Pick a non-`:00`/`:30` minute for exact timing.
- Recurring tasks expire automatically 7 days after creation (fires once more, then deletes itself); for longer-lived scheduling use [Routines](./routines.md) or Desktop scheduled tasks.
- Tasks only fire while Claude Code is idle (not mid-response); no catch-up for missed fires. Starting a fresh conversation clears session-scoped tasks; `--resume`/`--continue` restores unexpired ones.
- Disable entirely with `CLAUDE_CODE_DISABLE_CRON=1`.
- On Amazon Bedrock / Claude Platform on AWS / Google Cloud's Agent Platform / Microsoft Foundry, a prompt with no interval runs on a fixed 10-minute schedule instead of dynamic, and `loop.md` isn't read.
## Related
- [routines.md](./routines.md)
references/subagents/sub-agents.md
<!-- source: https://code.claude.com/docs/en/sub-agents / last verified: 2026-08-07 -->
# Subagents
Specialized AI assistants that handle specific types of tasks in their own context window, with a custom system prompt, tool access, and permissions, then return a summary to the caller.
## Signature / Usage
```markdown title=".claude/agents/code-reviewer.md"
---
name: code-reviewer
description: Reviews code for quality and best practices. Use proactively after code changes.
tools: Read, Glob, Grep
model: sonnet
---
You are a code reviewer. When invoked, analyze the code and provide
specific, actionable feedback on quality, security, and best practices.
```
Invoke explicitly with natural language ("Use the code-reviewer subagent to..."), by `@`-mention (`@agent-code-reviewer`), or run the whole session as that subagent with `claude --agent code-reviewer` / `"agent": "code-reviewer"` in `settings.json`.
## Built-in subagents
| Agent | Model | Tools | Purpose |
|---|---|---|---|
| Explore | Inherits (capped at Opus on Claude API), skips CLAUDE.md/git status | Read-only (no Write/Edit) | Fast codebase search/discovery |
| Plan | Inherits | Read-only | Research during plan mode |
| general-purpose | Inherits | Every tool available to subagents | Complex multi-step research + modification |
| claude | Inherits | Every tool available to subagents | Catch-all; default agent for `claude agents` background sessions |
| statusline-setup | Sonnet | — | `/statusline` configuration |
| claude-code-guide | Haiku | — | Questions about Claude Code itself |
A user/project subagent named `Explore` overrides the built-in one and keeps its own `model` field.
## Options / Props
Supported YAML frontmatter fields (only `name` and `description` required):
| Name | Type | Description |
|---|---|---|
| `name` | string | Unique identifier, lowercase + hyphens. No `:` (reserved for plugin-scoped IDs) |
| `description` | string | When Claude should delegate to this subagent |
| `tools` | string list | Allowlist of tools. Omit to inherit every tool available to subagents. `mcp__<server>` / `mcp__<server>__*` patterns supported |
| `disallowedTools` | string list | Denylist, removed from inherited/specified tools; applied before `tools` |
| `model` | string | `sonnet` \| `opus` \| `haiku` \| `fable` \| full model ID \| `inherit` (default) |
| `permissionMode` | string | `default` \| `acceptEdits` \| `auto` \| `dontAsk` \| `bypassPermissions` \| `plan` \| `manual` (alias of `default`) |
| `maxTurns` | number | Max agentic turns before the subagent stops |
| `skills` | string list | Skills preloaded (full content) into context at startup |
| `mcpServers` | list | MCP servers scoped to this subagent (name reference or inline config) |
| `hooks` | object | Lifecycle hooks scoped to this subagent (`PreToolUse`, `PostToolUse`, `Stop`→`SubagentStop`) |
| `memory` | string | `user` \| `project` \| `local` — persistent memory directory across sessions |
| `background` | boolean | Force background execution. Default: Claude decides (background by default as of v2.1.198) |
| `effort` | string | `low` \| `medium` \| `high` \| `xhigh` \| `max`, overrides session effort |
| `isolation` | string | `worktree` — run in an isolated git worktree |
| `color` | string | Display color in task list/transcript |
| `initialPrompt` | string | Auto-submitted first user turn when run as main session agent via `--agent` |
## Scope / precedence
| Location | Scope | Priority |
|---|---|---|
| Managed settings `.claude/agents/` | Organization-wide | 1 (highest) |
| `--agents` CLI flag | Current session | 2 |
| `.claude/agents/` | Current project | 3 |
| `~/.claude/agents/` | All projects | 4 |
| Plugin `agents/` directory | Where plugin enabled | 5 (lowest) |
## Notes
- For the Agent SDK's own subagent definitions, see anthropic-agent-sdk.
- Subagents run in foreground (blocks conversation) or background (concurrent, permission prompts surface in main session); background is the default as of v2.1.198, with a reduced built-in tool set.
- Nesting: a subagent can spawn its own subagents up to 3 layers deep by default (`CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH`). Session cap: 200 subagents (`CLAUDE_CODE_MAX_SUBAGENTS_PER_SESSION`). Concurrent cap: 20 (`CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS`).
- A non-fork subagent starts with fresh context: its own system prompt, the delegation task message, CLAUDE.md hierarchy, a git status snapshot, and any preloaded skills. Explore/Plan skip CLAUDE.md and git status.
- A **fork** (`/subtask`, or `/fork` on older versions) inherits the entire conversation instead of starting fresh — same system prompt, tools, model, and message history as the main session; only its final result returns.
- Resume a finished subagent via `SendMessage` addressed to its agent ID/name to continue with full history instead of starting over.
- `Agent(agent-name)` syntax in `tools` restricts which subagent types a `--agent`-run main thread can spawn; `permissions.deny: ["Agent(name)"]` blocks a specific subagent globally.
- Subagent output is scanned for instruction-shaped patterns (e.g. fake `<system-reminder>` tags) before Claude reads it; matches get a `[harness: ...]` marker line, content is never altered/removed.
## Related
- [agents.md](./agents.md)
- [agent-teams.md](./agent-teams.md)
- [agent-view.md](./agent-view.md)
- [workflows.md](./workflows.md)
references/subagents/workflows.md
<!-- source: https://code.claude.com/docs/en/workflows / last verified: 2026-08-07 -->
# Dynamic workflows
A JavaScript script, written by Claude, that orchestrates subagents at scale (dozens to hundreds per run) via a runtime executing in the background while the session stays responsive. Requires Claude Code v2.1.154+.
## Signature / Usage
```text
ultracode: audit every API endpoint under src/routes/ for missing auth checks
```
```javascript title=".claude/workflows/audit-routes.js"
export const meta = {
name: 'audit-routes',
description: 'Audit every route handler for missing auth checks',
}
const found = await agent('List every .ts file under src/routes/.', {
schema: { type: 'object', required: ['files'], properties: { files: { type: 'array', items: { type: 'string' } } } },
})
const audits = await pipeline(found.files, file =>
agent(`Audit ${file} for missing authentication checks.`, { label: file }),
)
return audits.filter(Boolean)
```
`agent()` spawns one subagent; `pipeline()` runs one per item in a list; a stopped/errored `agent()` call resolves to `null`.
## Options / Props
| | Subagents | Skills | Agent teams | Workflows |
|---|---|---|---|---|
| Who decides what runs next | Claude, turn by turn | Claude | Lead agent, turn by turn | The script |
| Intermediate results | Context window | Context window | Shared task list | Script variables |
| Scale | A few per turn | Same as subagents | A handful of long-running peers | Dozens to hundreds per run |
| Interruption | Restarts the turn | Restarts the turn | Teammates keep running | Resumable in same session |
| Key (in `/workflows` progress view) | Action |
|---|---|
| `↑`/`↓` | Select phase/agent |
| `Enter`/`→` | Drill in |
| `Esc`/`←` | Back out |
| `f` | Filter agent list by status |
| `p` | Pause/resume run |
| `x` | Stop selected agent or whole run |
| `r` | Restart selected running agent |
| `s` | Save run's script as a command |
| Size guideline (`/config` → Dynamic workflow size, or `workflowSizeGuideline`) | Agent count |
|---|---|
| `unrestricted` | No cap, sized to task |
| `small` | < 5 |
| `medium` (default) | < 15 |
| `large` | < 50 |
| Constraint | Value |
|---|---|
| Max concurrent agents | 16 (fewer on limited-CPU machines) |
| Max agents per run | 1,000 |
| Large-workflow warning threshold | > 25 agents or > 1.5M projected tokens |
## Notes
- Trigger a workflow with the `ultracode` keyword in a prompt (or natural language like "use a workflow"), with `/effort ultracode` (turns on for every substantive task in the session), or by running an existing command like the bundled `/deep-research`.
- Save a run's script as a reusable command via `/workflows` → select run → `s`, to `.claude/workflows/` (project, shared) or `~/.claude/workflows/` (personal). Runs as `/<name>`. Accepts input via `args` global.
- Workflow subagents always run in `acceptEdits` mode regardless of session permission mode; file edits auto-approve. Shell/web/MCP tools outside your allowlist can still prompt mid-run.
- No mid-run user input and no direct filesystem/shell access from the script itself — only spawned agents touch the filesystem.
- Resume rule: an agent still running when stopped restarts; replay follows start order, so every agent that started after the first unfinished one re-runs even if it had completed — fan-out into many small agents preserves more progress than one long agent.
- Turn off: `/config` toggle, `"disableWorkflows": true` in settings, or `CLAUDE_CODE_DISABLE_WORKFLOWS=1`; org-wide via managed settings.
- Distribute via plugin `workflows/` directory; namespaced as `/plugin-name:workflow-name`.
## Related
- [agents.md](./agents.md)
- [sub-agents.md](./sub-agents.md)
- [agent-teams.md](./agent-teams.md)
references/tools/advisor.md
<!-- source: https://code.claude.com/docs/en/advisor / last verified: 2026-08-07 -->
# Advisor tool
Experimental server-side tool that pairs the main model with a stronger advisor model Claude consults at key moments — before committing to an approach, when stuck on a recurring error, or before declaring a task complete. The advisor receives the full conversation, including every tool call and result, and returns guidance Claude applies before continuing. Anthropic API only; not available on Amazon Bedrock, Claude Platform on AWS, Google Cloud's Agent Platform, or Microsoft Foundry.
## Signature / Usage
```bash
/advisor opus
claude --advisor opus
```
```json
{ "advisorModel": "opus" }
```
## Options / Props
| Name | Type | Description |
| --- | --- | --- |
| `/advisor [model\|off]` | command | Set/change the advisor mid-session and save as default; no argument opens a picker |
| `advisorModel` | setting | Persistent default advisor model in a settings file |
| `--advisor <model>` | CLI flag | Advisor for a single session only; not listed in `claude --help` |
Accepted advisor per main model (advisor must be at least as capable as the main model):
| Main model | Accepted advisors |
| --- | --- |
| Haiku 4.5 | Fable, Opus, Sonnet |
| Sonnet 4.6 | Fable, Opus, Sonnet |
| Sonnet 5 | Fable, Opus, Sonnet 5 |
| Opus 4.6 | Fable, Opus, Sonnet 5 |
| Opus 4.7+ | Fable, Opus 4.7+ |
| Fable 5 | Fable only |
## Notes
- Fable 5 is not currently offered as the advisor even where the pairing table allows it (`/advisor fable` is rejected) — a remote rollout controls when it returns.
- Claude decides when to call the advisor; there's no cap or force setting — ask for a consultation in your prompt if needed.
- Advisor tokens bill at the advisor model's rates in addition to the main model's usage; counts toward `/usage` and plan limits.
- Toggling `/advisor` mid-session does not invalidate the main model's prompt cache.
- Requires a supported main model: Opus 4.6+, Sonnet 4.6+, or Haiku 4.5 (Fable 5 also qualifies on v2.1.170+).
- `CLAUDE_CODE_DISABLE_ADVISOR_TOOL=1` disables the tool entirely; `/advisor` becomes unavailable and `advisorModel` is ignored.
- Compare with `opusplan` (stronger model during plan mode only), subagents with `model` set (stronger model for a whole delegated subtask), and `/model` (switches for all subsequent turns).
## Related
- [tools-reference.md](./tools-reference.md) — the advisor has no tool name usable in permission rules, unlike every other tool listed there
references/tools/README.md
# tools
| Name | Description | Path |
| --- | --- | --- |
| Advisor tool | stronger advisor model を main model と pair させる experimental server-side tool | [advisor.md](./advisor.md) |
| Tools reference | claude code の built-in tool 完全リファレンス (Agent / Bash / Read / Edit / Skill 等) | [tools-reference.md](./tools-reference.md) |
| Ultrareview | remote 多数 reviewer agent による branch / PR の deep code review | [ultrareview.md](./ultrareview.md) |
references/tools/tools-reference.md
<!-- source: https://code.claude.com/docs/en/tools-reference / last verified: 2026-08-07 -->
# Tools reference
Complete reference for Claude Code's built-in tools. Tool names are the exact strings used in permission rules, subagent tool lists, and hook matchers. To add custom tools, connect an MCP server; to add reusable prompt-based workflows, write a skill (runs through the existing `Skill` tool).
## Signature / Usage
```text
# permission rule syntax: ToolName(specifier)
Bash(npm run *)
Read(~/secrets/**)
Edit(/src/**)
WebFetch(domain:example.com)
Skill(deploy *)
Agent(Explore)
```
## Options / Props
Built-in tools (name — description — permission required by default inside the working directory):
| Name | Description | Permission required |
| --- | --- | --- |
| `Agent` | Spawns a subagent with its own context window | No |
| `Artifact` | Publishes HTML/Markdown as a shareable claude.ai artifact | Yes |
| `AskUserQuestion` | Multiple-choice question to gather requirements | No |
| `Bash` | Executes shell commands | Yes (built-in read-only commands run without prompting) |
| `CronCreate` / `CronDelete` / `CronList` | Session-scoped scheduled task management | No |
| `Edit` | Targeted exact-string-replacement edits | Yes |
| `EndConversation` | Ends the session (abuse / demo only, v2.1.213+) | No |
| `EnterPlanMode` / `ExitPlanMode` | Switch to / present and exit plan mode | No / Yes |
| `EnterWorktree` / `ExitWorktree` | Create/switch into, or exit, a git worktree | Yes / No |
| `Glob` | Finds files by name pattern | No |
| `Grep` | Searches file contents (ripgrep-backed) | No |
| `ListMcpResourcesTool` / `ReadMcpResourceTool` | List / read MCP server resources | No |
| `LSP` | Code intelligence via language servers | No |
| `Monitor` | Watches a background command or WebSocket, feeding events back | Yes |
| `NotebookEdit` | Modifies Jupyter notebook cells | Yes |
| `PowerShell` | Native PowerShell execution | Yes |
| `PushNotification` | Desktop/phone notification | No |
| `Read` | Reads file contents (text, images, PDF, `.ipynb`) | No |
| `RemoteTrigger` | Manages claude.ai Routines; backs `/schedule` | No |
| `ReportFindings` | Structured code-review findings list | No |
| `ScheduleWakeup` | Reschedules the next self-paced `/loop` iteration | No |
| `SendMessage` | Message an agent-team teammate or resume a subagent | No |
| `SendUserFile` | Sends a generated file to the user's device | No |
| `ShareOnboardingGuide` | Uploads `ONBOARDING.md`, returns a share link | Yes |
| `Skill` | Executes a skill in the main conversation | Yes |
| `TaskCreate` / `TaskGet` / `TaskList` / `TaskOutput` / `TaskStop` / `TaskUpdate` | Task list management | No |
| `TodoWrite` | Legacy session checklist, disabled by default since v2.1.142 | No |
| `ToolSearch` | Searches/loads deferred tools under MCP tool search | No |
| `WaitForMcpServers` | Waits for still-connecting MCP servers | No |
| `WebFetch` | Fetches a URL, converts to Markdown, summarizes via a small model | Yes |
| `WebSearch` | Web search via Anthropic's backend (results only, no page fetch) | Yes |
| `Workflow` | Runs a dynamic workflow orchestrating many background subagents | Yes |
| `Write` | Creates or overwrites a file (requires prior Read for existing files) | Yes |
Permission rule formats by tool group:
| Rule format | Applies to |
| --- | --- |
| `Bash(npm run *)` | Bash, Monitor |
| `PowerShell(Get-ChildItem *)` | PowerShell |
| `Read(~/secrets/**)` | Read, Grep, Glob, LSP |
| `Edit(/src/**)` | Edit, Write, NotebookEdit |
| `Skill(deploy *)` | Skill |
| `Agent(Explore)` | Agent |
| `WebFetch(domain:example.com)` | WebFetch |
| `WebSearch` | WebSearch (no specifier) |
## Notes
- Bash output limits: valid results inline up to ~30,000 chars (then a session-directory file path + preview); failures inline up to ~10,000 chars as a head/tail excerpt. `BASH_MAX_OUTPUT_LENGTH` raises the read-back window up to 150,000.
- Edit/Write require the file to have been read in the current conversation first (a `PARTIAL view` truncated read doesn't count); a `Read` deny rule blocks Edit/Write on the same path including new-file creation.
- WebFetch is lossy by design: the page is converted to Markdown and summarized by a small model against your prompt before Claude sees it; use `curl` via Bash for the raw page.
- WebSearch is capped at 200 calls per session (across main conversation + all subagents), configurable via `CLAUDE_CODE_MAX_WEB_SEARCHES_PER_SESSION`; resets on `/clear`.
- `EndConversation` cannot be removed by deny/disallowed-tools rules while any other tool remains — it is deliberately un-blockable since it only ends the session.
- Subagent tool access: no `tools`/`disallowedTools` set → inherits every tool available to subagents; `tools` only → exactly that list; `disallowedTools` only → everything except listed; both set → `disallowedTools` wins on overlap.
- The advisor tool is a server-side tool run by the API, not a Claude Code tool — it has no name usable in permission rules or hook matchers (see `advisor.md`).
## Related
- [advisor.md](./advisor.md) — server-side second-opinion tool, not in the permission-rule tool table
- [ultrareview.md](./ultrareview.md) — cloud multi-agent review invoked via `/code-review ultra`, distinct from the `Agent` tool's local subagents
references/tools/ultrareview.md
<!-- source: https://code.claude.com/docs/en/ultrareview / last verified: 2026-08-07 -->
# Ultrareview
Research-preview deep code review that runs on Claude Code on the web infrastructure. `/code-review ultra` launches a fleet of reviewer agents in a remote sandbox to find bugs in your branch or pull request, with every finding independently reproduced and verified. Requires claude.ai authentication; not available on Amazon Bedrock, Google Cloud's Agent Platform, Microsoft Foundry, or for organizations with Zero Data Retention enabled (falls back to a local review there).
## Signature / Usage
```text
/code-review ultra
/code-review ultra develop
/code-review ultra 1234
/code-review ultra check my auth changes
```
```bash
claude ultrareview
claude ultrareview 1234
claude ultrareview origin/main
```
## Options / Props
| Name | Type | Description |
| --- | --- | --- |
| `/code-review ultra [base\|pr#\|note]` | command | No argument reviews current branch vs. default branch; a branch name compares against that base; a PR number/`#N`/URL reviews a pull request; free-text (2+ words) is kept as a note |
| `claude ultrareview [pr\|branch]` | CLI subcommand | Same review, blocks until findings arrive, prints to stdout, exit 0/1 |
| `--json` | flag | Print raw `bugs.json` instead of formatted findings (subcommand only) |
| `--timeout <minutes>` | flag | Max wait for the review; default 30 (subcommand only) |
Diff limits: up to 500 changed files / 8,000 changed lines for a branch review by default (exact refusal names current limits); no merge base falls back to reviewing every tracked file.
Pricing: Pro/Max get 3 free runs (one-time, don't refresh); Team/Enterprise have none. After free runs, billed as usage credits (~$5–$25 per review depending on size); a stopped or failed review still consumes a free run.
## Notes
- Alias `/ultrareview` is available once ultrareview is enabled for the account.
- A review typically takes 5–10 minutes and runs as a background task; track/stop with `/tasks`.
- `/code-review ultra` in a non-interactive session (v2.1.218+) launches and prints a tracking link without blocking; use `claude ultrareview` to block until findings arrive. When billing confirmation is needed, the non-interactive path stops and points to `claude ultrareview` instead.
- Distinct from local `/code-review`: local runs in-session in seconds to minutes at normal usage cost; ultrareview runs remotely over ~5–10 minutes with independent verification and usage-credit billing.
## Related
- [advisor.md](./advisor.md) — another server-side second-opinion mechanism, but consulted mid-task rather than as a pre-merge review
- [tools-reference.md](./tools-reference.md) — `Agent` tool for local subagents, as contrasted with ultrareview's remote reviewer fleet
samples/hook-config.md
<!-- source: https://code.claude.com/docs/en/hooks-guide.md / last verified: 2026-08-07 -->
# Block edits to protected files with a PreToolUse hook
Prevent Claude from modifying sensitive files (`.env`, `package-lock.json`, `.git/`) by running a script before every `Edit`/`Write` call; the script exits 2 to block, and Claude receives the reason as feedback.
```bash .claude/hooks/protect-files.sh
#!/bin/bash
# protect-files.sh
INPUT=$(cat)
FILE_PATH=$(echo "$INPUT" | jq -r '.tool_input.file_path // empty')
# Normalize Windows backslash separators so the patterns below match
FILE_PATH="${FILE_PATH//\\//}"
PROTECTED_PATTERNS=(".env" "package-lock.json" ".git/")
for pattern in "${PROTECTED_PATTERNS[@]}"; do
if [[ "$FILE_PATH" == *"$pattern"* ]]; then
echo "Blocked: $FILE_PATH matches protected pattern '$pattern'" >&2
exit 2
fi
done
exit 0
```
```json .claude/settings.json
{
"hooks": {
"PreToolUse": [
{
"matcher": "Edit|Write",
"hooks": [
{
"type": "command",
"command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/protect-files.sh"
}
]
}
]
}
}
```
## Notes
- Make the script executable first: `chmod +x .claude/hooks/protect-files.sh`.
- Exit codes: `0` = no objection, normal permission flow applies; `2` = block, stderr becomes Claude's feedback; any other code = action proceeds but shows a non-blocking hook-error notice.
- `PreToolUse` hooks fire before any permission-mode check in every mode, including `bypassPermissions` — a `deny` from a hook cannot be bypassed by the user's permission mode.
- For structured JSON control (`allow`/`deny`/`ask`) instead of exit codes, print `{"hookSpecificOutput": {"hookEventName": "PreToolUse", "permissionDecision": "deny", "permissionDecisionReason": "..."}}` to stdout and exit 0; don't mix exit 2 with JSON output.
- This is a Claude Code CLI feature. For the Agent SDK, see anthropic-agent-sdk. For the Claude API side, see anthropic-api-tools-mcp.
samples/mcp-config.md
<!-- source: https://code.claude.com/docs/en/mcp-quickstart.md / last verified: 2026-08-07 -->
# Project-scoped MCP servers via .mcp.json
Hand-written `.mcp.json` at the project root, defining an HTTP server and a local stdio server; checked into version control so teammates get the same servers on clone.
```json .mcp.json
{
"mcpServers": {
"claude-code-docs": {
"type": "http",
"url": "https://code.claude.com/docs/mcp"
},
"playwright": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@playwright/mcp@latest"]
}
}
}
```
Equivalent registration via CLI (writes the same file when run with `--scope project`):
```bash
claude mcp add --scope project --transport http claude-code-docs https://code.claude.com/docs/mcp
claude mcp add playwright -- npx -y @playwright/mcp@latest
```
## Notes
- For HTTP servers, `url` is the endpoint; for stdio servers, `command`/`args` is the program Claude Code runs as a subprocess.
- The `playwright` CLI line above defaults to `local` scope (private, current project only); pass `--scope project` explicitly to also write it into `.mcp.json` alongside `claude-code-docs`.
- The first time Claude Code sees a project-scoped server from `.mcp.json`, it prompts for approval before connecting (protects against a cloned repo launching processes without consent).
- Claude Code reads `.mcp.json` at session start only; restart the session after editing it.
- Precedence for MCP config here is the Claude Code **CLI** connection surface. For the Agent SDK's own MCP configuration (in-process/subprocess servers passed programmatically), see anthropic-agent-sdk. For the Claude API's MCP connector / MCP tunnels, see anthropic-api-tools-mcp.
samples/output-style.md
<!-- source: https://code.claude.com/docs/en/output-styles.md / last verified: 2026-08-07 -->
# Output style definition
A custom output style that changes response format (not what Claude knows) by rewriting the system prompt.
```markdown .claude/output-styles/diagrams-first.md
---
name: Diagrams first
description: Lead every explanation with a diagram
keep-coding-instructions: true
---
When explaining code, architecture, or data flow, start with a Mermaid diagram showing the structure, then explain in prose.
```
Set the active style without opening the picker:
```json .claude/settings.json
{
"outputStyle": "Explanatory"
}
```
## Notes
- `keep-coding-instructions: true` keeps Claude Code's built-in software-engineering instructions alongside the custom ones; omit it to fully replace them.
- Built-in styles: **Default**, **Proactive**, **Explanatory**, **Learning**.
- Applies to the main conversation only — a subagent runs its own system prompt and is unaffected (a fork inherits the parent's full system prompt instead).
- Takes effect after `/clear` or a new session; it is read once at session start. The standalone `/output-style` command was removed — use `/config` or edit `outputStyle` directly.
- This is a Claude Code CLI feature. Agent SDK system-prompt customization is covered by anthropic-agent-sdk.
samples/plugin-manifest.md
<!-- source: https://code.claude.com/docs/en/plugins-reference.md / last verified: 2026-08-07 -->
# Plugin manifest (plugin.json)
Complete `.claude-plugin/plugin.json` schema declaring a plugin's identity and component locations.
```json .claude-plugin/plugin.json
{
"name": "plugin-name",
"displayName": "Plugin Name",
"version": "1.2.0",
"description": "Brief plugin description",
"author": { "name": "Author Name", "email": "author@example.com", "url": "https://github.com/author" },
"homepage": "https://docs.example.com/plugin",
"repository": "https://github.com/author/plugin",
"license": "MIT",
"keywords": ["keyword1", "keyword2"],
"metadata": { "catalogId": "cat-123" },
"skills": "./custom/skills/",
"commands": ["./custom/commands/special.md"],
"agents": ["./custom/agents/reviewer.md"],
"hooks": "./config/hooks.json",
"mcpServers": "./mcp-config.json",
"outputStyles": "./styles/",
"lspServers": "./.lsp.json",
"experimental": { "themes": "./themes/", "monitors": "./monitors.json" },
"dependencies": ["helper-lib", { "name": "secrets-vault", "version": "~2.1.0" }]
}
```
## Notes
- Only `name` is required if a manifest is present; all other fields are optional (`version` falls back to the git commit SHA if omitted).
- Component path fields (`commands`, `agents`, `outputStyles`, `experimental.themes/monitors`) **replace** the default folder; `skills` **adds to** the default `skills/` scan.
- `${CLAUDE_PLUGIN_ROOT}` resolves to the plugin's install directory, `${CLAUDE_PLUGIN_DATA}` to a persistent per-plugin data directory that survives updates.
- To distribute this plugin, register it in a marketplace catalog — see `plugin-marketplace.md` in this directory for the `marketplace.json` schema.
- This is a Claude Code CLI feature. For the Agent SDK, see anthropic-agent-sdk. For the Claude API side, see anthropic-api-tools-mcp.
samples/plugin-marketplace.md
<!-- source: https://code.claude.com/docs/en/plugin-marketplaces.md / last verified: 2026-08-07 -->
# Plugin marketplace manifest (marketplace.json)
A `.claude-plugin/marketplace.json` catalog listing plugins by relative path and by GitHub source, plus the commands to register and install from it.
```json .claude-plugin/marketplace.json
{
"name": "company-tools",
"owner": { "name": "DevTools Team", "email": "devtools@example.com" },
"plugins": [
{
"name": "code-formatter",
"source": "./plugins/formatter",
"description": "Automatic code formatting on save",
"version": "2.1.0"
},
{
"name": "deployment-tools",
"source": { "source": "github", "repo": "company/deploy-plugin" },
"description": "Deployment automation tools"
}
]
}
```
```shell
/plugin marketplace add ./my-marketplace
/plugin install quality-review-plugin@my-plugins
```
## Notes
- `name` and `owner.name` are required at the marketplace level; each plugin entry requires `name` and `source`.
- `source` types: relative path (resolved from marketplace root, no `..`), `github` (`repo`, `ref?`, `sha?`), `url`, `git-subdir`, `npm`.
- `strict: true` (default) means the target plugin's own `plugin.json` is the authority; `strict: false` makes the marketplace entry the entire plugin definition.
- Version resolution order: `plugin.json` `version` → marketplace entry `version` → git commit SHA. Validate before publishing with `claude plugin validate .` (`--strict` treats warnings as errors).
- This is a Claude Code CLI feature; not part of the Claude API or Agent SDK.
samples/README.md
# samples
| Name | Description | Path |
| --- | --- | --- |
| skill-definition | SKILL.md の frontmatter と本文の最小例、配置場所 | [skill-definition.md](./skill-definition.md) |
| slash-command | $ARGUMENTS を使った skill 版 custom slash command の定義例 | [slash-command.md](./slash-command.md) |
| hook-config | PreToolUse フックでファイル編集をブロックする settings.json + スクリプト例 | [hook-config.md](./hook-config.md) |
| subagent-definition | .claude/agents/ のサブエージェント定義例(frontmatter + 呼び出し方) | [subagent-definition.md](./subagent-definition.md) |
| plugin-manifest | plugin.json の完全スキーマ例 | [plugin-manifest.md](./plugin-manifest.md) |
| plugin-marketplace | marketplace.json でプラグインを配布・登録する例 | [plugin-marketplace.md](./plugin-marketplace.md) |
| mcp-config | .mcp.json でプロジェクトスコープ MCP サーバーを定義する例 | [mcp-config.md](./mcp-config.md) |
| output-style | output style の定義例(frontmatter + outputStyle 設定) | [output-style.md](./output-style.md) |
samples/skill-definition.md
<!-- source: https://code.claude.com/docs/en/skills.md / last verified: 2026-08-07 -->
# Skill definition
A minimal SKILL.md with frontmatter and instructions, invoked automatically or via `/skill-name`.
```markdown ~/.claude/skills/summarize-changes/SKILL.md
---
description: Summarizes uncommitted changes and flags anything risky. Use when the user asks what changed, wants a commit message, or asks to review their diff.
---
## Current changes
!`git diff HEAD`
## Instructions
Summarize the changes above in two or three bullet points, then list any risks.
```
## Notes
- Scope by location, highest to lowest priority: enterprise (managed settings) > personal (`~/.claude/skills/`) > project (`.claude/skills/`) > plugin (`<plugin>/skills/`).
- Custom commands (`.claude/commands/deploy.md`) and skills (`.claude/skills/deploy/SKILL.md`) both create `/deploy`; a skill of the same name takes precedence.
- Only `description` is required in frontmatter; `disable-model-invocation: true` restricts it to manual `/name` invocation only.
- This is a Claude Code CLI feature. For the Agent SDK, see anthropic-agent-sdk. For Claude API (Messages API) Agent Skills / tool use, and the Skills API, see anthropic-api-tools-mcp.
samples/slash-command.md
<!-- source: https://code.claude.com/docs/en/skills.md / last verified: 2026-08-07 -->
# Custom slash command with arguments
A skill invoked as `/fix-issue 123`; the `$ARGUMENTS` placeholder is replaced with whatever follows the skill name. `commands.md` documents only built-in `/` commands and points to skills for custom ones ("To add custom commands, write a skill").
```yaml .claude/skills/fix-issue/SKILL.md
---
name: fix-issue
description: Fix a GitHub issue
disable-model-invocation: true
---
Fix GitHub issue $ARGUMENTS following our coding standards.
1. Read the issue description
2. Understand the requirements
3. Implement the fix
4. Write tests
5. Create a commit
```
Running `/fix-issue 123` sends Claude "Fix GitHub issue 123 following our coding standards...".
## Notes
- `disable-model-invocation: true` restricts the skill to manual `/fix-issue` invocation only; Claude cannot trigger it automatically.
- If a skill is invoked with arguments but doesn't include `$ARGUMENTS`, Claude Code appends `ARGUMENTS: <input>` to the end of the skill content instead.
- For positional access use `$ARGUMENTS[N]` or the shorthand `$N` (e.g. `$0`, `$1`); `.claude/commands/deploy.md` (legacy custom command) and `.claude/skills/deploy/SKILL.md` both create `/deploy` and work the same way.
- This is a Claude Code CLI feature. For the Agent SDK, see anthropic-agent-sdk. For Claude API (Messages API) Agent Skills / tool use, see anthropic-api-tools-mcp.
samples/subagent-definition.md
<!-- source: https://code.claude.com/docs/en/sub-agents.md / last verified: 2026-08-07 -->
# Subagent definition in .claude/agents/
A project-scoped subagent with a restricted, read-only tool set, invoked by name or `@`-mention.
```markdown .claude/agents/code-reviewer.md
---
name: code-reviewer
description: Reviews code for quality and best practices. Use proactively after code changes.
tools: Read, Glob, Grep
model: sonnet
---
You are a code reviewer. When invoked, analyze the code and provide
specific, actionable feedback on quality, security, and best practices.
```
## Notes
- Invoke explicitly with natural language ("Use the code-reviewer subagent to..."), by `@`-mention (`@agent-code-reviewer`), or run the whole session as this subagent with `claude --agent code-reviewer`.
- Only `name` and `description` are required; omitting `tools` inherits every tool available to subagents.
- Scope/precedence, highest to lowest: managed settings `.claude/agents/` > `--agents` CLI flag > project `.claude/agents/` > `~/.claude/agents/` > plugin `agents/` directory.
- This is a Claude Code CLI feature. Agent SDK subagent definitions are covered by anthropic-agent-sdk.
SKILL.md
---
name: anthropic-claude-code-extend
description: >
Claude Code (code.claude.com) の拡張機能リファレンス。
Agent Skills (SKILL.md), slash commands, output styles, subagents, agent teams,
agent view, workflows, routines, scheduled tasks, hooks (PreToolUse / PostToolUse),
plugins, plugin marketplace, MCP 設定 (.mcp.json / claude mcp add), managed MCP,
channels (--channels / claude/channel push events, webhook / telegram / discord / imessage),
tools-reference, advisor, ultrareview。
user-invocable: false
---
# anthropic-claude-code-extend
Claude Code (code.claude.com) — CLI 本体を拡張する機能群のリファレンス。Agent Skills(SKILL.md)・
slash commands・output styles、subagents / agent teams / agent view / workflows / routines /
scheduled tasks、hooks、plugins / plugin marketplace、MCP 設定、channels(`--channels` /
`claude/channel` push events)、built-in tools(advisor / ultrareview 含む)をカバーする。
CLI 本体(インストール・設定・セッション)は `anthropic-claude-code`、Agent SDK の Skills / MCP /
subagents / hooks は `anthropic-agent-sdk`、Claude API 側の Agent Skills / Skills API / MCP connector は
`anthropic-api-tools-mcp` を参照(本スキルは Claude Code CLI から使う拡張機能の設定・仕様を担当)。
## ディレクトリ構成
```text
skills/anthropic-claude-code-extend/
SKILL.md
references/
skills-commands/
README.md
commands.md
output-styles.md
prompt-library.md
skills.md
subagents/
README.md
agent-teams.md
agent-view.md
agents.md
desktop-scheduled-tasks.md
routines.md
routines-fire.md
scheduled-tasks.md
sub-agents.md
workflows.md
hooks/
README.md
hooks.md
hooks-guide.md
plugins/
README.md
discover-plugins.md
plugin-dependencies.md
plugin-hints.md
plugin-marketplaces.md
plugin-relevance.md
plugins.md
plugins-reference.md
mcp/
README.md
managed-mcp.md
mcp.md
mcp-quickstart.md
channels/
README.md
channels.md
channels-reference.md
tools/
README.md
advisor.md
tools-reference.md
ultrareview.md
samples/
README.md
skill-definition.md
slash-command.md
hook-config.md
subagent-definition.md
plugin-manifest.md
plugin-marketplace.md
mcp-config.md
output-style.md
```
## 探索手順
タスクからカテゴリを引き、カテゴリの README.md で目的のページを特定する:
1. 下記マッピング表でタスクに対応するカテゴリを探す
2. そのカテゴリの `references/{category}/README.md`(`samples/` は直下の README.md)を参照して目的のページを特定する
3. 該当ページの `.md` を Read して詳細を確認する
## タスク → カテゴリ マッピング
| タスク | カテゴリ | 参照 README |
|--------|---------|------------|
| Agent Skills(SKILL.md)を定義したい・slash command を作りたい・output style や SDLC prompt library を使いたい | skills-commands | [references/skills-commands/README.md](references/skills-commands/README.md) |
| subagent を定義したい・agent teams で複数インスタンスを協調させたい・agent view でバックグラウンド session を管理したい・並列実行の 4 アプローチを比較したい・routines / scheduled tasks(/loop, /fire)で自動化したい・Desktop アプリの Routines ページからローカル定期タスクを設定したい・workflows で大規模 orchestration を組みたい | subagents | [references/subagents/README.md](references/subagents/README.md) |
| セッション lifecycle イベント(SessionStart / PreToolUse / PostToolUse / PermissionRequest 等)で hook を設定・実装したい | hooks | [references/hooks/README.md](references/hooks/README.md) |
| plugin を作成・配布したい・plugin marketplace を構築したい・plugin.json manifest や dependency constraint を確認したい | plugins | [references/plugins/README.md](references/plugins/README.md) |
| Claude Code から MCP サーバーへ接続したい(.mcp.json / `claude mcp add`)・organization 単位で managed MCP access を制御したい | mcp | [references/mcp/README.md](references/mcp/README.md) |
| 実行中セッションへ webhook / アラート / チャットメッセージを push したい・`--channels` で channel plugin(telegram / discord / imessage)を有効化したい・独自 channel MCP サーバー(`claude/channel` capability)を実装したい | channels | [references/channels/README.md](references/channels/README.md) |
| built-in tool(Agent / Bash / Read / Edit / Skill 等)の完全リファレンスを確認したい・advisor tool や ultrareview を使いたい | tools | [references/tools/README.md](references/tools/README.md) |
| 典型的な使い方を知りたい(SKILL.md 定義, slash command, hook 設定, subagent 定義, plugin manifest / marketplace, .mcp.json, output style) | samples | [samples/README.md](samples/README.md) |