Codex Slash / Commands

Slash Commands in Codex/It is the shortcut command system (Slash Commands).

After typing the / symbol in the dialog box, the system immediately pops up a command panel listing all available commands and their descriptions.

To use MCP, Skills, browser, etc., just type / and then select the corresponding function.

To summon the pet, you can type/petEnglish version input/pet:

If the Chinese feels awkward, you can set the language to English:

Command Categories

By function, they can be divided into four major categories: context management, code and development workflow, model and reasoning control, personalization and others.

Context management

A group of commands for controlling conversation threads and context windows.

CommandFeaturesDescriptionApplicable scenarios
/compact, /compressCompress ContextIntelligently summarize the current conversation history, retain key information, and free up token spaceWhen a long conversation shows a "context full" warning
/status, /statusView StatusOutput key runtime parameters such as the current conversation ID, consumed context token count, and remaining quotaBefore deciding whether to perform a token-intensive operation

/compact will not lose critical context. It intelligently retains important code snippets and decision information, and only compresses redundant conversation turns.

Code and Development Workflow

Core function command group for developers.

CommandFeaturesDescriptionApplicable scenarios
/review, /code reviewCode ReviewHave Claude perform a systematic review of the current file or specified code segment, checking for potential bugs, security issues, performance bottlenecks, and code styleBefore submitting a PR, after code refactoring
/side, /sideSide ConversationInitiate an independent conversation in a temporary branch without affecting the main thread; it can be merged, discarded, or kept when doneWhen you want to quickly try a solution without polluting the main conversation history
/fork, /forkFork BranchFork the conversation into a local Git branch or a fresh working tree, supporting parallel exploration of different approachesWhen you need to compare Approach A with Approach B
/mcpMCP StatusList all MCP (Model Context Protocol) servers connected in the current conversation, and view online status and available tool listsTroubleshoot connection status when external tools don't respond

The difference between /side and /fork: /side is a branch at the conversation level, suitable for quick experiments; /fork creates a Git branch, suitable for parallel development at the code level.

Model and reasoning control

A group of commands for adjusting AI capability and depth of thinking.

CommandFeaturesDescriptionApplicable scenarios
/reasoning, /reasoning modeReasoning StrengthSwitch between low/medium/high reasoning intensity levels, with the current level displayed in real time after the commandIncrease for complex algorithm problems; keep medium-low for everyday Q&A
/model, /modelModel SwitchingSwitch between different AI models, with the current model name displayed after the commandChoose a lightweight model for quick boilerplate code generation, and a flagship model for deep architectural analysis

High-intensity reasoning responds slower but gives more accurate answers, while low-intensity responds faster. When debugging complex bugs, it's recommended to switch to high reasoning mode.

Personalization and other

Experience customization and accessibility command group.

CommandFeaturesDescriptionApplicable scenarios
/persona, /personaSet PersonaAdjust Claude's response tone and style, such as presets like "concise and direct," "detailed teaching," or "senior engineer"Unify output style during team collaboration
/feedback, /feedbackSubmit FeedbackQuickly open a feedback channel to report bugs, suggest features, or share usage experienceProvide immediate feedback when output quality issues are encountered
/pet, /petDesktop PetToggle the built-in desktop pet display in Claude Code, a small easter egg featureHide it when you need to focus, summon it when resting

Recommended Workflow

Incorporating slash commands into your daily development workflow can get twice the result with half the effort.

# 步骤1:开始新任务前,检查上下文余量
/status

# 步骤2:遇到复杂问题,提升推理强度
/reasoning   # 切换至"高"档

# 步骤3:完成代码改动后,启动审查
/review

# 步骤4:探索不确定的方案,开启侧边对话
/side

# 步骤5:上下文快满时,压缩历史
/compact
StepsTimingRecommended CommandsPurpose
1Before starting a new task/statusCheck context remaining and quota to determine whether a new conversation is needed
2When encountering complex problems/reasoningIncrease reasoning intensity for deeper analysis
3Before submitting a PR/reviewCatch potentially missed edge cases and potential bugs
4Explore New Solutions/side or /forkExperiment in a safe environment without affecting main-line progress
5When context is about to run out/compactCompress historical conversations while preserving key context

Quick Reference

The following quick-reference table summarizes brief information for all 11 built-in commands.

CommandFeaturesQuick Notes
/compactCompress ContextWhen a long conversation runs low on tokens, intelligently summarize the history
/statusView StatusAn overview of conversation ID, token usage, and remaining quota
/reviewCode ReviewAI automatically checks bugs, security, performance, and style
/sideSide ConversationExplore safely in a temporary branch without polluting the main thread
/forkFork BranchCreate a Git branch or new working tree, evolve in parallel
/mcpMCP StatusView external service connections and tool availability
/reasoningReasoning StrengthAdjustable among low / medium / high levels, with the current level shown after the command
/modelSwitch modelSwitch the underlying AI model, with the current model name displayed after the command
/personaSet PersonaAdjust the AI's reply tone and style
/feedbackSubmit FeedbackReport issues or suggestions to Anthropic
/petDesktop PetWake up or dismiss the built-in desktop pet (easter egg feature)
other extensions