Skip to content

Core Commands & Shortcuts (Quick Reference)

A collection of essential commands and shortcuts to boost your token efficiency and workflow speed in Claude Code.


⌨️ Must-Know Key Shortcuts

ShortcutAction
Shift + TabToggle Plan ↔ Edit mode — Essential when you want to plan before making direct code changes
ESC onceImmediately interrupt the current operation
ESC twiceRewind — Returns to the previous prompt state

⚡ Running Bash Commands in Terminal (!)

You don't need to open a new terminal to check git status or start a server inside Claude Code. Prefix any command with ! to execute it as a local Bash command immediately.

!git status        → Check changed files
!git diff          → View detailed changes
!npm run dev       → Start local server
!npm run test      → Run tests

💬 Essential Slash Commands

Session & Context Management

CommandDescription
/initAuto-generates CLAUDE.md, your project's instruction file (required during initial project setup)
/clearCompletely resets the accumulated conversation context
/compactCompresses context by keeping only key summaries to save tokens
/contextVisually displays current token usage in the session as a bar chart

💡 Running /context shows token usage broken down by System Prompt, System Tools, and User/Assistant. If System Tools is consuming a lot after connecting MCP, consider deactivating it. → MCP Token Management

Memory & Settings

CommandDescription
/memoryDisplays the contents of currently loaded memory (CLAUDE.md, MEMORY.md, etc.)
/statusShows a comprehensive overview of your logged-in account, subscription plan, and connected MCP server status
/allowed-toolsView and manage the list of tools permitted for the AI (file writing, local command execution, etc.)

Model & Output

CommandDescription
/modelSwitch models based on task complexity to optimize token usage
/output-styleChange the AI's response style

/model Selection Guide:

ModelBest For
OpusComplex architecture design, mysterious bug resolution, critical decision-making
SonnetGeneral coding tasks, delegating to parallel sub-agents (default)
HaikuFile exploration, simple renaming, quick questions

/output-style Options:

StyleDescriptionRecommended When
autoAutomatically adjusts to the situation (default)General use
conciseShort and to the pointFast iterative work, code edits
verboseIncludes detailed explanationsLearning purposes, unfamiliar codebases
explanatoryExplains reasons behind code changesLearning to code, code reviews
warningDisplays strong warnings for risky operationsSafety net for production work

Voice Input

CommandDescription
/voiceEnable/disable voice input mode (hold Space and speak)
/configSettings menu (select Korean under Language for Korean voice recognition)

Agents & Automation

CommandDescription
/agentsView and manage the list of sub-agents defined in the current project
/mcpView connected MCP servers and enable/disable them

Export

CommandDescription
/exportExtracts the current session context so it can be imported into other chatbots (ChatGPT, Gemini, etc.)
/export --clipboardCopies directly to clipboard

🛠️ Creating Your Own Custom Slash Commands

You can modularize frequently used pipelines as slash commands.

  1. Create a .claude/commands/ folder inside your project.
  2. Create a file with any name you want, such as ship.md, and write the workflow to execute.
  3. After restarting Claude Code, typing /ship will automatically run that pipeline.

→ See Custom Slash Commands for details

PRs welcome ✦