Cursor Commands & Prompt Reference
37 commands & parameters · 2 categories · Source: Cursor Docs — CLI slash commands & Prompting agents
Cursor's agent takes typed commands in two places: the cursor-agent CLI, where slash commands control modes, sessions, and the environment, and the chat input, where @ mentions attach files, folders, terminals, diffs, and past conversations as context. This page covers both surfaces from the official Cursor documentation. Editor keyboard shortcuts stay on our Cursor shortcuts page.
The CLI slash set is small but dense: /plan, /ask, and /debug switch working modes, /summarize compresses context, and /fork branches a conversation you want to explore without losing the original. On the chat side, precise @ mentions beat pasting code: @Commit attaches your uncommitted diff and @Branch your whole branch diff, which is usually what a review or bug-hunt prompt actually needs.
Also see: Cursor keyboard shortcuts.
All Commands
CLI Slash Commands (29)
| Command / Syntax | What it does | Notes |
|---|---|---|
| /model [filter] | Select a model. Press Tab to edit | Type it at the start of the cursor-agent CLI prompt. |
| /run-everything [on|off|status] | Toggle Run Everything or show its status | Also: /auto-run. Type it at the start of the cursor-agent CLI prompt. |
| /plan [prompt] | Switch to Plan mode, show the current plan, or submit a prompt in Plan mode | Type it at the start of the cursor-agent CLI prompt. |
| /ask | Toggle Ask mode for read-only questions | Type it at the start of the cursor-agent CLI prompt. |
| /debug [prompt] | Toggle Debug mode or submit a prompt in Debug mode | Type it at the start of the cursor-agent CLI prompt. |
| /goal [objective] | Give the agent a long-lived objective to work towards until it's fully complete. Rolling out | Type it at the start of the cursor-agent CLI prompt. |
| /logs | Show the debug log path and copy it to the clipboard | Type it at the start of the cursor-agent CLI prompt. |
| /update | Update Cursor Agent to the latest version | Type it at the start of the cursor-agent CLI prompt. |
| /max-mode | Toggle Max Mode on legacy request-based plans | Type it at the start of the cursor-agent CLI prompt. |
| /rename <name> | Rename the current chat session | Type it at the start of the cursor-agent CLI prompt. |
| /clear | Start a new chat session | Also: /new, /new-chat, /newchat. Type it at the start of the cursor-agent CLI prompt. |
| /resume | Open recent chats and resume one | Type it at the start of the cursor-agent CLI prompt. |
| /fork | Fork the current chat into a new session | Type it at the start of the cursor-agent CLI prompt. |
| /summarize | Summarize the conversation to reduce context | Also: /compress. Type it at the start of the cursor-agent CLI prompt. |
| /rewind | Jump back to a previous message | Type it at the start of the cursor-agent CLI prompt. |
| /vim | Toggle Vim keys | Type it at the start of the cursor-agent CLI prompt. |
| /line-numbers | Toggle line numbers in code blocks | Type it at the start of the cursor-agent CLI prompt. |
| /show-thinking | Toggle thinking block display | Type it at the start of the cursor-agent CLI prompt. |
| /status-indicators | Toggle terminal title status indicators | Type it at the start of the cursor-agent CLI prompt. |
| /shell [command] | Enter Shell Mode | Also: /sh, /run. Type it at the start of the cursor-agent CLI prompt. |
| /about | Show CLI version, system, and account info. Also copies it to the clipboard | Type it at the start of the cursor-agent CLI prompt. |
| /setup-terminal | Configure terminal newline keybindings. See Terminal setup | Type it at the start of the cursor-agent CLI prompt. |
| /help [command] | Show help. Use | Type it at the start of the cursor-agent CLI prompt. |
| /help <command> | for command details | Type it at the start of the cursor-agent CLI prompt. |
| /feedback <message> | Share feedback with the team | Type it at the start of the cursor-agent CLI prompt. |
| /open | Open the repository's Git root in Cursor | Also: /cursor. Type it at the start of the cursor-agent CLI prompt. |
| /copy-request-id | Copy the last request ID to the clipboard | Type it at the start of the cursor-agent CLI prompt. |
| /copy-conversation-id | Copy the current conversation ID to the clipboard | Type it at the start of the cursor-agent CLI prompt. |
| /logout | Sign out from Cursor | Type it at the start of the cursor-agent CLI prompt. |
@ Mentions & Prompt Input (8)
| Command / Syntax | What it does | Notes |
|---|---|---|
| @<file> | Attach a specific file to your prompt | Example: @auth.ts. Start typing after @ for suggestions. |
| @<folder>/ | Attach a folder; type / after selecting to navigate deeper | Example: @src/components/. |
| @Terminals | Include terminal output as context | Attaches recent terminal content to the prompt. |
| @Chats | Reference context from a previous conversation | Pulls a past chat into the current prompt. |
| @Commit | Attach the diff of your uncommitted working state | Listed as Commit (Diff of Working State). |
| @Branch | Attach the full diff of your branch against main | Listed as Branch (Diff with Main). |
| @Browser | Attach context from the built-in browser | Bring page state into the conversation. |
| /<skill> | Invoke a skill from the chat input | Press Enter to attach it to one message; use Custom Modes to keep it active. |
Recipes
Our own notes on combining the commands above. Every token used here appears in the reference tables on this page.
Review your whole branch instead of pasting files
@Branch + /ask
@Branch attaches the full diff of your branch against main, which is almost always the context a review question actually needs. /ask keeps the agent in question-answering mode so it explains rather than starts editing.
Check uncommitted work before you commit it
@Commit + a review prompt
@Commit attaches the diff of your working state. This catches the debug statement or stray console.log that a file-by-file read tends to miss, because you are looking at exactly what would land.
Debug from what the terminal actually printed
@Terminals + /debug [prompt]
@Terminals brings recent terminal output into context, and /debug puts the agent in a diagnostic posture. Together they replace the usual cycle of reading an error, retyping it, and hoping you transcribed it correctly.
See the plan before any file is touched
/plan [prompt] → review → /run-everything on
/plan produces an approach without executing it. Once the plan looks right, /run-everything on lets the agent proceed without stopping for per-command approval. Reversing that order is how unattended agents make surprising edits.
Shrink a long conversation without losing the thread
/summarize (not /clear)
/summarize compresses the conversation while keeping continuity; /clear starts over. When a session has useful history but is getting slow, summarize is the one you want. /rewind is the third option when you specifically need to undo recent turns.
Keep a skill active for a whole task
/<skill> + Alt+Enter (Option+Enter on Mac)
Selecting a skill with Enter attaches it to one message only. Alt+Enter, or choosing Use as Mode, keeps it in context every turn until you exit, which is what you want for a task with many steps.
Frequently Asked Questions
Do these slash commands work in the Cursor editor chat?
The slash commands on this page are for the cursor-agent CLI. In the editor chat, / invokes skills, and the @ mentions listed here attach context in both places where applicable.
What does @Commit attach compared with @Branch?
@Commit attaches the diff of your uncommitted working state. @Branch attaches the full diff of your branch against main - useful for review-style prompts.
How do I keep a skill active across a whole session?
Invoke it from the / menu with Alt+Enter (Option+Enter on Mac) or choose Use as Mode. The skill then stays in context every turn until you exit the mode.
Every entry on this page is a literal, typeable token taken from the official documentation linked above. Command sets in AI tools change quickly - the in-product command menu is always authoritative for your installed version.