In this categoryClaude Code · 45
- How to Install Claude Code on macOSStart
- How to Install Claude Code on Windows Natively (No WSL)
- How to Install Claude Code on Windows with WSL
- How to Start Your First Project with Claude Code
- How to Create a CLAUDE.md File for Your Project
- How to Configure Claude Code with settings.json
- How to Layer Global, Project, and Local CLAUDE.md Files
- How to Set Up a Permissions Allowlist in Claude Code
- How to Use Claude Code Inside VS Code
- How to Add a Custom Slash Command in Claude Code
- How to Create a Custom Slash Command in Claude Code
- How to Pass Arguments to a Claude Code Slash Command
- How to Use Claude Code Slash Commands (Full List + Examples)
- How to Add Custom Slash Commands to Claude Code (Arguments + Frontmatter)
- How to Fix command not found After Installing Claude Code
- How to Add Any MCP Server to Claude Code
- How to Connect an MCP Server to Claude Code
- Best MCP Servers for Coding in 2026
- How to Add a Filesystem MCP Server to Claude Code
- How to Connect the GitHub MCP Server to Claude Code
- How to Create Your First Subagent in Claude Code
- Context7 Alternatives: MCP Servers for Up-to-Date Docs
- How to Manage MCP Server Scopes in Claude Code
- How to Restrict the Tools a Subagent Can Use
- How to Debug a Failing MCP Server in Claude Code
- How to Generate Unit Tests for a Function with Claude Code
- How to Refactor a Long Function Safely with Claude Code
- How to Debug a Failing Test with Claude Code
- How to Review Your Own Diff Before Committing with Claude Code
- How to Rename a Symbol Across the Codebase with Claude Code
- How to Review a Teammate's Pull Request with Claude Code
- How to Raise Test Coverage on a Specific File with Claude Code
- How to Debug a Runtime Error from a Stack Trace with Claude Code
- How to Add an Integration Test for an API Route with Claude Code
- How to Teach Claude Code Your Test Conventions with CLAUDE.md
- How to Find Which Commit Broke a Test with Claude Code
- How to Set Up Hooks for Automation in Claude Code
- Claude Code Hooks Explained: Events, Config, and Blocking
- How to Block Risky Commands with a Claude Code Hook
- How to Auto-Format Files After Edits with a PostToolUse Hook
- How to Get a Notification When Claude Code Finishes a Task
- How to Give a Coding Agent a Clear Stop Condition
- How to Make an Agent Plan Before It Edits
- How to Keep an Agent Session Focused by Clearing Context
- How to Pin a Specific Model for One Project
How to Use Claude Code Slash Commands (Full List + Examples)
Every built-in Claude Code slash command explained with real examples, plus how custom commands and skills add your own.
Slash commands are shortcuts you type directly in the Claude Code prompt to trigger built-in behaviors without writing an instruction in plain English. Most developers use only /clear and /help; this guide covers the ones worth adding to your daily workflow, then shows how to add your own.
The built-in commands
The exact list depends on your version, and /help always prints what is available to you right now. These are the ones you will reach for most often.
- /help — lists every command available in your version and your current config
- /clear — wipes the conversation context so you start fresh without closing the session
- /compact — condenses the current context into a summary, freeing space without losing the thread
- /config — opens the settings UI to view or change the model, permissions, and other options
- /model — switches the active model for the session
- /memory — opens your CLAUDE.md so you can edit the project rules mid-session
- /agents — create, edit, and list subagents
- /mcp — show connected MCP servers and the tools they expose
- /cost — prints token usage and estimated cost for the current session
- /init — scans the repo and scaffolds a starter CLAUDE.md
- /code-review — runs the bundled code-review skill on your current changes
The commands you will actually use daily
/clear vs /compact
These two are the most misunderstood. /clear is a hard reset: the model has no memory of anything you said. Use it when you are starting a completely different task and you do not want old context bleeding in. /compact is a soft reset: Claude summarizes what happened and keeps that summary as the new starting point. Use it when a session has grown long but you still need the model to know what it already built.
/code-review
Running /code-review with no arguments reviews your current changes. The output is a list of findings with file path and line number. You can follow up with 'fix the first three' and it applies them in order. On older versions the same behavior lives under /review.
/memory
Opens CLAUDE.md in your editor mid-session. Useful when the agent keeps doing something wrong and you want to add a rule without interrupting the flow. Save the file and Claude picks up the new rule on the next message.
Checking what is available in your version
Adding your own commands
You are not limited to the built-ins. A Markdown file at .claude/commands/deploy.md becomes /deploy, and the file content is the instruction Claude runs. In current versions these have merged into skills: a skill at .claude/skills/deploy/SKILL.md creates the same /deploy and adds optional frontmatter and supporting files. Your existing .claude/commands/ files keep working unchanged.
---
argument-hint: [file]
allowed-tools: Read, Grep
---
Review $ARGUMENTS for auth, injection, and secret-leaking issues.
Group findings by severity and suggest a concrete fix for each.
Do not edit any files; only report.FAQ
How do I see every slash command?
Type /help inside a session. It prints the commands available in your installed version, which is more reliable than any static list because the set changes between releases.
Do slash commands work in the VS Code extension?
Yes. The extension drives the same CLI underneath, so the built-in commands and any custom commands or skills in your repo work exactly as they do in the terminal.
What is the difference between a command and a skill?
A file in .claude/commands/ is a plain prompt you invoke with a slash. A skill is the newer form: a folder with a SKILL.md, optional supporting files, and frontmatter that can let Claude load it automatically when relevant. Both create a slash command; skills just do more.
Watch related tutorials
16:30
1:42:18
28:14
41:09
45:00
21:05New guides in your inbox
Fresh step-by-step how-to guides as we publish them. One email a week, no more.