Skip to content

Claude Code Keybindings

Slash commands and keyboard shortcuts are the primary interface for controlling Claude Code sessions, managing context, and invoking workflows.

Think of them as a command palette: type / to access built-in commands and skills, press keyboard shortcuts for quick actions, and use @ for file references.

Routing

SyntaxWhat it does
/skill-nameInvoke a skill (e.g., /pdf, /tech-doc-writer)
@file-pathReference a file in your prompt
!commandRun bash command directly (bash mode)

Session management

CommandWhat it does
/clearReset conversation and context (aliases: /new, /reset)
/compact [instructions]Compress conversation to free context window
/memoryEdit memory files (CLAUDE.md) and auto-memory
/contextVisualize context usage with optimization tips
/costShow token usage and estimated cost
/resume [session]Resume a conversation by ID or name
/branch [name]Create a branch at current point (alias: /fork)

Code workflows

CommandWhat it does
/diffInteractive diff viewer for uncommitted changes
/rewindRestore code/conversation to previous point (alias: /checkpoint)
/copy [N]Copy last (or Nth-last) assistant response to clipboard
/export [filename]Export conversation as plain text

Model & configuration

CommandWhat it does
/model [model]Switch AI model (Opus, Sonnet, Haiku)
/effort [level]Set effort level (low, medium, high, max, auto)
/fast [on|off]Toggle fast mode
/configOpen settings interface (alias: /settings)
/doctorHealth check for installation

Utilities

CommandWhat it does
/btw <question>Ask side question without adding to history
/initGenerate CLAUDE.md for current project
/skillsList available skills
/agentsManage agent configurations
/mcpManage MCP server connections
/helpShow all available commands

Account

CommandWhat it does
/loginAuthenticate or switch account
/logoutSign out

Keyboard shortcuts

KeyWhat it does
/ Navigate prompt history
EscapeCancel operation or clear input
Esc + EscRewind or summarize from selected message
Shift+TabCycle permission modes (default, plan, auto, etc.)
Ctrl+CInterrupt running operation
Ctrl+OToggle verbose output (detailed tool usage)

Common workflows

ScenarioCommand sequence
Start fresh task/clear → describe task
Free up context on long task/compact with optional focus instructions
Review uncommitted changes/diff
Onboard new project/init → review generated CLAUDE.md
Use faster model/model → select Haiku or /fast on
Preview before risky changesShift+Tab → review plan → Shift+Tab to execute
Ask quick question/btw <question> (doesn't affect conversation)
Undo recent changes/rewind → select checkpoint

Tips

  • Use /clear (not /compact) between unrelated tasks to avoid context pollution
  • Run /context to see optimization suggestions before compacting
  • Enable plan mode (Shift+Tab) before destructive operations
  • Press ? in terminal to see platform-specific shortcuts

References

Copyright © MSG Systems Romania AI Labs