Claude Code Commands and Shortcuts¶
This page lists the commands of Claude Code, Anthropic's artificial intelligence (AI) agent for work that lives in files, and then its keyboard shortcuts and symbols. In Claude Code you type a command starting with a slash, such as /plan, in the same box as your requests. Every command a student, faculty member, or staff member is likely to use has a worked example below, grouped by what it helps with: a small, realistic situation, what you type, and what you then see, drawn from Anthropic's documentation. The rest are listed under More Commands, Mostly for Developers.
Plans and models are on the Claude (Anthropic) page, with how Claude Code asks before acting. A listing here is not an endorsement, and for work at the American University of Antigua, the AI Responsible Use Policy applies.
Getting Started¶
/help Shows help and the commands available to you.
A first-year student opens Claude Code in a folder of anatomy lecture notes and is not sure what to type.
/help
- A help view lists the commands available on this computer and plan
Typing / on its own opens the same list, and letters typed after it filter it.
/init Drafts a CLAUDE.md brief for the folder, or suggests improvements to an existing one.
A course director keeps a pharmacology module folder (syllabus, weekly slides, practice cases) and wants Claude to know its layout every session.
/init
- Claude reads the folder and writes CLAUDE.md, describing its structure and conventions
If a CLAUDE.md already exists, it suggests improvements rather than overwriting it.
/memory Opens your CLAUDE.md files for editing and shows what Claude has remembered on its own.
Claude keeps writing exam items in British spelling, and the faculty member wants to see what it has remembered and add a standing preference.
/memory
- A picker of CLAUDE.md files to edit
- An auto memory switch, and the entries Claude has saved
Auto memory is on by default; the switch here turns it off.
/powerup Opens short interactive lessons, with animated demos, on Claude Code's features.
A student new to Claude Code wants a guided tour before starting real work.
/powerup
- A menu of quick lessons, each with an animated demo of one feature
/status Shows the version, model, account, and connection in use.
A staff member is unsure whether the laptop is signed in to the university's account or a personal one.
/status
- Settings opens on the Status tab: version, model, account, and connectivity
/login Signs in to your Anthropic account (and /logout signs out).
A faculty member switches from a personal Pro account to the department's Team account.
/login
- A sign-in flow for your Anthropic account
/logout signs out of the current account first.
Staying in Control¶
/plan Enters plan mode, so Claude researches and proposes before changing anything.
A clerkship coordinator wants 120 teaching-case files reorganized into weekly folders, but wants to see the plan first.
/plan reorganize the teaching-case files into one folder per week
- ⏸ plan mode on
- Claude reads the files and presents its plan, then asks how to proceed
- Yes, and use auto mode
- Yes, manually approve edits
- No, keep planning
Ctrl+G opens the plan in your text editor, so you can change it before approving.
/permissions Opens the rules for what Claude may do without asking, must ask about, or may never do.
A faculty member wants Claude never to open the folder of student grade exports kept beside the course files.
/permissions
- A dialog of allow, ask, and deny rules, by scope
A deny rule added here applies in every mode, including bypass.
/rewind Rolls files, the conversation, or both back to an earlier point (also Esc twice on an empty prompt).
Claude reformatted a reading list across several files in the wrong citation style.
/rewind
- A list of the prompts you sent this session; after you pick one
- Restore code and conversation
- Restore conversation
- Restore code
- Summarize from here
- Summarize up to here
- Never mind
/sandbox Turns the sandbox on or off, limiting which files and websites Claude's commands can reach.
A researcher on a Mac wants Claude's commands kept inside the project folder while it processes a dataset.
/sandbox
- The sandbox panel, with its modes and any missing requirements
Available on macOS, Linux, and WSL2 (the Windows Subsystem for Linux); on plain Windows, commands run unsandboxed.
/privacy-settings Views and changes your privacy settings (Pro, Max, and Ultra plans).
A student on a Pro plan wants to check whether their conversations may be used to improve Anthropic's models.
/privacy-settings
- Your current privacy settings, which you can change here
/branch Starts a branch of the conversation here, to try another direction without losing the original.
Halfway through drafting a case vignette, a course director wants to try a different patient age without losing the first draft.
/branch older-patient
- You are now in the branch; the original conversation is kept
/resume returns to the original conversation.
Checking the Work¶
/diff Shows what changed in your files, including Claude's edits, turn by turn.
Before sharing an updated module handbook with colleagues, a faculty member checks exactly what Claude changed.
/diff
- A list of changed files with lines added and removed
Enter opens a file's changes, and each turn's edits can be viewed separately.
/btw Asks a side question without adding it to the conversation.
Mid-task, a course director forgets which file held the 2026 learning objectives.
/btw which file had the 2026 learning objectives?
- The answer appears in a panel you dismiss; it never enters the conversation
/export Saves the whole conversation as a text file, or copies it.
A faculty member wants a record of how an exam blueprint was built, for the curriculum committee's file.
/export blueprint-session.txt
- The conversation is written to blueprint-session.txt
/copy Copies Claude's last response to the clipboard, with a picker when it contains code blocks.
Claude has written a summary table of antibiotic classes that a student wants to paste into their notes.
/copy
- The last response is copied; with code blocks, a picker offers each block or the whole response
/copy 2 copies the second-to-last response; w in the picker writes the selection to a file.
/recap Writes a one-line summary of the current session.
Back from a meeting, a faculty member wants a reminder of where a long session had got to.
/recap
- A one-line summary of the session so far
/insights Writes a report on your recent sessions: what you work on, how you use Claude Code, and where things go wrong.
At the end of term, a faculty member wants to see how they actually used Claude Code and what to try next.
/insights
- An HTML report on your recent sessions on this computer
Not available in cloud sessions.
Managing Context and Sessions¶
/context Shows what is filling Claude's working memory, as a colored grid with suggestions.
After Claude has read a dozen long journal articles, its answers start to drift.
/context
- A colored grid of how full the context window is, and with what
- Suggestions for freeing space, and a warning when it is nearly full
/compact Summarizes the conversation so far to free space, optionally keeping what you name.
A long session building renal physiology questions is nearly full, but the agreed item-writing rules must survive.
/compact keep the item-writing rules and the list of approved stems
- Conversation compacted
- Claude re-reads CLAUDE.md and the files it was working on
/clear Starts a fresh conversation, keeping the folder's CLAUDE.md (also /new).
A student finishes a cardiology study guide and moves on to an unrelated microbiology task.
/clear cardio-study-guide
- A fresh conversation; the old one is saved under that name
/resume Returns to an earlier conversation with its full history.
Yesterday's session drafting a small-group case on sepsis needs to continue.
/resume
- A list of earlier sessions to pick from
/rename Renames the session, so it is easy to find later.
A course director has several sessions open and wants the one about the renal block easy to find.
/rename renal-block-questions
- The new name appears on the prompt bar
With no name, Claude suggests one from the conversation.
/exit Leaves Claude Code (also /quit).
A student has finished for the day.
/exit
- Claude Code closes; the session can be resumed later
Model, Effort, and Usage¶
/model Switches the model, with effort adjusted in the same picker.
A researcher wants a lower-cost model for a quick reformatting of a reference list.
/model
- A picker of models; the arrow keys adjust effort
Enter makes the choice your default; pressing s switches for this session only.
/effort Sets how hard the model reasons (low, medium, high, xhigh, or max) and turns ultracode on or off.
A teaching assistant is renaming 40 lecture PDFs to a fixed pattern, a job that needs no judgment.
/effort low
- Effort set to low, kept for later sessions
The max level applies to the current session only; the others are kept for later sessions.
/usage Shows how much of your plan's usage you have used, and your recent activity.
A student on a Pro plan wonders how much of the week's allowance a big literature task used.
/usage
- Bars for the current session and the week, with activity stats
/fast Turns fast mode on or off: Opus or Fable 5.2 up to 2.5 times faster, at a higher cost per token.
A faculty member is iterating quickly on wording with Claude and is waiting on every reply.
/fast on
- Fast mode ON
- A small ↯ icon appears next to the prompt, and replies come faster
On subscription plans it is billed to usage credits, and it works with Opus models and Fable 5.2 only. The first time you turn it on in a conversation, everything already in the conversation is billed at the fast rate, so it costs least at the start of a session.
/rate-limit-options Shows your options when a usage limit stops a request.
A student hits their plan's limit in the middle of a long study-guide task.
/rate-limit-options
- Options: wait and continue when the limit resets, add usage credits, or upgrade the plan
/usage-credits Sets up usage credits, or asks your administrator for them, when you hit a limit.
A staff member on the university's Team plan reaches the limit before an important deadline.
/usage-credits
- Billing settings open in the browser, or, without billing access, a request goes to your administrator
Making Things and Getting Tasks Done¶
/goal Sets an end state; Claude keeps working turn after turn until a check says it is met.
Every lecture PDF in a module folder needs a one-page summary beside it.
/goal every PDF in this folder has a one-page summary file next to it
- Claude works through the files without new prompts
After each turn, a model checks whether the goal is met; /goal clear stops it early.
/deep-research Runs a research workflow: searches the web widely, cross-checks sources, and writes a cited report.
A faculty member preparing a journal club wants an overview of recent evidence on early mobilization after hip fracture surgery.
/deep-research early mobilization after hip fracture surgery: outcomes since 2020
- Searches run in parallel; sources are fetched and cross-checked
- A cited report is written
/slides Makes a new Claude Slides deck from a brief.
A course director needs a first draft of an orientation deck for the new clinical skills block.
/slides orientation for the clinical skills block, 10 slides
- A Claude Slides deck is drafted from the brief, ready to edit
Needs a session where artifacts are available.
/design Drafts posters, one-pagers, or screen mockups on one canvas, as a Claude Design artifact.
A student society needs a poster for a blood drive.
/design a poster for the student blood drive on campus
- Artboards drafted on a canvas, which you edit in Claude Design
/dataviz Gives Claude design guidance for charts and dashboards, including colorblind-safe colors.
A researcher wants a clear chart of exam scores by cohort for a curriculum report.
/dataviz a chart of exam scores by cohort, 2022 to 2026
- Claude picks the chart form for the data, checks the colors for colorblind safety and contrast, and draws it
/claude-in-chrome Has Claude carry out a task in your browser through Claude in Chrome.
A staff member wants Claude to fill in a long online registration form from details in a document.
/claude-in-chrome fill in the conference registration form using details.txt
- Claude works in a visible Chrome window, pausing to ask you at a login page or a site you have not allowed
Available when Chrome integration is on for the session.
Folders, Skills, and Connections¶
/add-dir Gives Claude access to one more folder for this session.
While drafting practice questions for a lecture, Claude needs to check them against the lecture's slides in another folder.
/add-dir ../lecture-slides
- Folder suggestions appear as you type; Tab accepts one
/skills Lists the skills installed, and how much of the context each one uses.
A faculty member wants to know which skills Claude Code already has before adding any.
/skills
- A filterable list of skills; t sorts them by size
/mcp Shows the outside tools Claude is connected to, and repairs their sign-ins.
A researcher's reference-manager connection has stopped responding.
/mcp
- A list of connected servers and their status
/mcp reconnect all retries every connection that failed, without opening the list.
/plugin Opens the plugin menu, or installs, enables, or disables a plugin.
A faculty member wants a published plugin that bundles skills for grading rubrics.
/plugin
- The plugin menu: browse, install, enable, or disable
/import Brings settings over from Codex, Gemini CLI, or Cursor: instruction files, connections, commands, and skills.
A faculty member who used Codex last term moves to Claude Code and wants their AGENTS.md rules and connections to come along.
/import codex --dry-run
- A list of what would be brought over, without changing anything yet
Without --dry-run, it imports after you confirm.
/reload-skills Re-scans the skill folders, so a skill you just added works without restarting.
A faculty member has just saved a new skill for formatting exam items.
/reload-skills
- A report of how many skills are available, and how many were added or removed
Long Jobs and Other Devices¶
/background Sends the session to run in the background, freeing the terminal.
Claude is converting a semester of lecture recordings' transcripts into study notes, a long job.
/background
- The session keeps working in the background; the terminal is free
claude agents shows background sessions; /fork copies the conversation into a new one instead.
/tasks Shows and manages background work in this session, including helpers that have finished.
A faculty member wants to see whether the summary helpers Claude started have finished.
/tasks
- A list of background work and its status
/schedule Creates and manages cloud scheduled tasks, formerly called routines, which run in the cloud on a schedule (also /routines).
A staff member wants a weekly summary of new items in a shared policy folder every Monday morning.
/schedule
- Claude walks you through setting up the scheduled task in conversation
/loop Runs a prompt again and again while the session stays open.
During a long data export, a researcher wants Claude to check the progress every few minutes.
/loop 5m check the export folder and tell me how many files are done
- The prompt runs every five minutes until you stop it
Without an interval, Claude chooses the pace itself.
/desktop Moves the current session into the Claude Desktop app (also /app).
A faculty member started in the terminal but wants the desktop app's visual review of changes.
/desktop
- The session continues in Claude Desktop
Needs macOS or x64 Windows (not Windows on Arm) and a Claude subscription.
/mobile Shows a QR code for downloading the Claude phone app (also /ios, /android).
A student wants to check on long tasks from their phone.
/mobile
- A QR code to download the Claude app
Settings, Accessibility, and Help¶
/doctor Runs a checkup of the installation and proposes fixes it applies after you confirm.
Claude Code behaves oddly after an update on a faculty laptop.
/doctor
- A checkup of installation, settings, and CLAUDE.md problems
- Proposed fixes, each applied only after you confirm
/config Opens Settings (theme, model, output style, and more), or sets a value directly.
A faculty member wants Claude Code in a dark theme without opening any menus.
/config theme=dark
- The setting is changed directly; /config alone opens Settings
/theme Changes the color theme, including colorblind-friendly themes.
A student with red-green color blindness finds the default colors hard to tell apart.
/theme
- A list of themes: auto, light and dark variants, colorblind-accessible (daltonized) themes, and themes using your terminal's own colors
/voice Turns on voice dictation, so you can speak your prompts.
A faculty member would rather dictate long instructions than type them.
/voice hold
- Voice mode enabled (hold). Hold space to record. Dictation language: en (/config to change).
Needs a Claude.ai account; /voice tap records with one tap instead of holding.
/output-style Lists or switches the style of Claude's replies, such as Concise, Explanatory, or Learning.
A student wants Claude to explain its reasoning and leave small parts of a data-analysis script for them to write.
/output-style learning
- Replies now explain their choices and leave small pieces for you to write
Concise leads with the result; Explanatory adds short notes on the reasons behind each change.
/feedback Sends feedback to Anthropic, after a consent step; /bug opens the same dialog to report a bug or share your conversation.
A faculty member finds a confusing error message and wants to report it.
/feedback
- A feedback dialog, with a consent step before anything is sent
More Commands, Mostly for Developers¶
/advisor Turns on an advisor that consults a second model at key moments.
/agents Reminds you to ask Claude to create or manage helper agents (subagents).
/artifacts Lists your artifacts, to attach, open, or copy a link.
/auto-mode-setup Drafts the environment details auto mode uses, from your project.
/autocompact Sets how full the context gets before Claude compacts it automatically.
/autofix-pr Starts a cloud session that watches a pull request and pushes fixes.
/batch Splits a large change into many parallel parts, after you approve a plan.
/cd Moves the session to another folder, keeping the conversation.
/chrome Configures Claude in Chrome.
/code-review Reviews code changes for bugs (also /review; /ultrareview runs a deeper review in the cloud).
/color Sets the color of the prompt bar for the session.
/debug Turns on debug logging and troubleshoots from the log.
/fewer-permission-prompts Adds common read-only commands to the project's allow list.
/focus Shows only your prompt, a summary of tool use, and the final response.
/fork Copies the conversation into a new background session.
/hooks Shows your hook settings.
/ide Manages connections to code editors.
/install-github-app Installs the Claude GitHub app for a repository.
/install-slack-app Installs the Claude Slack app.
/keybindings Opens your keyboard shortcuts file.
/list-agents Lists the helpers and sessions Claude can message.
/logout Signs out of your Anthropic account.
/release-notes Shows what changed in each version.
/reload-plugins Reloads plugins without restarting.
/remote-control Makes this session controllable from claude.ai or the phone app (also /rc).
/remote-env Chooses the default cloud environment for cloud sessions.
/restart Restarts Claude Code to apply an installed update, then resumes this session (also /update); it needs a Pro, Max, or Ultra plan and a native install on macOS or Linux.
/run Launches and drives your app to see a change working.
/security-review Reviews a branch's changes for security problems.
/simplify Reviews changed code for clean-up and applies the fixes.
/skill-doctor Shows each skill's context cost and use.
/statusline Configures the status line.
/stop Stops the background session you are attached to.
/subtask Starts a background helper that inherits the conversation.
/team-onboarding Writes a team onboarding guide from your usage history.
/teleport Pulls a cloud session into the terminal (also /tp).
/terminal-setup Adds a Shift+Enter new-line shortcut in supported terminals.
/tui Switches between the standard and full-screen display.
/update-config Changes settings from a plain-language request.
/upgrade Opens the page for upgrading your plan.
/verify Builds and runs your app to confirm a change works.
/web-setup Connects GitHub for cloud sessions.
/workflows Opens the progress view for running workflows.
Anthropic's own complete references: Every Claude Code command, Interactive mode and keyboard shortcuts, Permission modes.
Shortcuts and Symbols¶
| Keys | What They Do |
|---|---|
| Shift+Tab | Cycle permission modes (Manual, Accept edits, Plan, and Auto or Bypass where available). |
| Esc | Stop Claude mid-turn; its work so far is kept. |
| Esc Esc | On an empty prompt, open the rewind menu. |
| Ctrl+G | Open your prompt, or a proposed plan, in your text editor. |
| Ctrl+R | Search your earlier prompts. |
| Ctrl+O | Show the detailed transcript of what Claude did. |
| Ctrl+B | Send a long-running command or helper to the background. |
| Ctrl+T | Show or hide Claude's to-do list. |
| Shift+Enter | Start a new line without sending. |
| ? | On an empty prompt, show the shortcut help. |
| Type | What It Does |
|---|---|
| @ | Mentions a file so it is added to the conversation, with path completion. |
| ! | At the start of a message, runs a shell command yourself and shows Claude the output. |
| ultrathink | In a prompt, asks for deeper reasoning on that one turn. |
| ultracode | In a prompt, runs that task as a planned multi-agent workflow; /effort ultracode turns it on for the session. |
More in This Section
Color key: Tool
- Tools & Prompts Section overview
- ChatGPT (OpenAI) Plans, models, Codex, and its commands
- Claude (Anthropic) Plans, models, Claude Code, and its commands
- Gemini (Google) Plans, models, Antigravity, and its commands
- Grok (xAI) Plans, models, Grok Build, and its commands
Browse Tools & Prompts21 pages
Find a Tool1 page
Use a Prompt2 pages
Work with Sources2 guides
Work with AgentsOptional, after the basics6 guides
Related Lesson in Learn
The Guides
- AI Agents What an agent is, and what it can do
- Choosing Your Interface Chat, work, or code
- Your First Agent Session Run one, once, on a safe folder
- Standing Setups: Assistants That Remember Assistants that remember your work
- Agent Skills Give an agent a playbook
- Always-On Agents: Study Help That Comes to You Reminders, practice, and a weekly check, sent to you
Run Models Locally2 guides
By Company4 company guides
Compare Models3 leaderboards
Color key: ToolPromptGuideLessonBenchmark