They help you control the AI model, manage context, configure permissions, work with MCP servers, create skills, manage agents, and automate development workflows.
1. Essential Claude Code commands
These are the commands I recommend learning first.
| Command | Purpose |
|---|---|
/help | Display available commands |
/init | Analyze project and generate CLAUDE.md |
/config | Open configuration settings |
/model | Select or change Claude model |
/skill | Invoke a skill, when available |
/skills | List available skills |
/memory | View or edit project memory |
/status | Show account, model, version and status |
/doctor | Diagnose installation problems |
/permissions | Manage tool permissions |
/plan | Enter planning mode |
/exit | Exit Claude Code |
2. Session and context management
| Command | Purpose |
|---|---|
/clear | Clear conversation and start fresh |
/reset | Alias for /clear |
/new | Start a new conversation |
/compact | Summarize conversation to free context |
/context | Show context-window usage |
/resume | Resume previous session |
/continue | Alias for /resume |
/rewind | Restore an earlier checkpoint |
/branch | Create an alternate conversation branch |
/fork | Create a separate background session |
/rename | Rename current session |
/export | Export conversation |
/copy | Copy the last response |
/btw | Ask a side question without adding it to main conversation history |
Important difference:
/clear— removes the current conversation context./compact— summarizes existing context and continues working./rewind— goes back to an earlier checkpoint.
3. Model and usage commands
| Command | Purpose |
|---|---|
/model | Switch between Sonnet, Opus, etc. |
/cost | Display session cost and token usage |
/usage | Show plan usage and rate limits |
/effort | Adjust reasoning effort |
/fast | Enable or disable fast mode |
/advisor | Configure a secondary model advisor |
4. MCP, agents and tools
These are particularly important when building AI agents and MCP-based applications.
| Command | Purpose |
|---|---|
/mcp | Manage MCP server connections |
/agents | Manage subagents |
/hooks | View configured automation hooks |
/permissions | Configure tool permissions |
/add-dir | Add another directory for Claude to access |
/plugin | Manage plugins, where available |
/skills | Discover available skills |
5. Code development and review commands
| Command | Purpose |
|---|---|
/diff | View code changes |
/simplify | Review and improve recently changed code |
/code-review | Review code for potential bugs |
/security-review | Review code for security vulnerabilities |
/debug | Help debug issues |
/verify | Build and test the application |
/batch | Split large tasks into parallel work units |
/goal | Define a completion condition |
/loop | Repeat a task at intervals |
/tasks | Manage background tasks |
Some of these are bundled skills or feature-dependent commands rather than universal built-ins.
6. Authentication and troubleshooting
| Command | Purpose |
|---|---|
/login | Sign in |
/logout | Sign out |
/doctor | Diagnose installation/configuration |
/feedback | Send feedback to Anthropic |
/bug | Alias for feedback |
/status | View current session information |
/resume | Restore an earlier session |
/exit | Quit Claude Code |
7. Skills and custom commands
This is one of Claude Code’s most useful features.
A skill is a reusable set of instructions that Claude can execute when you invoke it or when it determines the skill is relevant.
For example, you can create your own commands:
.claude/ skills/ deploy/ SKILL.md security-scan/ SKILL.md kubernetes/ SKILL.md code-review/ SKILL.md
Example SKILL.md:
---name: security-scandescription: Scan the application for security issues---Analyze the current application.1. Identify exposed secrets.2. Check authentication and authorization.3. Check API security.4. Analyze dependency vulnerabilities.5. Provide remediation recommendations.
You can then invoke:
/security-scan
You can also create skills for:
/deploy— deployment automation./kubernetes— Kubernetes troubleshooting./terraform— Terraform code review./devops— DevOps pipeline analysis./mcp-builder— MCP server development.
Custom skills are stored in .claude/skills/ at project or user level. The older .claude/commands/ format is also supported.
8. How to discover every available command
Most useful trick
Inside Claude Code, type:
/
This opens the command menu and displays available built-in commands, bundled skills, custom skills, plugin commands and MCP-provided commands.
A few important distinctions:
| Command | Is it a standard built-in? |
|---|---|
/skill | Not generally a standalone built-in command |
/skills | Yes, lists available skills |
/config | Yes |
/model | Yes |
/mcp | Yes |
/agents | Yes in the documented command set |
/hooks | Yes |
For the complete official reference, see:
- Anthropic – Claude Code Cheatsheet
- Claude Code – Slash Commands Documentation
- Claude Code – Skills Documentation
My recommended learning order
Since you’re exploring DevOps, MCP, Python and AI agent development, I’d learn these in this order:
/init,/config,/model/memory,/context,/compact/plan,/permissions/skills,/mcp,/agents/hooks,/batch,/loop/debug,/code-review,/security-review/verify,/diff
This gives you a foundation for using Claude Code as an AI-powered software engineering and DevOps agent.
One important note: The command list changes between Claude Code versions and depends on installed plugins and features. The / menu in your installation is the authoritative list for your environment.
