Slash commands 61 /skill-doctor — Show what each of your skills costs in context and how often it gets used, so you can find skills to turn off. Requires Claude Code v2.1.252 or later and feature-flag fetching /design — Skill. Draft UI mockups, screen flows, landing pages, or posters as artboards on one canvas, published as an artifact that runs a research preview of Claude Design’s editor, for example /design a settings screen for a mobile banking app. Where saving is enabled for your account, you edit the artboards on the canvas and save to publish a new version; otherwise you view the draft and export it as PNG or PDF. Requires a session where artifacts are available and Claude Code v2.1.234 or later. Available on the Anthropic API. On Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and Claude Platform on AWS, artifacts aren’t available, so the command is unavailable there /workflow-authoring — Skill. Load the reference for writing dynamic workflow scripts: the script API, resume behavior, quality patterns, and worked examples. Claude normally loads it on its own before writing a script; run it yourself before editing a saved script by hand. Available when dynamic workflows are enabled, and requires Claude Code v2.1.248 or later /rate-limit-options — Show ways to keep working when a claude.ai usage limit blocks a request: wait and continue automatically when the limit resets, add usage credits, or upgrade your plan. Claude Code can also open this menu on its own when you hit a limit at your own terminal. See Turn automatic continue off. Requires a claude.ai subscription. Doesn’t appear in the command menu; type it in full. The wait-and-continue rows require Claude Code v2.1.234 or later /auto-mode-setup — Draft autoMode.environment entries from your project and recent sessions, then review the draft and save it to your user settings. Requires a Pro, Max, or Team plan and Claude Code v2.1.228 or later. On native Windows, requires v2.1.233 or later /artifacts — List the artifacts you own or that are shared with you, then attach one to the session, open it in your browser, or copy its link. Available where artifacts are. Requires Claude Code v2.1.208 or later; attaching with Enter requires v2.1.216 /list-agents — List the subagents, agent team teammates, and other Claude Code sessions Claude can message, with the name to use for each. See cross-session messaging. Also available as /peers. Requires Claude Code v2.1.224 or later; earlier versions report Unknown command: /list-agents. Teammate rows and the first line showing this session’s own name require v2.1.239 or later. Available only in sessions where cross-session messaging is enabled /import — Bring configuration from OpenAI Codex, Google Gemini CLI, or Cursor on your machine into Claude Code, including instruction files, MCP servers, commands, subagents, and skills. In non-interactive mode with -p, /import lists what it found and gives you the command that confirms the import. Add --dry-run to preview without writing anything, or --yes to skip the interactive picker. Not available on Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, or Claude Platform on AWS, or through a Claude apps gateway. Also unavailable when you turn off feature-flag fetching. Requires Claude Code v2.1.213 or later. Importing from Cursor requires v2.1.265 or later /bug — Report a bug or share your conversation. You choose how much session history to include and confirm on a consent screen before anything is sent. When you’re signed in to Anthropic on a first-party connection, the report goes to Anthropic; on a third-party provider, or without Anthropic credentials, Claude Code writes the report to a local archive under ~/.claude/feedback-bundles/ that you forward yourself. In the VS Code extension, /bug opens the extension’s own feedback dialog instead; requires Claude Code v2.1.229 or later. When you run it while Claude is responding, Claude Code opens the dialog immediately. Before v2.1.232, Claude Code queued the command until the turn finished. Alias: /share. Before v2.1.212, /bug and /share were aliases of /feedback /subtask — Spawn a forked subagent: a background subagent that inherits the full conversation and works on the task while you keep working. Its result returns to this conversation when it finishes. To copy the conversation into a separate background session instead, use /fork. Requires Claude Code v2.1.212 or later; on v2.1.161 through v2.1.211 this command is /fork. When agent view is turned off, /subtask isn’t available and /fork keeps the forked-subagent behavior /autocompact — Set the auto-compact window: how full the context window gets before Claude Code compacts automatically. Pass a size such as 500k, or auto to return to the window tuned for your model. Claude Code saves the value to user settings and applies it to the current session. See Set the auto-compact window for accepted values and what overrides it. Without an argument, opens a dialog that shows the current window. Requires Claude Code v2.1.221 or later /dataviz — Skill. Design guidance for charts, graphs, and dashboards. Claude picks the chart form for the data, assigns color by role, validates the palette for colorblind safety and contrast with a bundled script, and applies mark, interaction, and accessibility rules. Uses a brand-neutral placeholder palette that you replace with your own. Requires Claude Code v2.1.198 or later /design-sync — Skill. Convert your repo’s React design system and upload it to Claude Design, so designs it produces use your real components. Optionally name the design system, for example /design-sync Acme DS. A first-time sync verifies every component and can take a few hours on a large repo. Available on the Anthropic API. It needs claude.ai, which the CLI doesn’t contact on Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, or Claude Platform on AWS, or through a Claude apps gateway, so the command is unavailable there /design-login — Authorize design-system access for /design-sync with your claude.ai account /advisor — Enable or disable the advisor tool, which consults a second model for guidance at key moments during a task. Accepts fable, opus, sonnet, or a full model ID. fable requires Fable access. Without an argument, opens a picker. In a session without an interactive terminal, or over Remote Control, pass the model or off as an argument; with no argument there, the command prints the current advisor as text. These forms require Claude Code v2.1.260 or later /cd — Move this session to a new working directory, keeping the conversation. Type a partial path to see matching directory suggestions; press Tab to accept one. The suggestions require Claude Code v2.1.206 or later. For what Claude Code applies from the new directory as soon as you move, and how /cd differs from /add-dir, see Move the session to another directory /fork — Copy the current conversation into a new background session and keep working here. Pass a prompt and the copy starts working on it immediately; without one it waits in agent view for its first prompt. Except when the copy edits in place, Claude Code instructs it to create a worktree of its own before making code changes; the isolation instruction requires Claude Code v2.1.221 or later. To hand a side task to a subagent whose result comes back into this conversation, use /subtask; to switch into a copy yourself, use /branch. Requires Claude Code v2.1.212 or later; on v2.1.161 through v2.1.211, and whenever agent view is turned off, /fork starts a forked subagent instead /workflows — Open the workflow progress view to watch, pause, resume, or save running and completed workflows /deep-research — Workflow. Fan out web searches on a question, fetch and cross-check sources, and synthesize a cited report /reload-skills — Re-scan skill and command directories so skills added or changed on disk during the session become available without restarting. Reports how many skills are available and how many were added or removed /code-review — Skill. Review the current diff, or a PR number, branch, or path you pass, for correctness bugs and cleanup opportunities. Pass --fix to apply findings, --comment to post them on the GitHub PR or GitLab merge request, or ultra to run a deep cloud review. Posting to a GitLab merge request requires Claude Code v2.1.257 or later. With ultra on a github.com PR target, pass --post to preselect posting the finished findings to the PR in the launch dialog; --post requires Claude Code v2.1.227 or later. See Review a diff locally for the effort levels, targeting, and how it relates to /simplify. Alias: /review /run-skill-generator — Skill. Teach /run and /verify how to build, launch, and drive your project’s app from a clean environment by writing a per-project skill /verify — Skill. Confirm a code change does what it should by building your project’s app, running it, and observing the result, rather than relying on tests or type checks. See Run and verify your app /run — Skill. Launch and drive your project’s app to see a change working, not only passing tests. See Run and verify your app /usage-credits — Configure usage credits, or request them from your admin, when you hit a limit. Opens your usage-credits billing settings in the browser, except that Team and Enterprise members without billing access instead send a usage-credits request to their admin from the CLI, after confirming in a dialog that the request notifies their admins. When no browser can open the billing page, for example over SSH, the command prints the URL to visit instead; this requires Claude Code v2.1.205 or later, and earlier versions showed nothing in that case. Previously /extra-usage /scroll-speed — Adjust mouse wheel scroll speed interactively, with a ruler you can scroll while the dialog is open to preview the change. Available in fullscreen rendering only and not in the JetBrains IDE terminal /goal — Set a goal: Claude keeps working across turns until the condition is met or the goal clears for another reason. With no argument, shows the current or most recently achieved goal. clear, stop, off, reset, none, or cancel removes an active goal early /background — Detach the current session to run as a background agent and free this terminal. Pass a prompt to send one more instruction before detaching. Monitor the session with claude agents. To copy the conversation into a new background session while this one keeps running, use /fork. Alias: /bg /stop — Stop the current background session. Only available while attached to a background session; the transcript and any worktree are kept. To detach without stopping, use /exit or press ← /radio — Open Claude FM lo-fi radio in your browser. Prints the stream URL when no browser is available /pr-comments — Removed in v2.1.91. Ask Claude directly to view pull request comments instead. On earlier versions, fetches and displays comments from a GitHub pull request; automatically detects the PR for the current branch, or pass a PR URL or number. Requires the gh CLI /skills — List available skills. Type to filter the list by name, description, or source. Press t to sort by token count, Space or Enter to cycle a skill’s visibility to Claude and the / menu, and Esc to save and close. You can’t cycle plugin skills, skills whose frontmatter sets disable-model-invocation: true, or skills with a skillOverrides entry in managed settings or the --settings flag /help — Show help and available commands /doctor — Skill. Run a setup checkup that diagnoses issues and can fix them. Checks installation health, including duplicate or leftover installs, PATH problems, and unparseable settings files. Finds unused skills, MCP servers, and plugins versus their context cost, flags slow hooks, and checks for a newer version on your release channel. Deduplicates local CLAUDE.md files against checked-in ones, trims checked-in CLAUDE.md files by cutting content Claude could derive from the codebase, and migrates the always-loaded guidance that remains into skills and nested CLAUDE.md files that load on demand. Also offers to make auto mode your default and to pre-approve frequently denied read-only commands. Reports findings first and asks for confirmation before changing anything. From the terminal, claude doctor prints read-only installation diagnostics without starting a session. Alias: /checkup. The CLAUDE.md trim check requires Claude Code v2.1.206 or later. Before v2.1.205, /doctor opened a read-only diagnostics screen and pressing f sent the report to Claude /privacy-settings — View and update your privacy settings. Only available for Pro and Max plan subscribers /branch — Create a branch of the current conversation at this point, so you can try a different direction without losing the conversation as it stands. Switches you into the branch and preserves the original, which you can return to with /resume. To run a copy as a separate background session instead of switching into it, use /fork; to hand a side task to a subagent that reports back into this conversation, use /subtask /mobile — Show QR code to download the Claude mobile app. Aliases: /ios, /android /statusline — Configure Claude Code’s status line. Describe what you want, or run without arguments to auto-configure from your shell prompt /agents — As of v2.1.198, running /agents prints a reminder to ask Claude to create or manage subagents, or to edit .claude/agents/ or ~/.claude/agents/ directly. On v2.1.197 and earlier, opens an interactive interface for creating and managing subagent configurations /vim — Removed in v2.1.92. To toggle between Vim and Normal editing modes, use /config → Editor mode /permissions — Manage allow, ask, and deny rules for tool permissions. Opens an interactive dialog where you can view rules by scope, add or remove rules, manage working directories, and review recent auto mode denials. You can also view and edit auto mode classifier rules from the dialog’s Auto mode tab. When you run it while Claude is responding, Claude Code opens the dialog immediately and applies your changes starting with Claude’s next tool call in the same turn. Before v2.1.234, Claude Code queued the command until the turn finished. Alias: /allowed-tools /clear — Start a new conversation with empty context. Pass a name to label the previous conversation in the /resume picker. To free up context while continuing the same conversation, use /compact instead. Resume the previous conversation with /resume, or, in the same Claude Code process, restore it from the rewind menu’s previous-session entry. The rewind entry requires Claude Code v2.1.191 or later. Aliases: /reset, /new /config — Open the Settings interface to adjust theme, model, output style, and other preferences. From v2.1.181, pass one or more key=value pairs to set a setting directly without opening the interface, for example /config thinking=false. From v2.1.182, named shorthand keys are also accepted, such as /config theme=dark or /config model=sonnet. The key=value form also works in non-interactive mode (-p) and from the Claude mobile app via Remote Control. The key=value form can’t turn on a setting that needs your confirmation in the panel, such as autoContinueAtUsageLimit, though it can turn one off. Run /config --help to list the keys it accepts. Alias: /settings /init — Initialize project with a CLAUDE.md guide. Set CLAUDE_CODE_NEW_INIT=1 for an interactive flow that also walks through skills, hooks, and personal memory files. If /init finds OpenAI Codex or Google Gemini CLI configuration, it offers to carry it over with /import /color — Set the prompt bar color for the current session. Available colors: red, blue, green, yellow, purple, orange, pink, cyan. Use default to reset, or run with no argument to pick a random color. When Remote Control is connected, the color syncs to claude.ai/code. Also available in non-interactive mode (-p); requires Claude Code v2.1.205 or later /compact — Free up context by summarizing the conversation so far. Optionally pass focus instructions for the summary. See how compaction handles rules, skills, and memory files /hooks — View hook configurations for tool events /voice — Toggle voice dictation, or enable it in a specific mode. Requires a Claude.ai account /ultraplan — Removed. Use plan mode instead. Previously sent a planning task to a Claude Code on the web session for review in your browser /cost — Alias for /usage /teleport — Pull a Claude Code on the web session into this terminal. Opens a picker, then fetches the branch and conversation. Also available as /tp. Requires a claude.ai subscription /tasks — View and manage background work in the current session, including subagents that have finished. Also available as /bashes /claude-api — Skill. Load Claude API and Managed Agents reference material for your project’s language. Also activates automatically when your code imports anthropic or @anthropic-ai/sdk. Run migrate to update existing Claude API code to a newer model. Run upgrade to move your project’s Anthropic SDK dependency across a major version, currently the Python anthropic package from 0.x to 1.x. Run managed-agents-onboard for a walkthrough that creates a new Managed Agent. Run prompt-audit to flag instructions written for older models in your prompts, skills, and tool descriptions and propose fixes as a diff. Run cost-optimize to profile where your project’s Claude API spend goes and propose savings from options such as prompt caching, trimming unneeded input and output tokens, batch processing, effort, and model choice, one change at a time. Run build-eval to build an eval set for your Claude-powered app, and hillclimb to iteratively improve the app against an existing eval. The prompt-audit subcommand requires Claude Code v2.1.221 or later, upgrade requires v2.1.236 or later, cost-optimize requires v2.1.247 or later, and build-eval and hillclimb require v2.1.259 or later /upgrade — Open the upgrade page in your browser to switch to a higher plan tier. When the browser fails to open, the command shows a sign-in prompt without printing the URL /usage — Show session cost, plan usage limits, and activity stats. On a Pro, Max, Team, or Enterprise plan, includes a breakdown of what counts against your plan limits. /cost and /stats are aliases /tui — Set the terminal UI renderer and relaunch into it with your conversation intact. fullscreen enables the flicker-free alt-screen renderer. With no argument, prints the active renderer /keybindings — Open your keyboard shortcuts file /theme — Change the color theme. Includes an auto option that matches your terminal’s light or dark background, light and dark variants, colorblind-accessible (daltonized) themes, ANSI themes that use your terminal’s color palette, and any custom themes from ~/.claude/themes/ or plugins. Select New custom theme… to create one /autofix-pr — Spawn a Claude Code on the web session that watches the current branch’s PR and pushes fixes when CI fails or reviewers leave comments. Detects the open PR from your checked-out branch with gh pr view; to watch a different PR, check out its branch first. By default the cloud session is told to fix every CI failure and review comment; pass a prompt to give it different instructions, for example /autofix-pr only fix lint and type errors. Requires the gh CLI and access to Claude Code on the web /sandbox — Toggle sandbox mode. Available on supported platforms only /review — Alias of /code-review: reviews the current diff, or a PR number, branch, or path you pass, such as /review 1234, and takes the same effort levels and flags. With no level given, the review reuses the last low through max level you typed; see Review a diff locally for the exact rules. For a deep cloud review, use /code-review ultra. Before v2.1.223, /review was a separate command that ran a single-pass, read-only review of a GitHub pull request by number, listing open PRs to pick from when run with no argument; from v2.1.186 through v2.1.201, it ran the same multi-agent engine as /code-review medium
Flags 28 --system-prompt-snapshot — With off, rebuilds the prompt on every request. With on, the default, reuses a recorded prompt where recording applies --append-subagent-system-prompt-file — Load text from a file and append it to subagent system prompts. An alternative to --append-subagent-system-prompt for text too long to pass on the command line. The two flags can’t be combined. Only applies in non-interactive mode with -p. Requires Claude Code v2.1.261 or later --permission-prompts — Set who answers permission prompts in print mode. With the default host, Claude Code sends them to the Agent SDK host or the --permission-prompt-tool tool. Pass none when nobody can answer, and Claude Code denies them instead. See Turn off permission prompts in unattended runs. Requires Claude Code v2.1.259 or later --restricted — Start in restricted mode. Use it when an evaluation harness drives claude on a shared machine and Claude Code must not run commands or read that machine’s user and project settings. Claude Code removes the built-in tools that run commands or code, and WebFetch, unless you name them individually in --tools, not through the default preset. It also confines the built-in file tools to the working directories, loads only managed settings and --settings, refuses bypassPermissions, and refuses to create cloud sessions. Requires Claude Code v2.1.248 or later --environment — Create a new cloud session that runs on the self-hosted environment with the given ID. Environment IDs start with ccpool_. See --environment dispatch behavior for dispatch behavior and the flag combinations it rejects. Requires Claude Code v2.1.224 or later --forward-subagent-text — Emit subagent text and thinking blocks in the output stream as assistant and user messages with parent_tool_use_id set, so you can reconstruct each subagent’s transcript. Without this flag, Claude Code omits the text and thinking blocks of a subagent that runs in the foreground. Requires --print and --output-format stream-json. Claude Code also forwards messages from nested subagents, setting parent_tool_use_id to the ID of the Agent tool call that spawned each one; this requires Claude Code v2.1.219 or later. The CLAUDE_CODE_FORWARD_SUBAGENT_TEXT environment variable enables the same behavior. Requires Claude Code v2.1.211 or later --ref — With --environment, base the new session’s checkout on a named ref instead of local HEAD --autocompact — Set the auto-compact window for this session without changing your saved settings. Accepts the same values as /autocompact; that section covers the value forms and what overrides the flag. Requires Claude Code v2.1.221 or later --append-subagent-system-prompt — Append custom text to the end of every subagent’s system prompt, nested subagents included, apart from a forked subagent, which reuses the conversation’s own prompt. Only applies in non-interactive mode with -p. Requires Claude Code v2.1.205 or later --cloud — With a task description, create a new web session on claude.ai. With a session ID (session_... or cse_...) or a claude.ai/code URL, queue a message into that existing session instead, with -p. See send a follow-up message. --ax-screen-reader — Render screen-reader friendly output: flat text without decorative borders or animations. Forces the classic renderer, so the tui setting has no effect; attached background sessions still render fullscreen. Takes precedence over CLAUDE_AX_SCREEN_READER and the axScreenReader setting. Requires Claude Code v2.1.181 or later --advisor — Enable the server-side advisor tool for this session with a model alias, fable, opus, or sonnet, or a full model ID. Takes precedence over the advisorModel setting for the session. fable requires Fable access --safe-mode — Start with all customizations disabled to troubleshoot a broken configuration: CLAUDE.md, skills, plugins, hooks, MCP servers, custom commands and agents, output styles, workflows, custom themes, custom keybindings, status line and file-suggestion commands, LSP servers, and auto memory do not load. Authentication, model selection, built-in tools, and permissions work normally, which differs from --bare. Managed settings policy still applies, including policy-configured hooks, status line, and file-suggestion commands; managed plugins, managed skills, managed CLAUDE.md, and policy-configured MCP servers do not. Useful for checking whether a customization is what triggers automatic model fallback. Sets CLAUDE_CODE_SAFE_MODE --exec — Run a shell command as a PTY-backed background job instead of starting a Claude session. Use with --bg to launch from the shell --prompt-suggestions — Emit a prompt_suggestion message with a predicted next user prompt after each turn that generates one; very short conversations can produce none. Requires --print, --output-format stream-json, and --verbose. See Prompt suggestions --bg — Start the session as a background agent and return immediately. Prints the session ID and management commands. Combine with --exec to run a shell command as a background job instead of a Claude session, or with --agent to run a specific subagent. Can’t be combined with -p/--print; see the error reference --plugin-url — Fetch a plugin .zip archive from a URL for this session only. Repeat the flag for multiple plugins, or pass space-separated URLs in a single quoted value --teammate-mode — Set how agent team teammates display: in-process (default), auto, tmux, or iterm2 (added in v2.1.186). Overrides the teammateMode setting for this session. See Choose a display mode --ide — Automatically connect to IDE on startup if exactly one valid IDE is available --permission-prompt-tool — Specify an MCP tool to handle permission prompts in non-interactive mode. Claude Code waits for that tool’s MCP server to connect before running the first turn, up to the MCP_TIMEOUT startup timeout, 30 seconds by default. The prompt tool can’t approve an MCP tool marked as requiring user interaction: Claude Code converts an allow result for one to a deny. This restriction requires Claude Code v2.1.199 or later --append-system-prompt — Appends to the default prompt --enable-auto-mode — Removed in v2.1.111. Auto mode is now in the Shift+Tab cycle by default; use --permission-mode auto to start in it --settings — Path to a settings JSON file or an inline JSON string. Values you set here override the same keys in your settings.json files for this session. Keys you omit keep their file-based values. The file must be a regular file no larger than 2 MiB. See settings precedence --verbose — Enable verbose logging, shows full turn-by-turn output. Overrides the viewMode setting for this session --name — Set a display name for the session, shown in /resume and the terminal title. You can resume a named session with claude --resume <name>. In an interactive session, if another live session on this machine already uses the name, Claude Code applies a variant of it instead. /rename changes the name mid-session and also shows it on the prompt bar --init-only — Run Setup and SessionStart hooks, then exit without starting a conversation --debug — Enable debug mode with optional category filtering, such as --debug='mcp,startup' or --debug='!1p'. The filter binds only in the = form; a space-separated filter enables debug mode without filtering --system-prompt — Replaces the entire default prompt
CLI subcommands 24 claude import [source] — Start an interactive session that runs /import to bring configuration from other coding agents into Claude Code. Accepts the same --dry-run and --yes options as the command. Not available on Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, or Claude Platform on AWS. Also unavailable when you turn off feature-flag fetching. Requires Claude Code v2.1.213 or later claude self-hosted-runner — Start a runner process that registers this machine or container with a self-hosted environment and hosts Claude Code cloud sessions on your infrastructure. Run claude self-hosted-runner setup for a guided operator walkthrough, claude self-hosted-runner doctor to diagnose a deployed runner, and claude self-hosted-runner orchestrator to spawn on-demand runners. Requires Claude Code v2.1.224 or later claude auto-mode reset — Restore the default auto mode configuration by removing the autoMode section from your user settings file. Prompts for confirmation before writing; pass -y/--yes to skip the prompt. Rules from managed settings or the --settings flag still apply. Requires Claude Code v2.1.212 or later. See Inspect the defaults and your effective config claude gateway — Start the self-hosted Claude apps gateway server, for administrators deploying SSO and policy in front of Claude Code on Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry. Requires --config pointing at a gateway.yaml. Available in Claude Code v2.1.195 and later. claude mcp logout <name> — Clear stored OAuth credentials for an MCP server. Requires Claude Code v2.1.186 or later claude mcp login <name> — Run a configured MCP server’s OAuth flow without opening the interactive /mcp panel. Works for HTTP, SSE, and claude.ai connector servers. Add --no-browser over SSH to print the authorization URL instead of opening a browser, then paste the redirect URL back at the prompt. Requires Claude Code v2.1.186 or later. See Authenticate from the command line claude daemon stop --any — Stop the background-session supervisor and the sessions it hosts. Pass --keep-workers to leave background sessions running so the next supervisor reconnects to them. --any confirms stopping an on-demand supervisor, which is the default. Use this to recover from an unresponsive supervisor claude daemon status — Print the background-session supervisor’s state, version, socket directory, and worker count for diagnostics. Exits 1 if the supervisor isn’t running claude attach <id> — Attach to a background session in this terminal claude respawn <id> — Restart a background session, running or stopped, with its conversation intact. Use --all to restart every running session, e.g. to pick up an updated Claude Code binary claude logs <id> — Print recent output from a background session claude stop <id> — Stop a background session. Also accepts claude kill claude rm <id> — Remove a background session from the list. When the removal is refused over the session’s worktree and a second claude rm can resolve it, the refusal prints the exact flag and value to pass: --discard-unpushed <commit>@<worktree-id> discards a worktree that has unpushed commits along with those commits, and --force-remove-worktree <worktree-id> deletes a worktree directory that git or the WorktreeRemove hook couldn’t remove. --discard-unpushed requires Claude Code v2.1.260 or later, and --force-remove-worktree requires v2.1.268 or later. The conversation transcript stays on your local machine, available through claude --resume claude project purge [path] — Delete all local Claude Code state for a project: transcripts, task lists, debug logs, file-edit history, prompt history lines, and the project’s entry in ~/.claude.json. Omit [path] to pick from an interactive list. Flags: --dry-run to preview, -y/--yes to skip confirmation, -i/--interactive to confirm each item, --all for every project. See Clear local data claude ultrareview [target] — Run ultrareview non-interactively. Prints findings to stdout and exits 0 on success or 1 on failure. Use --json for the raw payload and --timeout <minutes> to override the 45-minute default. Use --post on a github.com pull request target to post the finished findings to the PR as one plain comment from your GitHub account. --no-post is the default. --post and --no-post require Claude Code v2.1.227 or later. See Post findings to the pull request claude -r "<session>" "query" — Resume session by ID or name claude auto-mode defaults — Print the built-in auto mode classifier rules as JSON. Use claude auto-mode config to see your effective config with settings applied. --label <prefix> prints only the rules whose label starts with that prefix, matched case-insensitively. Requires Claude Code v2.1.208 or later claude agents — Open agent view to monitor and dispatch parallel background sessions. Use --cwd <path> to show only sessions started under that directory, or --json to print active sessions as a JSON array for scripting (--json --all also includes completed background sessions). Pass --permission-mode, --model, --effort, or --agent to set defaults for dispatched sessions. Accepts --settings, --add-dir, --plugin-dir, and --mcp-config like the top-level claude command. Opening agent view requires an interactive terminal claude -p "query" — Query via SDK, then exit claude auth login — Sign in to your Anthropic account. Use --email to pre-fill your email address, --sso to force SSO authentication, and --console to sign in with Anthropic Console for API usage billing instead of a Claude subscription claude auth logout — Log out from your Anthropic account claude "query" — Start interactive session with initial prompt claude -c — Continue most recent conversation in current directory claude -c -p "query" — Continue via SDK