Claude Code Command Practice

How to use
STARTSTOP
*Toggle input mode: ctrl + shift + alt + space
PRE
NEXT
Exclude this question from the list
Restore excluded questions
Get a URL for the current exclusions
https://command-lab.com
Copy
Guide mode
Repeat mode

*Recommended browser: Google Chrome

PUSH ENTER
If you enjoy this site, please share it — it keeps us motivated to keep improving!

Claude Code Commands: Full List (17 commands)

Every Claude Code command used in the practice above, listed in full, with a short explanation of what each one does. Find one you want to learn, then type it out in the practice above until your fingers remember it.

Startup

Claude Code — Startup
Action Command What it does
Launch Claude Code from the terminal claude Enter Launches Claude Code by typing "claude" in the terminal. It starts an interactive session with the current directory's project already loaded, so you can begin giving instructions in chat form right away.

Slash commands

Claude Code — Slash commands
Action Command What it does
Clear the conversation and start fresh /clear Enter Wipes the entire conversation history and starts a fresh dialogue from scratch. Use it when you want to switch topics or feel the context has gotten cluttered and needs a reset.
Summarize the conversation so far to compact the context /compact Enter Summarizes the conversation so far to reduce context usage. Run it during a long session when you're approaching the context limit — it lets you keep working while preserving the gist of what's been discussed.
List the available slash commands /help Enter Displays a list of the available slash commands. Run it whenever you forget what you can do, or want to check for newly added features.
Create a project config file (CLAUDE.md) /init Enter Analyzes the current project and auto-generates a CLAUDE.md configuration file that Claude Code refers to. Summarizing things like the project structure and coding conventions there improves the accuracy of everything you do afterward.
Pick and resume a previous conversation /resume Enter Lets you pick a past conversation session from a list and continue from where it left off. Useful when you stopped a previous session partway through and want to carry the context forward.
Check or change the model in use /model Enter Checks which AI model is currently in use, or lets you switch to a different one. Use it when you want to pick a model suited to the task at hand — trading off speed against accuracy, for example.
Check permission settings for things like file edits /permissions Enter Shows the permission settings for operations like file edits or command execution — whether each one asks for confirmation or is auto-approved. Use it to prevent unintended actions, or to reduce confirmations and speed up your workflow.
Open the subagent list and settings /agents Enter Shows the list of subagents specialized for particular tasks and lets you configure them. It's the entry point for using different agents for different roles, like one focused on research and another on planning.
Check the API usage cost for this session /cost Enter Checks how much API usage has cost so far in the current session. It shows the total cost and elapsed time, which is handy if you want to keep an eye on spending while you work.
Diagnose installation or configuration issues /doctor Enter Automatically checks whether the installation and various settings have any problems. Run it when something feels off, or right after setup to confirm your environment is configured correctly.

Shortcuts

Claude Code — Shortcuts
Action Command What it does
Interrupt the running process Esc Interrupts whatever is currently running, right on the spot. If a response or a long-running command is heading in a direction you didn't intend, this stops it immediately.
Rewind to your previous message and edit it (press Escape twice quickly) Esc Esc Pressing Escape twice quickly rewinds the conversation to your previous message so you can edit it. If you phrased an instruction badly, this lets you fix just that one message instead of starting over.
Toggle auto-accept edit mode Shift+Tab Toggles auto-accept mode on or off — when on, suggested edits like file changes are approved automatically instead of asking for confirmation each time. Turn it on when you trust the work and want to move fast without the back-and-forth.
Cancel input or processing Ctrl+C Cancels whatever you're typing or the process currently running. Pressing it repeatedly can end the session entirely, so use it with an eye on the current context.

CLI options

Claude Code — CLI options
Action Command What it does
Resume your last conversation from the terminal claude --continue Enter Automatically resumes your most recent conversation session when you open a new terminal, continuing right where you left off. Unlike /resume, there's no list to pick from — it jumps straight back into the last session.
Ask a one-off question without opening a session, and just get the result claude -p "explain this project" Enter Sends a one-off question and gets back just the result text, without opening an interactive session. It's well suited for embedding in scripts or shell pipelines to combine with other processing.
Back to top