Create and use Claude Code slash commands - quick prompts, bash execution, file references
Create and use user-triggered prompts with /command-name syntax.
| Command | Purpose |
|---|---|
/clear | Clear conversation history |
/compact | Compact conversation with focus |
/config | Open settings interface |
/cost | Show token usage |
/agents | Manage sub-agents |
/mcp| Manage MCP servers |
/memory | Edit CLAUDE.md files |
/model | Select AI model |
/review | Request code review |
/resume | Resume session |
/help | Get usage help |
mkdir -p .claude/commands
cat > .claude/commands/optimize.md << 'EOF'
---