Claude Code cheatsheet

Claude Code: Inside a session

11 common Claude Code tasks.

List commands

Show the available slash commands.

/help

Create a CLAUDE.md

Analyze the project and write a CLAUDE.md with build commands and conventions.

/init

Start a fresh conversation

Clear the context window. Use it between unrelated tasks.

/clear

Shrink a long conversation

Summarize the history to free up context. Add instructions about what to keep.

/compact keep the failing test names

Switch model

Choose a different model for the rest of the session.

/model

Manage permissions

View and change which tools Claude may use without asking.

/permissions

Check MCP servers

See connected MCP servers and sign in to remote ones.

/mcp

See usage and cost

Show token use for the session.

/cost

Run a shell command

Start a line with ! to run it in your shell and add the output to the conversation.

!git status

Mention a file

Type @ then a path to add that file to the conversation.

@src/app.ts explain how this works

Learn the keyboard shortcuts

Shift+Tab cycles permission modes, Esc interrupts Claude, and pressing Esc twice lets you go back and edit an earlier message.

Shift+Tab    cycle permission modes
Esc          interrupt Claude
Esc Esc      rewind to an earlier message

Was this page helpful?