When you type something in Claude Code, most of what you write goes to Claude as a message. Claude reads it and responds. But there is a second layer. Some things you type are instructions to the tool itself, not to the AI.
Slash commands start with /. They tell Claude Code to do something directly. They do not get sent to Claude for a response. Think of a TV and its remote control. The content playing on screen is the conversation with Claude. The remote controls the TV itself. You press a button to change the channel or turn it off. The button does not talk to whatever is playing. Slash commands are the remote.
Here are the ones you will use most:
/help shows a list of available commands
/clear wipes the conversation and starts completely fresh
/compact summarizes the conversation to save space
/focus hides intermediate work and shows only the final result
/exit closes Claude Code/clear and /compact are the two you will use most often. They control what carries over between tasks. Both are covered in detail on the next page, alongside --resume and --continue, since they are all part of the same idea: managing the session.
! Prefix: Talking Directly to Your ComputerInside Claude Code, if you start a line with !, you are sending a command directly to your computer's operating system. Claude is not involved.
Your operating system is the software that runs your computer. Windows, macOS, Linux. When you type a command and it tells the operating system what to do, that is called a shell command. A shell is the program that reads those commands and carries them out.
Think of it like a hotel. You could ask your friend (Claude) to call the front desk for you. Or you could pick up the phone yourself. The ! prefix is picking up the phone yourself. You talk directly to the front desk. Claude is not in the middle.
# Inside Claude Code, type:
! ls
# Runs `ls`, which lists all files in your current folder
# "ls" stands for "list"
! cat my-notes.txt
# Shows the raw contents of my-notes.txt directly on your screen
# "cat" stands for "concatenate", it prints the file out
! pwd
# Shows which folder you are currently in
# "pwd" stands for "print working directory", your current locationInfo
Warning: ! commands run directly on your computer. Claude does not review them first. Only run commands you understand, or commands that Claude explicitly told you to run.
You do not need to memorize many shortcuts. These four cover most situations.
Up arrow brings back your last message so you can edit it
Ctrl+C stops Claude mid-task immediately
Ctrl+L clears the visible screen (does not reset the conversation)
Shift+Tab cycles through permission modesThe most important one is Ctrl+C. Imagine you have asked someone to help rearrange your room and they start moving the wrong furniture. You do not wait until they finish. You say stop right away. Ctrl+C is that stop. Use it the moment something is going wrong, not after it has finished.
The up arrow saves time when you want to fix a small typo or try the same prompt with a minor change. You do not have to retype the whole thing.
Ctrl+L only clears what you can see on screen. It is like wiping a whiteboard. The conversation is still there. Claude still remembers everything. This is visual only. If you want to actually reset the conversation, use /clear.
Shift+Tab is unique to Claude Code. It switches between permission modes. A permission mode controls how much Claude checks with you before taking action. For example, one mode asks you to approve every file change. Another lets Claude work through several steps without stopping. You will learn what each mode does in a later tutorial. For now, just know this shortcut exists so you are not caught off guard when you press it by accident.
One note for Mac users: Ctrl here means the Control key, not the Command key. This trips people up at first.
Two features help when you hand off a task and come back later.
Focus mode hides the steps Claude takes along the way. Every time Claude reads a file, runs a command, or uses one of its built-in abilities, that action is called a tool call. By default you see each one happen on screen. Focus mode skips all that and shows only the final result. Think of it like a kitchen where the chef works quietly and only brings out the finished dish. Toggle it on and off with /focus.
When you trust Claude enough that you do not need to watch every step, focus mode reduces noise. You check what matters: the end result.
Recaps are short summaries Claude generates during and after long sessions. They capture what was done and what still needs to happen. Think of a recap as a handoff note: if you step away from a task for an hour, the recap tells you exactly where things stand when you come back.
Recaps are especially useful when you start a session, give Claude a complex task, and go focus on something else. When you return, you do not have to scroll through the entire session history to understand what happened.
1. Open Claude Code in any folder
2. Type: /help
Read through the available commands
3. Ask Claude something simple
4. Press Shift+Tab once
Notice a label appear showing the current permission mode
Press it again to cycle to the next mode
5. Type: /clear
Notice the conversation history is gone
6. Ask Claude the same question again
Claude answers from scratch, no memory of beforeSlash commands control Claude Code itself, not the conversation inside it. /focus hides intermediate steps to show only the final result, /help shows what is available, and /exit closes the tool. /clear and /compact deserve their own page and you will meet them next. The ! prefix runs commands directly on your computer, skipping Claude entirely. Four keyboard shortcuts matter: up arrow to recall your last message, Ctrl+C to stop Claude immediately, Ctrl+L to clear only the visual screen, and Shift+Tab to cycle through permission modes. Recaps are short summaries Claude generates during long sessions so you can see what happened and what is next when you return.
Next up: 05. Sessions: Resume, Continue, and Knowing When to Start Fresh.
Discussion
0 comments· Help other readers by sharing what worked (or didn't) for you.
Sign in to join the discussion.
No comments yet. Be the first to share your thoughts!