所有工具
免费

一份可搜索、可打印的 Claude Code 参考——CLI 命令、斜杠命令、模式、标志、配置和实用工作流。免费。

Launching

10
claude
Start an interactive session in the current dir
claude "fix the build"
Start with an initial prompt
claude -p "explain this repo"
Print mode: run once, print result, exit
cat log | claude -p "find the error"
Pipe stdin into print mode
claude -c / claude --continue
Continue the most recent conversation
claude -r / claude --resume
Resume: pick an earlier session
claude --resume <session-id>
Resume a specific session by id
claude update
Update the CLI to the latest version
claude doctor
Diagnose the installation and health
claude mcp
Configure MCP servers from the CLI

Slash commands

12
/help
List available commands and usage
/clear
Clear conversation history and context
/compact
Summarize and compact the context
/init
Generate a CLAUDE.md for the project
/model
Switch the active model
/agents
Create and manage subagents
/mcp
View and manage MCP server connections
/config
Open the settings / configuration panel
/review
Review a pull request or the current diff
/vim
Enable Vim keybindings in the prompt
/memory
Edit the CLAUDE.md memory files
/cost
Show token usage and cost for the session

Prompt prefixes

6
@path/to/file
Reference a file or directory in context
# remember this
Add a line to memory (choose which CLAUDE.md)
! ls -la
Bash mode: run a shell command directly
/command
Run a built-in or custom slash command
@folder/
Reference a whole directory
paste image
Paste a screenshot to include it

Modes

6
Shift + Tab
Cycle modes: normal → auto-accept → plan
auto-accept edits
Apply file edits without confirming each one
plan mode
Research and propose a plan; make no changes
normal mode
Ask for confirmation on each action
--permission-mode plan
Start directly in plan mode
--permission-mode acceptEdits
Start with edits auto-accepted

Keyboard shortcuts

9
Esc
Interrupt Claude mid-response
Esc Esc
Edit a previous message / rewind
Ctrl + C
Cancel current input or generation
Ctrl + D
Exit the Claude Code session
Ctrl + L
Clear the terminal screen
Ctrl + R
Toggle verbose / expanded output
Up / Down
Browse input history
Shift + Tab
Cycle permission modes
\ + Enter
Insert a newline in the prompt

Common flags

10
--model <name>
Choose the model (e.g. opus, sonnet)
--add-dir <path>
Grant access to an extra directory
--permission-mode <m>
plan | acceptEdits | default | bypassPermissions
--allowedTools "Bash,Edit"
Pre-allow specific tools
--disallowedTools "Bash"
Block specific tools
--output-format json
Structured output for scripting (print mode)
--max-turns 5
Limit agentic turns in print mode
--append-system-prompt "..."
Append to the system prompt
--verbose
Show full turn-by-turn output
--dangerously-skip-permissions
Skip all permission prompts (use with care)

Configuration & memory

9
.claude/settings.json
Project settings (shared, committed)
.claude/settings.local.json
Project settings (personal, git-ignored)
~/.claude/settings.json
User-level settings for all projects
CLAUDE.md
Project memory loaded into every session
CLAUDE.local.md
Personal project memory (git-ignored)
~/.claude/CLAUDE.md
Global memory for all projects
.claude/commands/*.md
Custom slash commands
.mcp.json
Project-scoped MCP server definitions
permissions.allow / deny
Allow / deny tool rules in settings.json

Hooks

8
PreToolUse
Run a command before a tool executes
PostToolUse
Run after a tool finishes (e.g. lint/format)
UserPromptSubmit
Run when you submit a prompt
Stop
Run when Claude finishes responding
SubagentStop
Run when a subagent finishes
SessionStart
Run when a session begins
Notification
Run on notifications (e.g. awaiting input)
matcher: "Edit|Write"
Scope a hook to specific tools

MCP servers

8
claude mcp add <name> -- <cmd>
Add a stdio MCP server
claude mcp add --transport http <name> <url>
Add a remote HTTP MCP server
claude mcp list
List configured MCP servers
claude mcp get <name>
Show details of one server
claude mcp remove <name>
Remove an MCP server
/mcp
View status and authenticate servers
--mcp-config <file>
Load MCP servers from a JSON file
@server:resource
Reference an MCP resource in a prompt

Handy workflows

8
claude "/review"
Review the current diff before committing
plan first, then build
Shift+Tab to plan mode, approve, then execute
# add a project convention
Quickly persist a rule to CLAUDE.md
@file.php explain this
Drop a file into context with a question
claude -p "..." | tee out.txt
Script Claude and capture the output
git diff | claude -p "write a commit msg"
Generate a commit message from a diff
/clear between tasks
Reset context when switching topics
/compact when long
Compact a long session to free up context

没有条目匹配“:q”。


关于 Claude Code 速查表

这份 Claude Code 速查表是这款 AI 编程 CLI 的快速参考:启动方式、斜杠命令、提示前缀、模式、键盘快捷键、常用参数、配置与记忆、钩子(hooks)、MCP 服务器,以及一个把这些内容组合起来的实用工作流章节。

代理式 CLI 工具的功能增长很快,那些实用的知识——如何切换模式、哪个斜杠命令用于管理记忆、如何接入 MCP 服务器或钩子——在两次使用之间很容易忘记。这里的每一行都把确切的命令或按键与一句话说明配对在一起。

本速查表免费,完全在浏览器中渲染。用搜索框实时过滤,通过粘性目录在各章节间跳转,一键复制任意命令,并可打印出来作为团队的入门讲义。

如何使用 Claude Code 速查表

  1. 浏览各章节,从「启动」「斜杠命令」到「钩子与 MCP 服务器」再到「实用工作流」。
  2. 搜索 memory、mode 或 mcp 等关键词,即可实时过滤命令。
  3. 通过粘性侧边栏跳转到「常用参数」或「配置与记忆」等章节。
  4. 点击命令或其复制图标,把它复制到终端或笔记中。
  5. 打印速查表,作为团队成员上手该工具时的快速入门参考。

常见问题

共十个章节:启动、斜杠命令、提示前缀、模式、键盘快捷键、常用参数、配置与记忆、钩子、MCP 服务器,以及把这些内容整合起来的实用工作流。

使用 Claude Code CLI 的开发者——无论你是刚入门、想了解核心斜杠命令,还是已经熟练使用,需要一份关于钩子事件、参数或 MCP 配置的提醒。

有。专门的章节列出了钩子和添加 MCP 服务器所需的命令与配置项,并配有工作流示例,说明何时该使用它们。

可以。点击任意命令或该行的复制图标,它就会被复制到剪贴板,方便粘贴到终端中。

是的,它免费、可搜索、可打印,并完全在浏览器中运行。


热门搜索
claude code 速查表 claude code 斜杠命令 claude code 键盘快捷键 claude code cli 参数 claude code hooks claude code mcp 服务器 claude md 记忆文件 claude code 命令列表
需要帮助?
使用此工具时遇到问题?请告诉我们的团队。
报告问题

将此免费工具添加到你自己的网站 — 复制并粘贴下面的代码。