⌘ Cursor command deck
Cursor Command Cheatsheet and AI Coding Guide
Find the right shortcut, Agent command, context pattern, rule, or configuration path while the code is still fresh in your head.
Updated July 29, 2026 · Fast-moving features are marked “Check locally”.
01 / Pick the right surface
One goal, five ways to work
Choose the smallest Cursor surface that can finish the task clearly.Agent
Multi-step implementationSearches context, edits files, and can use tools. Review plans, commands, diffs, and tests.
Ask
Exploration and explanationKeeps the task conversational when you want understanding before edits.
Plan
Design before executionProduces an implementation route that can be refined before code changes.
Inline Edit
Focused local changeBest for a selected function, block, or small transformation in the active editor.
Cursor Tab
In-flow completionPredicts the next edit while you type and accepts changes incrementally.
02 / Search the command deck
Shortcuts, commands, paths, and concepts
Search descriptions, examples, categories, and keywords—then pin the cards you use most.03 / Give Agent a better brief
Prompt recipe builder
Turn a vague request into a scoped task with context, constraints, and a finish line.
A useful Agent prompt states the outcome, the relevant context, what must remain unchanged, and how completion will be checked.
04 / Make conventions reusable
Project rule builder
Create a scoped MDC rule you can save under.cursor/rules/.
Keep rules short, concrete, and narrowly scoped. Broad always-on rules consume attention in every eligible request.
05 / Put each file in the right place
Cursor path map
Project files travel with the repository; global files express personal defaults.Project rules.cursor/rules/*.mdc
Version-controlled instructions with explicit scope.
Legacy rule.cursorrules
Older single-file format; migrate when practical.
Project commands.cursor/commands/*.md
Reusable slash-command workflows.
Project MCP.cursor/mcp.json
Repository-specific MCP servers.
Global MCP~/.cursor/mcp.json
Personal MCP servers across repositories.
Project CLI policy.cursor/cli.json
Repository-level Agent CLI settings and permissions.
Global CLI policy~/.cursor/cli-config.json
Personal Agent CLI defaults and permissions.
Background environment.cursor/environment.json
Remote environment lifecycle configuration.
Context exclusions.cursorignore
Files excluded from common context discovery and indexing.
06 / Control context deliberately
Context decision ladder
Start narrow and expand only when the answer lacks evidence.- 1Selected code
A function, error, or small diff—best for Inline Edit and precise questions.
- 2
@FilesKnown implementation files, tests, or configuration needed to verify the task.
- 3
@FoldersA bounded feature area when several related files matter.
- 4Automatic search
Let Agent discover dependencies when you know the outcome but not the file map.
- 5Web or MCP
Use external information only when the task genuinely depends on it, and review what can leave the project.
07 / Follow a reliable route
Practical Cursor workflows
Each route keeps context, action, and verification visible.Understand unfamiliar code
Build a reliable mental model before changing anything.
- Select
Add the smallest relevant code region to Chat.
- Ask
Request structure and evidence, not a broad summary.
- Trace
Attach only the callers, configuration, or tests needed to verify the explanation.
- Plan
Switch to planning before a cross-file change when the mode is available.
Repair a failing test
Move from failure evidence to the smallest verified fix.
- Evidence
Attach the failing test and the narrow implementation area.
- Diagnose
Separate diagnosis from implementation.
- Edit
Use Inline Edit when the correction is contained.
- Verify
Make validation part of the task definition.
Create a project rule
Turn a durable team convention into scoped, reviewable instructions.
- Create
Use the Command Palette to create an MDC file.
- Scope
Attach the rule only where it is useful.
- Write
Prefer concrete instructions over vague style advice.
- Test
Mention the rule in a representative request and inspect the result.
Automate a read-only check
Get structured output while keeping permissions narrow.
- Policy
Allow only the reads and safe shell commands the check needs.
- Run
Use print mode with machine-readable output.
- Inspect
Confirm the check did not alter tracked files.
- Pin
Record the version when behavior must be reproducible.
08 / Before Agent acts
Keep powerful workflows reviewable
- Terminal commands: read generated commands before execution, especially installers, package scripts, and destructive operations.
- Print-mode automation: non-interactive CLI requests may edit files and use tools; define narrow permissions and inspect the diff.
- Background Agents: remote environments may have internet access and run commands automatically; minimize credentials and repository access.
- MCP servers: inspect the provider, tools, roots, authentication, and data boundary before enabling a server.
- Project instructions: review rules and custom commands like code because they shape future Agent behavior.
- Context privacy: exclude secrets and irrelevant generated data, then confirm ignored files are not required for the task.