所有工具
免費

一份可搜尋、可列印的 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 伺服器或 hook——在不同工作階段之間很容易忘記。這裡的每一列都將確切的指令或按鍵,搭配一行說明。

此小抄免費,完全在你的瀏覽器中呈現。用搜尋框即時篩選內容,透過固定式目錄在各章節間跳轉,一鍵複製任何指令,並可列印作為團隊入門的講義。

如何使用 Claude Code 速查表

  1. 瀏覽各章節,從啟動與斜線指令,經 hooks 與 MCP 伺服器,到實用工作流程。
  2. 搜尋 memory、mode 或 mcp 等關鍵字,即可即時篩選指令。
  3. 透過固定式側邊欄跳到常用旗標或設定與記憶等章節。
  4. 點擊指令或其複製圖示,將其複製到終端機或筆記中。
  5. 列印小抄,作為團隊成員導入此工具時的快速入門參考。

常見問題

共十個章節:啟動、斜線指令、提示前綴、模式、鍵盤快速鍵、常用旗標、設定與記憶、hooks、MCP 伺服器,以及把這些元件整合起來的實用工作流程。

使用 Claude Code CLI 的開發者——不論你是剛入門、想掌握核心斜線指令,或已經很熟練、需要複習 hook 事件、旗標或 MCP 設定,都適用。

有的。專門章節列出了 hooks 及新增 MCP 伺服器所需的指令與設定項目,並附有展示適用時機的工作流程範例。

可以。點擊任一指令或其列上的複製圖示,即可複製到剪貼簿,方便貼到終端機中。

是的,免費、可搜尋、可列印,且完全在瀏覽器中運作。


熱門搜尋
claude code cheat sheet claude code slash commands claude code keyboard shortcuts claude code cli flags claude code hooks claude code mcp servers claude md memory file claude code commands list
需要協助?
使用此工具時遇到問題?請告訴我們的團隊。
回報問題

將此免費工具新增到你自己的網站 — 複製並貼上下面的程式碼。