Claude Code has a set of built in slash commands that make it easier to manage projects, conversations, models, permissions, and development tasks.
These commands start with / and can be entered directly in Claude Code. Here are 20 commands currently listed in Anthropic’s official documentation.
Essential Claude Code Commands
1. /add-dir
Adds additional working directories to your Claude Code session. This is useful when your project needs access to files outside the main working directory.
2. /agents
Lets you manage custom AI subagents in Claude Code. Subagents can be used for specific tasks within a larger coding workflow.
3. /bug
Lets you report a bug to Anthropic. The command can send relevant conversation information along with your report.
4. /clear
Clears the current conversation history. It’s useful when you want to start a new task without the previous conversation taking up context.
5. /compact
Compacts the current conversation by summarizing its context. This can help when a long coding session starts using a large amount of context.
6. /config
Opens Claude Code configuration settings. You can use it to view or change available configuration options.
7. /cost
Shows token usage information for your Claude Code session. It can help you keep track of how much context and usage your session is consuming.
8. /doctor
Checks your Claude Code installation and environment for common problems. It’s useful when Claude Code isn’t working as expected.
9. /help
Shows help information and available Claude Code commands. If you’re unsure what a command does, this is one of the first commands to try.
10. /init
Sets up a CLAUDE.md file in your project. This file can contain instructions and information that Claude Code should follow when working on the project.
11. /login
Lets you log in to Claude Code or switch between accounts. It’s useful when you need to change the account currently connected to Claude Code.
12. /logout
Signs you out of your current Claude Code account.
13. /mcp
Manages MCP server connections. MCP allows Claude Code to connect with external tools and services that support the Model Context Protocol.
14. /memory
Helps manage Claude Code memory files, including CLAUDE.md files used to store project instructions and useful context.
15. /model
Lets you view or change the Claude model being used for your session.
16. /permissions
Lets you view and update Claude Code permissions. This controls what actions Claude Code is allowed to perform.
17. /pr_comments
Displays comments associated with a pull request. This can be useful when working on code changes that are being reviewed.
18. /review
Requests a code review from Claude. It can help identify potential problems and areas that may need attention before changes are finalized.
19. /status
Shows the current Claude Code status, including relevant account and system information.
20. /terminal-setup
Helps configure terminal key bindings for Claude Code. This can make interacting with Claude Code from the terminal more convenient.
These Claude Code slash commands cover many of the tasks developers commonly need during a coding session. Some are simple commands, such as /help, /clear, and /status, while others, including /mcp, /agents, and /permissions, are designed for more advanced workflows.
Claude Code is updated regularly, so commands and features can change over time. If you’re using a newer version, checking /help inside Claude Code is a quick way to see which commands are available in your installation.
Frequently Asked Questions
What are Claude Code commands?
Claude Code commands are slash commands that let you quickly manage your coding session, project settings, models, permissions, and other features.
How do I see all Claude Code commands?
Type /help in Claude Code to see the commands available in your current version.
What does /clear do in Claude Code?
The /clear command removes the current conversation history so you can start a new task with a fresh context.
What is the /compact command used for?
/compact summarizes the current conversation context. It's useful when a session becomes long and starts using a lot of context.
How do I change the Claude model?
Use the /model command to view or change the model being used in your Claude Code session.
What does /init do?
The /init command helps set up a CLAUDE.md file for your project. This file can contain instructions and useful project information for Claude Code.
What is the /mcp command?
/mcp is used to manage MCP server connections. MCP lets Claude Code work with external tools and services.
What does /permissions do?
The /permissions command lets you view and update the permissions that control what Claude Code can do.
How can I check Claude Code's status?
Use /status to view relevant account, system, and session status information.
What does /doctor do in Claude Code?
/doctor checks your Claude Code installation and environment for common problems and helps identify issues.
Can I report a Claude Code bug?
Yes. The /bug command lets you report a problem to Anthropic and can include relevant conversation information.
How do I log out of Claude Code?
Use /logout to sign out of the account currently connected to Claude Code. You can use /login later to sign in again.
What is /review used for?
The /review command asks Claude Code to review code and identify potential problems or areas that may need improvement.
What does /cost show?
/cost displays token usage information for the current Claude Code session, helping you keep track of usage.
Can Claude Code access multiple directories?
Yes. The /add-dir command lets you add additional working directories to the current Claude Code session.
Never Miss an Important Update
Get the latest tech news, how to guides, AI updates, telecom offers, and useful tools delivered instantly. Join our WhatsApp Channel or add WikiTechLibrary as your preferred source on Google.





![Best AI Voice Generators [Free & Paid] best ai voice generators](https://wikitechlibrary.com/wp-content/uploads/2025/02/best-ai-voice-generators-450x300.webp)
