Important claude commands

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.

CommandPurpose
/helpDisplay available commands
/initAnalyze project and generate CLAUDE.md
/configOpen configuration settings
/modelSelect or change Claude model
/skillInvoke a skill, when available
/skillsList available skills
/memoryView or edit project memory
/statusShow account, model, version and status
/doctorDiagnose installation problems
/permissionsManage tool permissions
/planEnter planning mode
/exitExit Claude Code

2. Session and context management

CommandPurpose
/clearClear conversation and start fresh
/resetAlias for /clear
/newStart a new conversation
/compactSummarize conversation to free context
/contextShow context-window usage
/resumeResume previous session
/continueAlias for /resume
/rewindRestore an earlier checkpoint
/branchCreate an alternate conversation branch
/forkCreate a separate background session
/renameRename current session
/exportExport conversation
/copyCopy the last response
/btwAsk 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

CommandPurpose
/modelSwitch between Sonnet, Opus, etc.
/costDisplay session cost and token usage
/usageShow plan usage and rate limits
/effortAdjust reasoning effort
/fastEnable or disable fast mode
/advisorConfigure a secondary model advisor

4. MCP, agents and tools

These are particularly important when building AI agents and MCP-based applications.

CommandPurpose
/mcpManage MCP server connections
/agentsManage subagents
/hooksView configured automation hooks
/permissionsConfigure tool permissions
/add-dirAdd another directory for Claude to access
/pluginManage plugins, where available
/skillsDiscover available skills

5. Code development and review commands

CommandPurpose
/diffView code changes
/simplifyReview and improve recently changed code
/code-reviewReview code for potential bugs
/security-reviewReview code for security vulnerabilities
/debugHelp debug issues
/verifyBuild and test the application
/batchSplit large tasks into parallel work units
/goalDefine a completion condition
/loopRepeat a task at intervals
/tasksManage background tasks

Some of these are bundled skills or feature-dependent commands rather than universal built-ins.

6. Authentication and troubleshooting

CommandPurpose
/loginSign in
/logoutSign out
/doctorDiagnose installation/configuration
/feedbackSend feedback to Anthropic
/bugAlias for feedback
/statusView current session information
/resumeRestore an earlier session
/exitQuit 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-scan
description: 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:

CommandIs it a standard built-in?
/skillNot generally a standalone built-in command
/skillsYes, lists available skills
/configYes
/modelYes
/mcpYes
/agentsYes in the documented command set
/hooksYes

For the complete official reference, see:

My recommended learning order

Since you’re exploring DevOps, MCP, Python and AI agent development, I’d learn these in this order:

  1. /init, /config, /model
  2. /memory, /context, /compact
  3. /plan, /permissions
  4. /skills, /mcp, /agents
  5. /hooks, /batch, /loop
  6. /debug, /code-review, /security-review
  7. /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.

Leave a Reply