How to use this cheat sheet

Search for the job you are trying to do, or filter by Claude Code or Codex. Copy the command, then add the details the tool needs when the command accepts an instruction.

This is a curated reference, not a complete command list. Availability can vary by product surface, version, plan, workspace policy, and environment, so check the product help when a command is missing or behaves differently.

A clean start-to-review workflow

  1. Run /init once when the project still needs its instruction file.
  2. Use /plan before a change with several parts or important tradeoffs.
  3. Describe the result you want and let the tool work.
  4. Run /diff to inspect what changed.
  5. Use /review with the product-specific behavior shown below before you merge or ship.

When the conversation starts feeling crowded

  1. Use /context in Claude Code or /status in Codex to inspect the current session.
  2. Run /compact to summarize the conversation and free context. In Claude Code, you can add focus instructions naming the decisions and open problems that must survive.
  3. Use /clear when you need a truly fresh task instead of carrying the old conversation forward.

When you come back later

  1. Use /resume to reopen the saved session.
  2. Run /status to confirm the session details available on your surface.
  3. Use /diff before continuing so you know what is already changed.

Command group

Start and plan

/init
Claude CodeCodex

Create the project instruction file the coding assistant should follow.

Use it when
Use it the first time you bring an existing project into Claude Code or Codex.
Example
/init
Documented surfaces
Claude Code · Codex app · Codex CLI · Codex IDE
Product notes

Claude Code: Creates a CLAUDE.md guide.

Codex: Creates an AGENTS.md scaffold.

/plan
Claude CodeCodex

Ask for a step-by-step approach before the tool changes anything.

Use it when
Use it when the work has several parts, touches important files, or needs a decision before implementation.
Example
/plan add account deletion without changing the billing flow
Documented surfaces
Claude Code · Codex app · Codex CLI · Codex IDE
/goal
Claude CodeCodex

Set a concrete outcome for longer-running work.

Use it when
Use it when you want the agent to keep the finish line visible across several steps.
Example
/goal ship this site; preserve content, run tests, verify the production build
Documented surfaces
Claude Code · Codex app · Codex CLI · Codex IDE
Product notes

Claude Code: Keeps working until the stated completion condition is met or cleared.

Codex: Keeps a persistent goal you can view, edit, pause, resume, or clear.

Command group

Manage context

/compact
Claude CodeCodex

Condense a long session so the important context remains easier to work with.

Use it when
Use it when the conversation is getting long or the tool warns that context is running low.
Example
/compact
Documented surfaces
Claude Code · Codex app · Codex CLI · Codex IDE
Product notes

Claude Code: Accepts optional focus instructions after the command.

Codex: Use the command by itself; current docs do not list inline focus instructions.

/context
Claude Code

See what is using the current context window.

Use it when
Use it when Claude Code feels crowded and you want to understand what is taking up space.
Example
/context
Documented surfaces
Claude Code
/btw
Claude CodeCodex

Ask a quick side question without adding it to the main conversation.

Use it when
Use it when you need a small answer but do not want that detour taking up the active task's context.
Example
/btw what does this error code mean?
Documented surfaces
Claude Code · Codex CLI
Product notes

Claude Code: Opens an ephemeral side-question overlay.

Codex: Alias for /side in the CLI.

/status
Claude CodeCodex

Show the session details, context usage, and environment information available on the current surface.

Use it when
Use it to confirm which session you are in and see the configuration, context, or rate-limit details that surface exposes.
Example
/status
Documented surfaces
Claude Code · Codex app · Codex CLI · Codex IDE
Product notes

Claude Code: Shows version, model, account, and connectivity.

Codex: The CLI shows the active model, approval policy, writable roots, and token usage; the app and IDE show the chat ID, context usage, and rate limits.

/clear
Claude CodeCodex

Start a fresh conversation without leaving the current project.

Use it when
Use it when the next task should not inherit the current chat's context.
Example
/clear
Documented surfaces
Claude Code · Codex CLI
Product notes

Claude Code: Starts empty context and keeps the previous conversation available to resume.

Codex: Clears the terminal and starts a new chat.

/usage
Claude CodeCodex

Check available usage information and limits.

Use it when
Use it when you need to understand current account usage, limits, or an available reset option.
Example
/usage
Documented surfaces
Claude Code · Codex CLI
Product notes

Claude Code: Shows session cost, plan usage limits, and activity stats; supported plans also include feature breakdowns.

Codex: Shows daily, weekly, or cumulative token activity and, when available, lets you redeem an earned rate-limit reset.

Command group

Steer the session

/model
Claude CodeCodex

View or change the model used for the current work.

Use it when
Use it when you want a faster model for a small task or a stronger model for harder reasoning.
Example
/model
Documented surfaces
Claude Code · Codex app · Codex CLI · Codex IDE
Product notes

Claude Code: Can change and save the default model, depending on how it is invoked.

Codex: Chooses the active model and available reasoning effort for the chat.

/permissions
Claude CodeCodex

Review or change what the assistant can do without asking first.

Use it when
Use it before sensitive work or when approval prompts are either too loose or too restrictive.
Example
/permissions
Documented surfaces
Claude Code · Codex CLI
Product notes

Claude Code: Manages allow, ask, and deny rules for tools.

Codex: Switches the session's approval and access profile.

/mention
Codex

Add a file to the conversation by typing part of its path.

Use it when
Use it when Codex needs a specific file and you do not want to paste its contents.
Example
/mention app/api/contact/route.ts
Documented surfaces
Codex CLI
/skills
Claude CodeCodex

Browse the reusable skills available in the current environment.

Use it when
Use it when a repeatable workflow may already have instructions or tools ready to use.
Example
/skills
Documented surfaces
Claude Code · Codex CLI
/mcp
Claude CodeCodex

Inspect or manage Model Context Protocol connections.

Use it when
Use it when a connected tool is missing, disconnected, or needs authentication.
Example
/mcp
Documented surfaces
Claude Code · Codex app · Codex CLI · Codex IDE
Product notes

Claude Code: Manages server state, reconnection, and OAuth.

Codex: Lists configured MCP tools and server details.

/memory
Claude Code

Review project memory files and Claude Code memory settings.

Use it when
Use it when persistent project guidance is missing, stale, or loading from the wrong place.
Example
/memory
Documented surfaces
Claude Code

Command group

Review work

/diff
Claude CodeCodex

Show the changes made in the working project.

Use it when
Use it before accepting, committing, or handing off code changes.
Example
/diff
Documented surfaces
Claude Code · Codex CLI
/review
Claude CodeCodex

Ask the tool to inspect code changes for defects and risks.

Use it when
Use it after implementation and before you merge or deploy.
Example
/review
Documented surfaces
Claude Code · Codex app · Codex CLI · Codex IDE
Product notes

Claude Code: Runs a fast, read-only review of a GitHub pull request.

Codex: Reviews local changes or compares them with a selected base branch.

/copy
Claude CodeCodex

Copy the latest completed response without selecting terminal text.

Use it when
Use it when you want to move a plan, answer, or code block into another document.
Example
/copy
Documented surfaces
Claude Code · Codex CLI

Command group

Continue and parallelize

/resume
Claude CodeCodex

Reopen a previous coding session and continue from its saved context.

Use it when
Use it when you return to unfinished work instead of rebuilding the conversation from memory.
Example
/resume
Documented surfaces
Claude Code · Codex CLI
/fork
Claude CodeCodex

Branch the current conversation so another direction can continue independently.

Use it when
Use it when you want to explore another approach without losing the current thread.
Example
/fork
Documented surfaces
Claude Code · Codex app · Codex CLI · Codex IDE
Product notes

Claude Code: Copies the conversation into a background session.

Codex: Copies a local chat into a new local chat.

/tasks
Claude Code

View and manage background work in the current Claude Code session.

Use it when
Use it to check running shells and subagents without interrupting the main task.
Example
/tasks
Documented surfaces
Claude Code
/ps
Codex

Check background terminal processes and their recent output.

Use it when
Use it when a build, test, or server is still running in the background.
Example
/ps
Documented surfaces
Codex CLI
Product notes

Codex: The list may be empty unless Codex started a supported background terminal in the current session.

/rewind
Claude Code

Return the conversation, the code, or both to an earlier checkpoint.

Use it when
Use it when a change or conversation turn took the project in the wrong direction.
Example
/rewind
Documented surfaces
Claude Code

Command group

Fix problems

/doctor
Claude Code

Run a setup checkup and diagnose Claude Code configuration problems.

Use it when
Use it when installation, settings, plugins, skills, hooks, or permissions are behaving unexpectedly.
Example
/doctor
Documented surfaces
Claude Code
Product notes

Claude Code: Reports findings first and asks before applying fixes; claude doctor outside a session prints read-only installation diagnostics.

Sources3