並非所有 slash command 都會對每個使用者顯示;可見性可能取決於平台、方案、環境、功能開關、已安裝外掛、MCP servers 和 skills。
CLI
CLI 頂層指令
Claude Code 在終端中的指令和常見呼叫方式。
| 指令 | 用途 | 備註 |
|---|---|---|
claude | 啟動互動式會話。 | 最常用入口 |
claude "query" | 帶初始問題啟動互動式會話。 | 可直接描述任务 |
claude -p "query" | 非互動模式執行一次查詢,然後結束。 | -p = --print |
cat file | claude -p "query" | 處理管線輸入內容。 | 适合脚本化 |
claude -c | 繼續最近一次對話。 | -c = --continue |
claude -c -p "query" | 以非互動模式繼續最近會話並執行問題。 | 适合自动化 |
claude -r "<session>" "query" | 恢復指定會話。 | -r = --resume |
claude update | 更新到最新版。 | - |
claude install [version] | 安裝或重新安裝指定版本 native binary。 | - |
claude auth login | 登入。 | - |
claude auth logout | 登出。 | - |
claude auth status | 查看目前登入狀態。 | - |
claude agents | 開啟 agent 管理檢視。 | 管理并行/后台 agent |
claude attach <id> | 连接到指定后台会话。 | - |
claude auto-mode defaults | 打印内置 auto-mode 规则。 | - |
claude auto-mode config | 查看当前生效的 auto-mode 配置。 | - |
claude daemon status | 查看 daemon 后台服务状态。 | - |
claude daemon stop --any | 停止 daemon 后台服务。 | - |
claude logs <id> | 查看指定會話日誌。 | - |
claude mcp | 設定 MCP 伺服器。 | - |
claude plugin | 管理外掛。 | - |
claude plugins | claude plugin 的别名。 | - |
claude project purge [path] | 清理指定项目相关数据。 | - |
claude remote-control | 配置或启用远程控制。 | - |
claude respawn <id> | 重新拉起指定后台会话。 | - |
claude rm <id> | 删除指定后台会话。 | - |
claude setup-token | 设置 token 认证。 | - |
claude stop <id> | 停止指定后台会话。 | - |
claude kill <id> | claude stop <id> 的别名。 | - |
claude ultrareview [target] | 对目标执行 ultra 级别代码审查。 | 现在也可用 /code-review ultra |
claude啟動互動式會話。
最常用入口
claude "query"帶初始問題啟動互動式會話。
可直接描述任务
claude -p "query"非互動模式執行一次查詢,然後結束。
-p = --print
cat file | claude -p "query"處理管線輸入內容。
适合脚本化
claude -c繼續最近一次對話。
-c = --continue
claude -c -p "query"以非互動模式繼續最近會話並執行問題。
适合自动化
claude -r "<session>" "query"恢復指定會話。
-r = --resume
claude update更新到最新版。
claude install [version]安裝或重新安裝指定版本 native binary。
claude auth login登入。
claude auth logout登出。
claude auth status查看目前登入狀態。
claude agents開啟 agent 管理檢視。
管理并行/后台 agent
claude attach <id>连接到指定后台会话。
claude auto-mode defaults打印内置 auto-mode 规则。
claude auto-mode config查看当前生效的 auto-mode 配置。
claude daemon status查看 daemon 后台服务状态。
claude daemon stop --any停止 daemon 后台服务。
claude logs <id>查看指定會話日誌。
claude mcp設定 MCP 伺服器。
claude plugin管理外掛。
claude pluginsclaude plugin 的别名。
claude project purge [path]清理指定项目相关数据。
claude remote-control配置或启用远程控制。
claude respawn <id>重新拉起指定后台会话。
claude rm <id>删除指定后台会话。
claude setup-token设置 token 认证。
claude stop <id>停止指定后台会话。
claude kill <id>claude stop <id> 的别名。
claude ultrareview [target]对目标执行 ultra 级别代码审查。
现在也可用 /code-review ultra
MCP
MCP 相關指令
用於新增、檢視、刪除和執行 MCP servers 的指令與參數。
| 指令 | 用途 | 備註 |
|---|---|---|
claude mcp add --transport http <name> <url> | 添加 HTTP MCP 服务器。 | 推荐方式 |
claude mcp add --transport sse <name> <url> | 添加 SSE MCP 服务器。 | 已不推荐 |
claude mcp add [options] <name> -- <command> [args...] | 添加 stdio MCP 服务器。 | -- 后面是启动命令 |
claude mcp add-json <name> '<json>' | 通过 JSON 配置添加 MCP 服务器。 | 适合复杂配置 |
claude mcp list | 列出已配置的 MCP 服务器。 | - |
claude mcp get <name> | 查看指定 MCP 服务器配置。 | - |
claude mcp remove <name> | 删除指定 MCP 服务器。 | - |
claude mcp reset-project-choices | 重置项目级 MCP 选择。 | - |
claude mcp add-from-claude-desktop | 从 Claude Desktop 导入 MCP server。 | - |
claude mcp serve | 将 Claude Code 作为 MCP server 运行。 | - |
/mcp | 在交互式会话中查看 MCP 状态。 | slash 命令 |
--scope local | 保存到本地项目作用域。 | - |
--scope project | 保存到共享项目作用域。 | - |
--scope user | 保存到用户作用域。 | - |
--env KEY=VALUE | 给 stdio server 传入环境变量。 | - |
--transport http | 使用 HTTP 传输。 | - |
--transport sse | 使用 SSE 传输。 | - |
--transport stdio | 使用标准输入输出传输。 | - |
claude mcp add --transport http <name> <url>添加 HTTP MCP 服务器。
推荐方式
claude mcp add --transport sse <name> <url>添加 SSE MCP 服务器。
已不推荐
claude mcp add [options] <name> -- <command> [args...]添加 stdio MCP 服务器。
-- 后面是启动命令
claude mcp add-json <name> '<json>'通过 JSON 配置添加 MCP 服务器。
适合复杂配置
claude mcp list列出已配置的 MCP 服务器。
claude mcp get <name>查看指定 MCP 服务器配置。
claude mcp remove <name>删除指定 MCP 服务器。
claude mcp reset-project-choices重置项目级 MCP 选择。
claude mcp add-from-claude-desktop从 Claude Desktop 导入 MCP server。
claude mcp serve将 Claude Code 作为 MCP server 运行。
/mcp在交互式会话中查看 MCP 状态。
slash 命令
--scope local保存到本地项目作用域。
--scope project保存到共享项目作用域。
--scope user保存到用户作用域。
--env KEY=VALUE给 stdio server 传入环境变量。
--transport http使用 HTTP 传输。
--transport sse使用 SSE 传输。
--transport stdio使用标准输入输出传输。
外掛
外掛相關指令
外掛的非互動 CLI 指令,以及互動式會話裡的 /plugin 指令。
| 指令 | 用途 | 備註 |
|---|---|---|
claude plugin init <name> | 创建一个新插件脚手架。 | - |
claude plugin new <name> | plugin init 的别名。 | - |
claude plugin install <plugin> | 安装插件。 | - |
claude plugin uninstall <plugin> | 卸载插件。 | - |
claude plugin remove <plugin> | 卸载插件的别名。 | - |
claude plugin rm <plugin> | 卸载插件的短别名。 | - |
claude plugin prune | 清理未使用的插件依赖。 | - |
claude plugin autoremove | plugin prune 的别名。 | - |
claude plugin enable <plugin> | 启用插件。 | - |
claude plugin disable <plugin> | 禁用插件。 | - |
claude plugin update <plugin> | 更新插件。 | - |
claude plugin list | 列出插件。 | - |
claude plugin details <name> | 查看插件详情。 | - |
claude plugin tag [options] | 管理插件标签。 | - |
claude plugin validate <path> | 校验插件。 | 支持 strict 校验 |
/plugin | 打开插件管理。 | - |
/plugin list | 列出已安装插件。 | - |
/plugin install <plugin> | 安装插件。 | - |
/plugin disable <plugin> | 禁用插件。 | - |
/plugin enable <plugin> | 启用插件。 | - |
/plugin uninstall <plugin> | 卸载插件。 | - |
/plugin validate <path> | 校验插件。 | - |
/plugin marketplace add <source> | 添加插件市场来源。 | - |
/plugin marketplace list | 列出插件市场。 | - |
/plugin marketplace update | 更新插件市场快照。 | - |
/plugin marketplace remove <name> | 移除插件市场。 | - |
/plugin market ... | /plugin marketplace 的简写。 | - |
claude plugin init <name>创建一个新插件脚手架。
claude plugin new <name>plugin init 的别名。
claude plugin install <plugin>安装插件。
claude plugin uninstall <plugin>卸载插件。
claude plugin remove <plugin>卸载插件的别名。
claude plugin rm <plugin>卸载插件的短别名。
claude plugin prune清理未使用的插件依赖。
claude plugin autoremoveplugin prune 的别名。
claude plugin enable <plugin>启用插件。
claude plugin disable <plugin>禁用插件。
claude plugin update <plugin>更新插件。
claude plugin list列出插件。
claude plugin details <name>查看插件详情。
claude plugin tag [options]管理插件标签。
claude plugin validate <path>校验插件。
支持 strict 校验
/plugin打开插件管理。
/plugin list列出已安装插件。
/plugin install <plugin>安装插件。
/plugin disable <plugin>禁用插件。
/plugin enable <plugin>启用插件。
/plugin uninstall <plugin>卸载插件。
/plugin validate <path>校验插件。
/plugin marketplace add <source>添加插件市场来源。
/plugin marketplace list列出插件市场。
/plugin marketplace update更新插件市场快照。
/plugin marketplace remove <name>移除插件市场。
/plugin market .../plugin marketplace 的简写。
Slash
互動式 Slash Commands
Claude Code 會話內已文件化的 slash commands;實際可見性可能因環境而異。
| 指令 | 用途 | 備註 |
|---|---|---|
/add-dir <path> | 添加当前会话可访问的工作目录。 | - |
/advisor [model|off] | 启用或关闭 advisor。 | 可指定模型 |
/agents | 管理 agents。 | - |
/autofix-pr [prompt] | 自动修复 PR 问题。 | - |
/background [prompt] | 启动后台任务。 | 别名 /bg |
/bg [prompt] | /background 的别名。 | - |
/batch <instruction> | 执行批量任务。 | Skill |
/branch [name] | 创建或切换分支上下文。 | - |
/btw <question> | 临时问一个旁路问题。 | 不打断主线 |
/cd <path> | 切换工作目录。 | - |
/chrome | 管理 Chrome 集成。 | - |
/claude-api [migrate|managed-agents-onboard] | 处理 Claude API 迁移或托管 agent 引导。 | Skill |
/clear [name] | 清空会话 / 开启新会话。 | 别名 /reset, /new |
/reset [name] | /clear 的别名。 | - |
/new [name] | /clear 的别名。 | - |
/code-review [level] [target] | 執行程式碼審查。 | Skill |
/code-review low | 低强度代码审查。 | - |
/code-review medium | 中等强度代码审查。 | - |
/code-review high | 高强度代码审查。 | - |
/code-review xhigh | 超高强度代码审查。 | - |
/code-review max | 最大强度代码审查。 | - |
/code-review ultra | Ultra 级别代码审查。 | 替代 /ultrareview |
/code-review --fix | 审查并修复。 | - |
/code-review --comment | 审查并添加评论。 | - |
/color [color|default] | 修改颜色。 | - |
/compact [instructions] | 压缩当前对话上下文。 | - |
/config | 打开配置。 | 别名 /settings |
/settings | /config 的别名。 | - |
/context [all] | 查看上下文。 | - |
/copy [N] | 複製最近輸出。 | - |
/cost | 查看用量或成本。 | 别名 /usage |
/usage | 查看使用量。 | - |
/debug [description] | 调试问题。 | Skill |
/deep-research <question> | 执行深度研究。 | Workflow |
/desktop | 打开桌面应用。 | 别名 /app |
/app | /desktop 的别名。 | - |
/diff | 查看目前 Git diff。 | - |
/doctor | 執行診斷。 | - |
/effort [level|auto] | 设置推理强度。 | - |
/exit | 退出 Claude Code。 | 别名 /quit |
/quit | /exit 的别名。 | - |
/export [filename] | 导出对话。 | - |
/fast [on|off] | 开关 fast 模式。 | - |
/feedback [report] | 发送反馈。 | 别名 /bug, /share |
/bug [report] | /feedback 的别名。 | - |
/share [report] | /feedback 的别名。 | - |
/fewer-permission-prompts | 减少权限确认弹窗。 | Skill |
/focus | 聚焦当前任务。 | - |
/fork <directive> | 分叉当前对话。 | - |
/goal [condition|clear] | 设置或清除目标。 | - |
/heapdump | 生成 heap dump。 | 调试用 |
/help | 显示帮助。 | - |
/hooks | 管理 hooks。 | - |
/ide | 管理 IDE 集成。 | - |
/init | 初始化项目指令文件。 | 通常生成 CLAUDE.md |
/insights | 查看洞察信息。 | - |
/install-github-app | 安装 GitHub App。 | - |
/install-slack-app | 安装 Slack App。 | - |
/keybindings | 配置快捷键。 | - |
/login | 登录。 | - |
/logout | 登出。 | - |
/loop [interval] [prompt] | 按间隔循环执行任务。 | Skill;别名 /proactive |
/proactive [interval] [prompt] | /loop 的别名。 | - |
/mcp [reconnect <server>|enable|disable] | 在会话内管理 MCP。 | - |
/memory | 管理记忆。 | - |
/mobile | 设置移动端。 | 别名 /ios, /android |
/ios | /mobile 的别名。 | - |
/android | /mobile 的别名。 | - |
/model [model] | 選擇模型。 | - |
/passes | 查看或配置 passes。 | - |
/permissions | 管理权限 / 可用工具。 | 别名 /allowed-tools |
/allowed-tools | /permissions 的别名。 | - |
/plan [description] | 进入 / 创建计划模式。 | - |
/plugin [subcommand] | 管理外掛。 | - |
/powerup | 启用增强工作流。 | - |
/pr-comments [PR] | 处理 PR 评论。 | v2.1.91 已移除 |
/privacy-settings | 打开隐私设置。 | - |
/radio | 管理 radio 模式。 | - |
/recap | 总结当前会话。 | - |
/release-notes | 查看版本更新说明。 | - |
/reload-plugins [--force] | 重新加载插件。 | - |
/reload-skills | 重新加载 skills。 | - |
/remote-control | 管理远程控制。 | 别名 /rc |
/rc | /remote-control 的别名。 | - |
/remote-env | 管理远程环境。 | - |
/rename [name] | 重命名会话。 | - |
/resume [session] | 恢复会话。 | 别名 /continue |
/continue [session] | /resume 的别名。 | - |
/review [PR] | 审查 Pull Request。 | - |
/rewind | 回退到检查点。 | 别名 /checkpoint, /undo |
/checkpoint | /rewind 的别名。 | - |
/undo | /rewind 的别名。 | - |
/run | 运行命令或 skill 工作流。 | Skill |
/run-skill-generator | 生成 skill。 | Skill |
/sandbox | 管理沙箱。 | - |
/schedule [description] | 设置计划任务 / routine。 | 别名 /routines |
/routines [description] | /schedule 的别名。 | - |
/scroll-speed | 配置滚动速度。 | - |
/security-review | 执行安全审查。 | - |
/setup-bedrock | 设置 Amazon Bedrock。 | - |
/setup-vertex | 设置 Google Vertex AI。 | - |
/simplify [target] | 简化代码或内容。 | Skill |
/skills | 浏览 skills。 | - |
/stats | 查看使用统计。 | 别名 /usage |
/status | 查看当前会话状态。 | - |
/statusline | 配置状态栏。 | - |
/stickers | 管理 stickers。 | - |
/stop | 停止当前操作。 | - |
/tasks | 查看后台任务。 | 别名 /bashes |
/bashes | /tasks 的别名。 | - |
/team-onboarding | 团队引导流程。 | - |
/teleport | 传送会话 / 上下文。 | 别名 /tp |
/tp | /teleport 的别名。 | - |
/terminal-setup | 设置终端集成。 | - |
/theme | 修改主题。 | - |
/tui [default|fullscreen] | 配置终端 UI 模式。 | - |
/ultraplan <prompt> | 生成超详细计划。 | - |
/ultrareview [PR] | Ultra 级代码审查。 | 现在推荐 /code-review ultra |
/upgrade | 升级套餐或工具。 | - |
/usage-credits | 查看用量额度 / credits。 | - |
/verify | 验证变更。 | Skill |
/vim | 切換 Vim 模式。 | v2.1.92 已移除 |
/voice [hold|tap|off] | 配置语音输入。 | - |
/web-setup | 设置 Web 集成。 | - |
/workflows | 浏览 workflows。 | - |
/add-dir <path>添加当前会话可访问的工作目录。
/advisor [model|off]启用或关闭 advisor。
可指定模型
/agents管理 agents。
/autofix-pr [prompt]自动修复 PR 问题。
/background [prompt]启动后台任务。
别名 /bg
/bg [prompt]/background 的别名。
/batch <instruction>执行批量任务。
Skill
/branch [name]创建或切换分支上下文。
/btw <question>临时问一个旁路问题。
不打断主线
/cd <path>切换工作目录。
/chrome管理 Chrome 集成。
/claude-api [migrate|managed-agents-onboard]处理 Claude API 迁移或托管 agent 引导。
Skill
/clear [name]清空会话 / 开启新会话。
别名 /reset, /new
/reset [name]/clear 的别名。
/new [name]/clear 的别名。
/code-review [level] [target]執行程式碼審查。
Skill
/code-review low低强度代码审查。
/code-review medium中等强度代码审查。
/code-review high高强度代码审查。
/code-review xhigh超高强度代码审查。
/code-review max最大强度代码审查。
/code-review ultraUltra 级别代码审查。
替代 /ultrareview
/code-review --fix审查并修复。
/code-review --comment审查并添加评论。
/color [color|default]修改颜色。
/compact [instructions]压缩当前对话上下文。
/config打开配置。
别名 /settings
/settings/config 的别名。
/context [all]查看上下文。
/copy [N]複製最近輸出。
/cost查看用量或成本。
别名 /usage
/usage查看使用量。
/debug [description]调试问题。
Skill
/deep-research <question>执行深度研究。
Workflow
/desktop打开桌面应用。
别名 /app
/app/desktop 的别名。
/diff查看目前 Git diff。
/doctor執行診斷。
/effort [level|auto]设置推理强度。
/exit退出 Claude Code。
别名 /quit
/quit/exit 的别名。
/export [filename]导出对话。
/fast [on|off]开关 fast 模式。
/feedback [report]发送反馈。
别名 /bug, /share
/bug [report]/feedback 的别名。
/share [report]/feedback 的别名。
/fewer-permission-prompts减少权限确认弹窗。
Skill
/focus聚焦当前任务。
/fork <directive>分叉当前对话。
/goal [condition|clear]设置或清除目标。
/heapdump生成 heap dump。
调试用
/help显示帮助。
/hooks管理 hooks。
/ide管理 IDE 集成。
/init初始化项目指令文件。
通常生成 CLAUDE.md
/insights查看洞察信息。
/install-github-app安装 GitHub App。
/install-slack-app安装 Slack App。
/keybindings配置快捷键。
/login登录。
/logout登出。
/loop [interval] [prompt]按间隔循环执行任务。
Skill;别名 /proactive
/proactive [interval] [prompt]/loop 的别名。
/mcp [reconnect <server>|enable|disable]在会话内管理 MCP。
/memory管理记忆。
/mobile设置移动端。
别名 /ios, /android
/ios/mobile 的别名。
/android/mobile 的别名。
/model [model]選擇模型。
/passes查看或配置 passes。
/permissions管理权限 / 可用工具。
别名 /allowed-tools
/allowed-tools/permissions 的别名。
/plan [description]进入 / 创建计划模式。
/plugin [subcommand]管理外掛。
/powerup启用增强工作流。
/pr-comments [PR]处理 PR 评论。
v2.1.91 已移除
/privacy-settings打开隐私设置。
/radio管理 radio 模式。
/recap总结当前会话。
/release-notes查看版本更新说明。
/reload-plugins [--force]重新加载插件。
/reload-skills重新加载 skills。
/remote-control管理远程控制。
别名 /rc
/rc/remote-control 的别名。
/remote-env管理远程环境。
/rename [name]重命名会话。
/resume [session]恢复会话。
别名 /continue
/continue [session]/resume 的别名。
/review [PR]审查 Pull Request。
/rewind回退到检查点。
别名 /checkpoint, /undo
/checkpoint/rewind 的别名。
/undo/rewind 的别名。
/run运行命令或 skill 工作流。
Skill
/run-skill-generator生成 skill。
Skill
/sandbox管理沙箱。
/schedule [description]设置计划任务 / routine。
别名 /routines
/routines [description]/schedule 的别名。
/scroll-speed配置滚动速度。
/security-review执行安全审查。
/setup-bedrock设置 Amazon Bedrock。
/setup-vertex设置 Google Vertex AI。
/simplify [target]简化代码或内容。
Skill
/skills浏览 skills。
/stats查看使用统计。
别名 /usage
/status查看当前会话状态。
/statusline配置状态栏。
/stickers管理 stickers。
/stop停止当前操作。
/tasks查看后台任务。
别名 /bashes
/bashes/tasks 的别名。
/team-onboarding团队引导流程。
/teleport传送会话 / 上下文。
别名 /tp
/tp/teleport 的别名。
/terminal-setup设置终端集成。
/theme修改主题。
/tui [default|fullscreen]配置终端 UI 模式。
/ultraplan <prompt>生成超详细计划。
/ultrareview [PR]Ultra 级代码审查。
现在推荐 /code-review ultra
/upgrade升级套餐或工具。
/usage-credits查看用量额度 / credits。
/verify验证变更。
Skill
/vim切換 Vim 模式。
v2.1.92 已移除
/voice [hold|tap|off]配置语音输入。
/web-setup设置 Web 集成。
/workflows浏览 workflows。
動態
動態指令
由 skills、plugins 和 MCP prompts 產生的指令模式。
| 指令 | 用途 | 備註 |
|---|---|---|
/<skill-name> | 运行某个 Skill 命令。 | 本地 / 项目 / 用户 skill |
/deploy | 示例:运行 deploy skill。 | 由 skill 文件生成 |
/<plugin-name>:<skill-name> | 运行插件提供的 skill。 | 插件命名空间 |
/mcp__<server>__<prompt> | 运行 MCP server 暴露的 prompt。 | MCP 动态生成 |
/<skill-name>运行某个 Skill 命令。
本地 / 项目 / 用户 skill
/deploy示例:运行 deploy skill。
由 skill 文件生成
/<plugin-name>:<skill-name>运行插件提供的 skill。
插件命名空间
/mcp__<server>__<prompt>运行 MCP server 暴露的 prompt。
MCP 动态生成
Flag
CLI Flags 參數
建議和指令一起收錄的 flags / options 參數與別名。
| 指令 | 用途 | 備註 |
|---|---|---|
--add-dir <path> | 添加额外工作目录。 | - |
--advisor <model> | 设置 advisor 模型。 | - |
--agent | 选择 agent 行为。 | - |
--agents | 启用或配置 agents。 | - |
--allow-dangerously-skip-permissions | 允许危险的权限跳过模式。 | - |
--allowedTools | 允许指定工具。 | - |
--allowed-tools | --allowedTools 的别名。 | - |
--append-system-prompt | 追加系统提示词文本。 | - |
--append-system-prompt-file | 从文件追加系统提示词。 | - |
--bare | 使用精简模式。 | - |
--betas | 启用 beta 功能。 | - |
--bg | 后台运行。 | - |
--channels | 选择 channels。 | - |
--chrome | 启用 Chrome 集成。 | - |
--continue, -c | 继续最近会话。 | - |
--dangerously-load-development-channels | 危险模式:加载开发 channels。 | - |
--dangerously-skip-permissions | 危险模式:跳过权限检查。 | - |
--debug | 启用调试输出。 | - |
--debug-file <path> | 将调试日志写入文件。 | - |
--disable-slash-commands | 禁用 slash commands。 | - |
--disallowedTools | 禁用指定工具。 | - |
--disallowed-tools | --disallowedTools 的别名。 | - |
--effort <level> | 设置推理强度。 | - |
--enable-auto-mode | 启用 auto mode。 | - |
--exclude-dynamic-system-prompt-sections | 排除动态系统提示词区块。 | - |
--exec | 以执行模式运行。 | - |
--fallback-model <model> | 设置备用模型。 | - |
--fork-session | 从会话分叉。 | - |
--from-pr | 从 PR 获取上下文。 | - |
--ide | 启用 IDE 集成。 | - |
--init | 初始化项目上下文。 | - |
--init-only | 只初始化,然后退出。 | - |
--include-hook-events | 包含 hook 事件。 | - |
--include-partial-messages | 包含部分消息。 | - |
--input-format | 设置输入格式。 | - |
--json-schema | 提供 JSON Schema。 | - |
--maintenance | 运行维护模式。 | - |
--max-budget-usd | 设置美元预算上限。 | - |
--max-turns | 设置最大对话轮数。 | - |
--mcp-config | 加载 MCP 配置。 | - |
--model <model> | 選擇模型。 | - |
--name <name>, -n | 设置会话名称。 | - |
--no-chrome | 禁用 Chrome 集成。 | - |
--no-session-persistence | 不保存会话。 | - |
--output-format | 设置输出格式。 | - |
--permission-mode | 设置权限模式。 | - |
--permission-prompt-tool | 设置权限提示工具。 | - |
--plugin-dir | 从目录加载插件。 | - |
--plugin-url | 从 URL 加载插件。 | - |
--print, -p | 输出结果后退出。 | - |
--prompt-suggestions | 启用提示词建议。 | - |
--remote | 连接远程会话或服务。 | - |
--remote-control, --rc | 启用远程控制。 | - |
--remote-control-session-name-prefix <prefix> | 设置远程控制会话名前缀。 | - |
--replay-user-messages | 重放用户消息。 | - |
--resume, -r | 恢复会话。 | - |
--safe-mode | 启用安全模式。 | - |
--session-id | 指定会话 ID。 | - |
--setting-sources | 选择配置来源。 | - |
--settings | 加载设置。 | - |
--strict-mcp-config | 严格校验 MCP 配置。 | - |
--system-prompt | 替换系统提示词。 | - |
--system-prompt-file | 从文件加载系统提示词。 | - |
--teleport | 启用 teleport 行为。 | - |
--teammate-mode | 启用 teammate 模式。 | - |
--tmux | 启用 tmux 集成。 | - |
--tools | 指定可用工具。 | - |
--verbose | 启用详细日志。 | - |
--version, -v | 输出版本号。 | - |
--worktree, -w | 使用 worktree 模式。 | - |
--add-dir <path>添加额外工作目录。
--advisor <model>设置 advisor 模型。
--agent选择 agent 行为。
--agents启用或配置 agents。
--allow-dangerously-skip-permissions允许危险的权限跳过模式。
--allowedTools允许指定工具。
--allowed-tools--allowedTools 的别名。
--append-system-prompt追加系统提示词文本。
--append-system-prompt-file从文件追加系统提示词。
--bare使用精简模式。
--betas启用 beta 功能。
--bg后台运行。
--channels选择 channels。
--chrome启用 Chrome 集成。
--continue, -c继续最近会话。
--dangerously-load-development-channels危险模式:加载开发 channels。
--dangerously-skip-permissions危险模式:跳过权限检查。
--debug启用调试输出。
--debug-file <path>将调试日志写入文件。
--disable-slash-commands禁用 slash commands。
--disallowedTools禁用指定工具。
--disallowed-tools--disallowedTools 的别名。
--effort <level>设置推理强度。
--enable-auto-mode启用 auto mode。
--exclude-dynamic-system-prompt-sections排除动态系统提示词区块。
--exec以执行模式运行。
--fallback-model <model>设置备用模型。
--fork-session从会话分叉。
--from-pr从 PR 获取上下文。
--ide启用 IDE 集成。
--init初始化项目上下文。
--init-only只初始化,然后退出。
--include-hook-events包含 hook 事件。
--include-partial-messages包含部分消息。
--input-format设置输入格式。
--json-schema提供 JSON Schema。
--maintenance运行维护模式。
--max-budget-usd设置美元预算上限。
--max-turns设置最大对话轮数。
--mcp-config加载 MCP 配置。
--model <model>選擇模型。
--name <name>, -n设置会话名称。
--no-chrome禁用 Chrome 集成。
--no-session-persistence不保存会话。
--output-format设置输出格式。
--permission-mode设置权限模式。
--permission-prompt-tool设置权限提示工具。
--plugin-dir从目录加载插件。
--plugin-url从 URL 加载插件。
--print, -p输出结果后退出。
--prompt-suggestions启用提示词建议。
--remote连接远程会话或服务。
--remote-control, --rc启用远程控制。
--remote-control-session-name-prefix <prefix>设置远程控制会话名前缀。
--replay-user-messages重放用户消息。
--resume, -r恢复会话。
--safe-mode启用安全模式。
--session-id指定会话 ID。
--setting-sources选择配置来源。
--settings加载设置。
--strict-mcp-config严格校验 MCP 配置。
--system-prompt替换系统提示词。
--system-prompt-file从文件加载系统提示词。
--teleport启用 teleport 行为。
--teammate-mode启用 teammate 模式。
--tmux启用 tmux 集成。
--tools指定可用工具。
--verbose启用详细日志。
--version, -v输出版本号。
--worktree, -w使用 worktree 模式。
附錄
容易混淆的點
幾個容易在實際使用和寫指令手冊時混淆的點。
claude -p-p 是 --print,不是“打印帮助”。
/usage /cost /stats用量相关命令存在重叠,实际显示内容可能随账号或版本变化。
/ultrareview可理解为 ultra 级代码审查;现在更推荐 /code-review ultra。
/pr-comments /vim官方表中记录为历史状态,已移除。
Dynamic commandsSkills、Plugins、MCP prompts 会动态增加命令,所以本机看到的命令可能不同。
官方來源
官方來源
本頁是基於 Claude Code 官方已文件化指令整理的速查表,不是官方文件的完整複刻。由 Skills、Plugins 和 MCP prompts 產生的動態指令取決於本機設定。
範圍說明
本頁是基於 Claude Code 官方已文件化指令整理的速查表,不是官方文件的完整複刻。由 Skills、Plugins 和 MCP prompts 產生的動態指令取決於本機設定。