Skip to content

Cursor 速查表

查资料用,不是教程。用法看 主教程,概念看 术语表

目录


决策表

该用哪个入口

场景为什么
补全当前行 / 下一处编辑Tab延迟低,不占 Agent 配额
改当前选区或当前函数Inline Edit Cmd+K上下文就是选区
只问不改Ask降低误改
跨文件实现、跑命令Agent有工具循环
需求糊、跨很多文件Plan先对齐再写
能复现、找不到根因Debug用运行时证据
PR 审查Bugbot看 diff,不是跑你的 app
人不在 / 要并行 / 隔离 VM 开 PRCloud Agents曾用名 Background Agents
终端交互或无头 CICLI agent二进制是 agent,不是 cursor
对着正在跑的 UI 点 / 画 / 说Design ModeAgents Window 浏览器;Cmd+Shift+D
托管 / 镜像 / 浏览仓库Origingit forge;二进制 origin
PR 安全门禁或定时扫描Security Agents/review-security;团队用量池
派审人 / 批低风险 PRPR Routing文件名必须是 APPROVAL_POLICY.md
同一 Agent 进自己的进程SDK@cursor/sdk / cursor-sdk / Bridge

该用 Rules / AGENTS.md / Skills / Commands / Hooks / MCP / Subagents

场景为什么
每次对话都要遵守的短约束Rules(Always 或 glob)进系统上下文
给人类和多种 Agent 看的说明书AGENTS.md无 frontmatter,跨工具
按需加载的多步工作流Skills不占常驻上下文
一天要用很多次的固定提示Commands/name显式触发
工具调用前后跑脚本 / 拦截Hooks不经过模型自觉
接外部系统MCP标准工具协议
要隔离上下文或并行Subagents独立窗口

该开新 Chat 还是继续

场景
换功能 / 换模块新 Chat
Agent 开始循环犯错新 Chat + @Chats
同一功能的下一轮迭代继续
调试它刚写的代码继续

功能矩阵

docs/zh/products/ai-coding/index.md 迁出的 Cursor 能力表。链接改到 2026-08 仍有效的官方页;旧路径若仍 301,以本表为准。描述按官方文档校正(尤其是 Bugbot)。

Feature描述官方文档
AGENTS.md纯 Markdown 项目指令,根目录或子目录Rules · AGENTS.md
Rules (.cursor/rules).mdc + glob / 智能 / 手动 / AlwaysRules
Commands.cursor/commands/*.md/ 触发Commands
SkillsSKILL.md 工作流包;可用 /migrate-to-skillsSkills
MCP外部工具 / 数据源MCP
HooksAgent / Tab / 工作区生命周期脚本Hooks
Sub-agents独立上下文的委派;内置 Explore / Bash / BrowserSubagents
BugbotPR 审查(bug / 安全 / 质量),可 Autofix(再拉 Cloud Agent)Bugbot
Cloud Agents隔离 VM 克隆仓库、开 PR;曾用名 Background AgentsCloud Agent
Cursor CLI终端 agent;无头 agent -pCLI · Installation
Design ModeAgents Window 浏览器里的视觉提示Design Mode
OriginCursor 的 git forge(early beta);Pro / Teams / EnterpriseOrigin
Security AgentsSecurity Reviewer(PR)+ Vulnerability Scanner(cron)Security Agents
PR Routing & Approval派审人;批低风险 PRApproval
TypeScript SDK@cursor/sdk;local 或 cloud 运行时TS · Python · Bridge
ModesAgent / Ask / Plan / Debug。Cmd+.;Plan 用 Shift+TabOverview · Plan · Debug
Tab多行补全、跨文件跳转、TS/Python auto-importTab
ChatAgent 对话;用 @ 附加上下文Prompting
Codebase Indexing向量索引;约 80% 完成后语义搜索可用Semantic search
@ Symbols@ 文件 / 文件夹 / 终端 / Chats / Git / BrowserPrompting
Notepad旧矩阵条目。2026-08 Prompting 页未列出独立 Notepad。待核实是否仍为独立功能mentions 旧路径
Docs Integration自定义文档进上下文(旧 mentions 页能力)Prompting
Privacy Mode开启后 Cursor 与模型提供方不用你的代码训练Privacy
Model SelectionCursor Models 池与第三方模型池Models & Pricing
IntegrationsGitHub / GitLab / Linear / Slack 等GitHub
Inline EditCmd+K 改选区Inline Edit
Reuse Existing Code旧矩阵条目。2026-08 主导航未见此页,待核实reuse-existing-code
Long-running Agents官方长文:长时 AgentBlog
Self-driving Codebases官方长文:更自主的仓库Blog

索引与忽略相关、矩阵未单独成行但天天用:

Feature描述官方文档
.cursorignore挡住索引、Tab、Agent、Inline Edit、@Ignore files
.cursorindexingignore只排除索引,AI 功能仍可读同上
Keyboard shortcuts全表Keyboard Shortcuts

术语速查索引

一行一个概念。超过一句话的解释只在 术语表

概念一句话详情
Rules注入上下文开头的持久指令Glossary
AGENTS.md无 metadata 的项目说明书Glossary
Skills按需加载的 SKILL.mdGlossary
Commands/ 触发的 Markdown 工作流Glossary
MCP连外部工具的协议Glossary
Hooks生命周期脚本Glossary
Subagents独立上下文的子代理Glossary
ModesAgent / Ask / Plan / DebugGlossary
Tab补全模型Glossary
BugbotPR 审查Glossary
CheckpointsAgent 大改前的快照Glossary
Codebase Index语义搜索用的向量索引Glossary
Privacy Mode代码不用于训练Glossary
Cloud Agents远程 VM 上的 Agent;曾用名 Background AgentsGlossary
CLI agent官方终端入口;无头用 -pGlossary
Design ModeAgents Window 浏览器里点 / 画 / 说Glossary
OriginCursor 的 git forge;先占用 codebase 名Glossary
Security AgentsPR 审查 + cron 扫描;团队池Glossary
PR Routing派审人;可能自动批Glossary
SDK@cursor/sdk / cursor-sdk 调同一 AgentGlossary

快捷键

摘自 官方 Keyboard Shortcuts。完整列表:Cmd+R 然后 Cmd+S(Windows / Linux:Ctrl+R 然后 Ctrl+S),或命令面板搜 Keyboard Shortcuts。可全部重映射。

通用

快捷键(macOS / Windows·Linux)作用
Cmd+I / Ctrl+I切换侧栏(未绑到模式时)
Cmd+L / Ctrl+L切换侧栏(未绑到模式时);选区送到新 Chat
Cmd+E / Ctrl+E切换 Agent 布局
Cmd+. / Ctrl+.模式菜单
Cmd+/ / Ctrl+/循环模型
Cmd+Shift+J / Ctrl+Shift+JCursor 设置
Cmd+Shift+Space / Ctrl+Shift+Space语音
Cmd+, / Ctrl+,通用设置
Cmd+Shift+P / Ctrl+Shift+P命令面板

Chat / Agent

快捷键作用
Enter默认 nudge;Agent 工作时入队(与 Overview 页「Enter 入队」一致)
Ctrl+Enter入队
Cmd+Enter / Ctrl+Enter(输入中)强制发送 / 立刻插入当前轮
Cmd+Shift+Backspace取消生成
Shift+Tab(在输入框)轮换 Agent 模式(含 Plan)
Cmd+N / Cmd+R新 Chat
Cmd+T新 Chat 标签
Cmd+[ / Cmd+]上 / 下一条 Chat
Esc取消输入焦点

Inline Edit / Tab / 终端

快捷键作用
Cmd+K / Ctrl+K打开 Inline Edit
Opt+Enter / Alt+EnterInline Edit 里 Quick Question
Tab接受 Tab 建议
Cmd+→ / Ctrl+→按词接受
终端里 Cmd+K终端提示条

旧 stub 把 Cmd+Shift+K 写成 Inline Chat、把 Cmd+L 只写成「打开 AI Chat」。以本表和官方页为准。


配置速查

文件放哪

用途项目(可进 git)用户
Rules.cursor/rules/*.mdcCustomize → Rules
AGENTS.md仓库根或子目录 AGENTS.md
Commands.cursor/commands/*.md~/.cursor/commands/
Skills.cursor/skills/<name>/SKILL.md.agents/skills/~/.cursor/skills/~/.agents/skills/
Subagents.cursor/agents/~/.cursor/agents/
MCP.cursor/mcp.jsonCustomize / 用户 MCP
Hooks.cursor/hooks.json~/.cursor/hooks.json
Bugbot 项目说明.cursor/BUGBOT.mdDashboard Team rules
忽略.cursorignore.cursorindexingignore用户设置里的全局 ignore
计划(保存到工作区后).cursor/plans/默认在用户主目录
Cloud 环境.cursor/environment.jsonDashboard Environments / Secrets
CLI 配置.cursor/cli.json~/.cursor/cli-config.json

兼容:Skills / Subagents 也会扫 .claude/.codex/ 对应目录。同名时 .cursor/ 优先。

Rules frontmatter

alwaysApplydescriptionglobs行为
true每次都进。忽略 glob 和 description
false匹配文件在上下文里时自动附上
falseAgent 按 description 决定
false只有 @规则名

优先级:Team → Project → User。全部合并,冲突时更早的源优先。

忽略文件

.cursorignore 用 gitignore 语法。挡住:语义搜索、Tab / Agent / Inline Edit 可读的代码、@ 引用。

官方提醒:终端和 MCP 不受 .cursorignore 限制。忽略不是密码学保证。

gitignore
.env
.env.*
**/*.pem
**/secrets.json
dist/

只想缩小索引、仍允许 Agent 打开文件:用 .cursorindexingignore

MCP 字段(stdio)

官方表:

字段必需含义
type"stdio"
command可执行文件,需在 PATH 或写绝对路径
args参数数组
env环境变量
envFile再加载的 env 文件

插值:${env:NAME}${userHome}${workspaceFolder}${workspaceFolderBasename}${pathSeparator} / ${/}

远程:url + 可选 authCLIENT_ID / CLIENT_SECRET / scopes)。桌面回调 http://localhost:8787/callback;Web / Cloud Agents 回调 https://www.cursor.com/agents/mcp/oauth/callback

Hooks

配置层优先级:Enterprise → Team → Project → User。全部匹配的钩子都跑,冲突按更高层合并。

Agent 钩子(Cmd+K / Agent Chat):sessionStart / sessionEndpreToolUse / postToolUse / postToolUseFailuresubagentStart / subagentStopbeforeShellExecution / afterShellExecutionbeforeMCPExecution / afterMCPExecutionbeforeReadFile / afterFileEditbeforeSubmitPromptpreCompactstopafterAgentResponse / afterAgentThought

Tab:beforeTabFileRead / afterTabFileEdit

应用:workspaceOpen

退出码:0 成功;2 拦截(等同 permission: "deny");其他默认 fail-open。安全关键钩子设 failClosed: true

Cloud Agent:只跑仓库里的 command-based hooks;不跑用户级 hooks、不跑 prompt-based hooks。

Skills frontmatter

字段必需含义
name小写 + 数字 + 连字符,必须等于父目录名
descriptionAgent 用来判断是否相关
pathsglob,限制何时露出
disable-model-invocationtrue 时只有 /name 才加载
metadata任意键值

发现路径见上表。也兼容 .claude/skills/.codex/skills/

CLI agent

来源:InstallationOverviewHeadlessUsing

命令作用
curl https://cursor.com/install -fsS | bashmacOS / Linux / WSL 安装
irm 'https://cursor.com/install?win32=true' | iexWindows PowerShell 安装
agent --version验证
agent / agent "…"交互
agent --mode=ask只读
agent --mode=plan / --planPlan
agent -p "…"无头;默认不落盘
agent -p --force "…"无头并写文件(--yolo 同义)
会话里 & …交给 Cloud Agent
agent ls / agent resume / agent --continue恢复会话
agent update手动更新
agent --worktree "…"在独立 git worktree 里改

脚本鉴权:CURSOR_API_KEY。配置路径:全局 ~/.cursor/cli-config.json,项目 .cursor/cli.json(官方 Configuration)。

模型与套餐(摘要)

细节和单元格价格以 Models & Pricing 为准(页面是动态表)。

  • 两个用量池: Cursor Models(Grok 4.6 / 4.5、Composer 2.5)和 Other Models(第三方,按 API 价)
  • 个人档(官方表,税前除非注明):Start(仅印度,₹649/月)、Pro $20、Pro Plus $60、Ultra $200
  • Bugbot、Cloud Agents:Pro 及以上(Start 不含 Bugbot)
  • Teams:Standard $40 / 人 / 月,Premium $120 / 人 / 月

常见错误

症状原因处理
.cursor/rules/foo.md 不生效规则系统忽略无 frontmatter 的 .md改成 .mdc 或改用 AGENTS.md
Always 规则把上下文撑满规则太长 / 太多拆开,单条 < 500 行;能 glob 就不要 Always
@ 不到某文件.cursorignore / .gitignore查 ignore;官方建议 git check-ignore -v
语义搜索空索引未到 80%Settings → Indexing;检查网络
Plan 仍在写代码社区有报告Stop → Restore → 计划里写死「未批准不改文件」
Bugbot check 绿了但还有评论默认 neutral看评论;要挡合并需 fail-on-unresolved
Autofix 不可用无 on-demand 或 Legacy Privacy Mode官方 Requirements
Cloud 上 hook 不跑写在 ~/.cursor/hooks.jsontype: prompt改成仓库 .cursor/hooks.json 的 command hook
agent: command not found~/.local/bin 不在 PATH官方 Installation 的 PATH 步骤
agent -p 没改文件无头默认只提出改动--force / --yolo
Cloud 任务起不来没接仓库或不是付费计划管理员接 SCM;官方 Troubleshooting
MCP 连不上command 不在 PATH / 缺 envCustomize 里看服务器日志;用插值不要写死密钥
Tab 乱补 markdown该扩展名未禁用状态栏按扩展名 Disable

模板

项目 AGENTS.md

markdown
# Agent notes

- 包管理器:pnpm。禁止 npm / yarn。
- 检查:`pnpm typecheck``pnpm test`
- 规范组件:`src/components/Button.tsx`

hooks.json(官方 blog 的 stop 循环骨架)

json
{
  "version": 1,
  "hooks": {
    "stop": [
      {
        "command": "bun run .cursor/hooks/grind.ts"
      }
    ]
  }
}

grind.tsstdin 读 JSON,向 stdout 写 JSON。官方 blog 字段:conversation_idstatuscompleted | aborted | error)、loop_count。未完成时返回 { "followup_message": "..." } 让 Agent 继续。默认 loop_limit 为 5。

.cursor/BUGBOT.md

markdown
# Bugbot

- 金额用整数分。
- 不要把文案问题报成 bug,除非改变控制流。

高质量信息源

写入门槛:打开链接确认存在。整理方法见仓库 sources/_template.md

最后一次系统性核实:2026-08-18。

官方文档

中文镜像:同一路径加 /cn/,例如 cn/docs/rules

官方 Cookbook / 示例 / 其他官方资源

  • Best practices for coding with agents — 官方怎么用 Plan / Rules / Skills / TDD / Bugbot / 并行
    • 建议访问方式:web-reader
    • 最后核实:2026-08-18
  • Long-running agentsSelf-driving codebases — 官方产品长文
    • 建议访问方式:web-reader
    • 最后核实:2026-08-18
  • 未发现类似 anthropics/claude-cookbooks 的官方「Cursor Cookbook」仓库。场景示例分散在 docs + blog。

官方 / 核心团队社交账号

  • @cursor_ai — 产品账号。身份:cursor.com 页脚「X」链到此号;发版公告也走这里
    • 层级:产品账号
    • 建议访问方式:Grok CLI / 人工浏览
    • 最后核实:2026-08-18

核心维护者 / 团队 Blog

  • cursor.com/blog — 产品与工程
    • 建议访问方式:web-reader
    • 最后核实:2026-08-18

GitHub 高质量仓库

  • Cursor IDE 没有官方完整源码仓库。不要把第三方 mirror 标成官方。
  • GLips/Figma-Context-MCP — 社区 Figma MCP,旧教程已引用;用前读该仓库当前 README
    • 建议访问方式:zread / 浏览器
    • 最后核实:2026-08-18(仓库存在;安装命令以 README 为准)

Awesome List / 资源聚合

  • cursor.directory — 社区规则 / MCP 聚合,不是 Anysphere 官方
    • 建议访问方式:浏览器
    • 最后核实:2026-08-18

三方高质量 Blog / 社区

待核实

  • Notepad 是否仍为独立产品功能(旧矩阵链 /docs/context/mentions
  • https://cursor.com/docs/reuse-existing-code 是否还活着
  • 创始人 / 核心工程师 X 账号的官方背书链接
  • @modelcontextprotocol/server-filesystem 是否仍是官方推荐的示例包名(Cookbook 里的 JSON 只演示字段,不锁定包)

为前端工程师打造 · 基于 VitePress 构建