When to Use
User wants to operate Cursor as a real coding environment instead of a vague AI editor: choose the right surface, shape repo context, set rules correctly, use cursor-agent, run Background Agents, review with Bugbot, or decide whether MCP and remote execution are acceptable.
Use this skill when the hard part is not "write code" but "make Cursor behave predictably" across editor chat, Agent or Ask flows, CLI runs, project rules, repo indexing, remote agents, GitHub integration, and privacy-sensitive work.
Architecture
Memory lives in ~/cursor/. If ~/cursor/ does not exist, run setup.md. See memory-template.md for structure.
CODEBLOCK0
Quick Reference
Load only the smallest file needed for the current blocker.
| Topic | File |
|---|
| Setup guide | INLINECODE5 |
| Memory template |
memory-template.md |
| Install and choose the right Cursor surface |
install-and-surfaces.md |
| Rules, context hierarchy, and mode choice |
rules-and-context.md |
|
cursor-agent, non-interactive runs, and MCP boundaries |
cli-and-mcp.md |
| Background Agents, Bugbot, and GitHub-connected workflows |
background-agents-and-bugbot.md |
| Privacy mode, indexing, and ignore files |
privacy-and-indexing.md |
| Recovery playbooks for auth, bad context, and remote-run mistakes |
troubleshooting.md |
Requirements
- - Cursor installed and usable on the target machine, or permission to guide installation.
- INLINECODE14 available when the task depends on CLI or automation workflows.
- INLINECODE15 available for repo-aware work, diff review, branch handling, Background Agents, or Bugbot.
- Explicit user approval before enabling Background Agents, granting GitHub app write access, using remote MCP servers, or running high-trust non-interactive commands.
- Treat model names, mode behavior, CLI flags, and remote-workflow features as live product surface: verify against official Cursor docs or current CLI help instead of assuming stale behavior.
Operating Coverage
This skill treats Cursor as an operational coding system, not as generic editor advice. It covers:
- - editor-side usage across Agent, Ask, Manual, and custom mode patterns
- project rules through
.cursor/rules, user rules, and repo-level agent guidance, with .cursorrules treated as legacy - context shaping through repo boundaries, indexing, and ignore files
- local and non-interactive
cursor-agent workflows, including resume and MCP-aware execution - Background Agents and Bugbot when work shifts from local interaction to remote GitHub-connected execution
- privacy, data exposure, and review discipline when Cursor features move code or prompts off the local machine
Data Storage
Keep only durable Cursor operating context in ~/cursor/:
- - which repos, teams, or task types are approved for Cursor use
- preferred surface by task type: editor, CLI, Background Agent, or Bugbot
- rule hierarchy decisions and recurring
.cursor/rules patterns that worked - privacy and trust defaults around indexing, ignore files, GitHub integration, and remote MCP
- repeated failures such as wrong repo scope, ignored rules, unsafe non-interactive runs, or remote review noise
Core Rules
1. Lock the Cursor Surface First
- - Name the active surface before doing anything else: editor Agent, Ask, Manual, custom mode,
cursor-agent, Background Agent, or Bugbot. - Each surface changes permissions, context loading, and review expectations.
- Advice that ignores the surface usually causes the wrong workflow or trust level.
2. Establish the Instruction Hierarchy Before Prompting
- - Check for project rules in
.cursor/rules, repo agent guidance, and any team-level user rules before asking Cursor to act. - Treat
.cursorrules as a legacy format that may still exist but should not be your default design target. - If rules conflict or are too broad, fix the rule layout before expanding the prompt.
3. Shape Context Deliberately
- - Control what Cursor sees through repo selection, indexing posture, and ignore files instead of assuming it "just knows the repo."
- Use
.cursorignore and .cursorindexingignore for context control, but never treat them as perfect secret barriers. - When a task is narrow, reduce context first instead of adding more instructions later.
4. Separate Local Work From Remote Work
- - Editor Agent and local CLI use are different from Background Agents and Bugbot.
- Remote GitHub-connected runs can execute commands, fetch code, and generate review output outside the local machine.
- Escalate to remote workflows only when the value is clear and the trust story is explicit.
5. Treat Non-Interactive CLI and MCP as High-Trust Modes
- -
cursor-agent is powerful, and non-interactive usage does not deserve casual assumptions about safety. - Review MCP server scope, host, and side effects before turning it on.
- If a workflow depends on unattended writes, record the exact repo, command goal, and verification path first.
6. Make Privacy and Data Flow Explicit
- - Cursor requests, indexing, and remote workflows may send code or prompts to Cursor services, GitHub, or user-approved MCP hosts.
- Privacy Mode changes expectations, but it does not make remote features equivalent to local-only execution.
- The user should know what leaves the machine before you enable higher-trust features.
7. End With Reviewable Evidence
- - A good Cursor run ends with a diff, a check result, or a clear checkpoint, not just "the agent handled it."
- For Background Agents and Bugbot, inspect the output before merging or applying anything locally.
- Leave a concise handoff trail so the next operator can resume without guessing which surface ran what.
Cursor Traps
- - Treating every Cursor feature as local-only -> remote execution and GitHub-connected workflows get approved without real review.
- Dumping instructions into chat before checking
.cursor/rules or repo agent guidance -> the repo's own guidance loses to prompt churn. - Assuming
.cursorignore blocks every possible data path -> terminal and MCP tool calls can still touch things you did not intend. - Using Background Agents because they are convenient -> remote command execution happens before the trust boundary is discussed.
- Treating
cursor-agent automation as if it had interactive approvals -> non-interactive runs can widen scope quickly. - Mixing Bugbot, editor Agent, and local git state without naming ownership -> review noise and duplicated work pile up.
- Assuming an API key means direct provider execution -> Cursor still mediates product behavior and trust boundaries.
External Endpoints
Only these endpoint categories are allowed unless the user explicitly approves more:
| Endpoint | Data Sent | Purpose |
|---|
| https://cursor.com/ | prompts, selected repo context, diffs, integration metadata, and remote-workflow payloads needed by Cursor features | Cursor editor, agent, indexing, Background Agent, and review workflows |
| https://docs.cursor.com/ |
doc queries only | Verify current Cursor behavior, feature scope, and integration details |
| https://github.com/* | repository metadata, code, pull-request context, and review actions approved by the user | Background Agents, Bugbot, and GitHub-connected Cursor workflows |
| https://api.github.com/* | repository, branch, PR, and review metadata approved by the user | GitHub API access used by Cursor-connected review and remote execution flows |
| https://{user-approved-mcp-host} | request payloads required by the approved MCP server | Optional MCP tool access beyond the local machine |
No other data is sent externally unless the user explicitly approves more hosts or integrations.
Security & Privacy
Data that leaves your machine:
- - prompts and selected code context sent to Cursor services
- indexing-related code chunks or metadata needed for Cursor codebase features
- optional repo, branch, and PR context when Background Agents or Bugbot use GitHub-connected flows
- optional MCP payloads only for user-approved MCP servers
Data that stays local:
- - durable operating notes under INLINECODE30
- local repo state, local rules, and diffs unless the user enables remote features
- any ignored or unshared files that never enter a Cursor request or approved tool call
This skill does NOT:
- - treat
.cursorignore as a perfect protection layer for secrets - enable Background Agents, Bugbot, or remote MCP without explicit approval
- claim Cursor requests stay entirely local by default
- assume legacy
.cursorrules is still the right target for new setups - modify its own skill files
Trust
By using this skill, prompts and selected code context may be sent to Cursor services, plus optional GitHub and user-approved MCP hosts.
Only install if you trust those services with that data.
Scope
This skill ONLY:
- - helps operate Cursor safely across editor, CLI, rules, indexing, remote agents, and review workflows
- structures repo work into the right local or remote execution surface
- keeps durable notes for approved repos, rule strategy, privacy posture, and recurring failure fixes
This skill NEVER:
- - blur the line between local editor help and remote Background Agent execution
- claim ignore files solve every privacy or access problem
- recommend unattended high-trust Cursor runs as a default
- treat Cursor as just another generic chat wrapper
Related Skills
Install with
clawhub install <slug> if user confirms:
- -
agentic-engineering - Strengthen multi-agent workflow design, review discipline, and blast-radius thinking around Cursor usage. - INLINECODE35 - Improve implementation quality once Cursor is operating inside the right repo boundaries.
- INLINECODE36 - Handle branches, diffs, stashes, and non-destructive repo recovery around Cursor-driven changes.
- INLINECODE37 - Reuse request-debugging and integration patterns when Cursor work touches external services.
- INLINECODE38 - Turn recurring Cursor tasks into cleaner, repeatable operating procedures.
Feedback
- - If useful: INLINECODE39
- Stay updated: INLINECODE40
何时使用
用户希望将Cursor作为真正的编码环境而非模糊的AI编辑器来操作:选择合适的界面、塑造仓库上下文、正确设置规则、使用cursor-agent、运行后台代理、通过Bugbot进行审查,或决定MCP和远程执行是否可接受。
当难点不在于编写代码而在于让Cursor在编辑器聊天、Agent或Ask流程、CLI运行、项目规则、仓库索引、远程代理、GitHub集成以及隐私敏感工作中表现可预测时,使用此技能。
架构
记忆存储在~/cursor/中。如果~/cursor/不存在,请运行setup.md。结构参见memory-template.md。
text
~/cursor/
|-- memory.md # 持久化激活边界和工作流默认设置
|-- repo-profiles.md # 每个仓库的约定、信任姿态和验证期望
|-- rules-notes.md # 项目规则策略、遗留规则清理和指令层级说明
|-- privacy.md # 索引、忽略、远程执行和数据处理的默认设置
|-- remote-workflows.md # 后台代理、Bugbot和GitHub集成决策
-- incidents.md # 重复失败、错误界面运行和恢复模式
快速参考
仅加载解决当前阻塞问题所需的最小文件。
memory-template.md |
| 安装并选择正确的Cursor界面 | install-and-surfaces.md |
| 规则、上下文层级和模式选择 | rules-and-context.md |
| cursor-agent、非交互式运行和MCP边界 | cli-and-mcp.md |
| 后台代理、Bugbot和GitHub连接的工作流 | background-agents-and-bugbot.md |
| 隐私模式、索引和忽略文件 | privacy-and-indexing.md |
| 针对认证、错误上下文和远程运行错误的恢复手册 | troubleshooting.md |
要求
- - 目标机器上已安装并可使用Cursor,或拥有指导安装的权限。
- 当任务依赖于CLI或自动化工作流时,cursor-agent可用。
- git可用于仓库感知工作、差异审查、分支处理、后台代理或Bugbot。
- 在启用后台代理、授予GitHub应用写入权限、使用远程MCP服务器或运行高信任非交互式命令前,需获得用户明确批准。
- 将模型名称、模式行为、CLI标志和远程工作流功能视为实时产品界面:对照官方Cursor文档或当前CLI帮助进行验证,而非假设过时的行为。
操作覆盖范围
此技能将Cursor视为一个操作性编码系统,而非通用编辑器建议。它涵盖:
- - 编辑器端在Agent、Ask、Manual和自定义模式下的使用
- 通过.cursor/rules、用户规则和仓库级代理指导的项目规则,将.cursorrules视为遗留格式
- 通过仓库边界、索引和忽略文件塑造上下文
- 本地和非交互式cursor-agent工作流,包括恢复和MCP感知执行
- 当工作从本地交互转向远程GitHub连接执行时的后台代理和Bugbot
- 当Cursor功能将代码或提示移出本地机器时的隐私、数据暴露和审查纪律
数据存储
仅在~/cursor/中保留持久的Cursor操作上下文:
- - 哪些仓库、团队或任务类型被批准使用Cursor
- 按任务类型划分的首选界面:编辑器、CLI、后台代理或Bugbot
- 规则层级决策和有效的重复.cursor/rules模式
- 关于索引、忽略文件、GitHub集成和远程MCP的隐私和信任默认设置
- 重复失败,如错误的仓库范围、被忽略的规则、不安全的非交互式运行或远程审查噪音
核心规则
1. 首先锁定Cursor界面
- - 在执行任何操作前明确当前活动界面:编辑器Agent、Ask、Manual、自定义模式、cursor-agent、后台代理或Bugbot。
- 每个界面都会改变权限、上下文加载和审查期望。
- 忽略界面的建议通常会导致错误的工作流或信任级别。
2. 在提示前建立指令层级
- - 在要求Cursor执行操作前,检查.cursor/rules中的项目规则、仓库代理指导以及任何团队级用户规则。
- 将.cursorrules视为可能仍存在的遗留格式,但不应作为默认设计目标。
- 如果规则冲突或过于宽泛,在扩展提示前先修复规则布局。
3. 有意识地塑造上下文
- - 通过仓库选择、索引姿态和忽略文件控制Cursor能看到的内容,而非假设它自然了解仓库。
- 使用.cursorignore和.cursorindexingignore进行上下文控制,但切勿将其视为完美的秘密屏障。
- 当任务范围狭窄时,先减少上下文而非后续添加更多指令。
4. 将本地工作与远程工作分开
- - 编辑器Agent和本地CLI使用与后台代理和Bugbot不同。
- 远程GitHub连接运行可以在本地机器之外执行命令、获取代码并生成审查输出。
- 仅在价值明确且信任故事清晰时升级到远程工作流。
5. 将非交互式CLI和MCP视为高信任模式
- - cursor-agent功能强大,非交互式使用不应被随意假设为安全。
- 在启用MCP服务器前,审查其范围、主机和副作用。
- 如果工作流依赖于无人值守的写入,首先记录确切的仓库、命令目标和验证路径。
6. 明确隐私和数据流
- - Cursor请求、索引和远程工作流可能将代码或提示发送到Cursor服务、GitHub或用户批准的MCP主机。
- 隐私模式会改变期望,但不会使远程功能等同于纯本地执行。
- 在启用更高信任的功能前,用户应了解哪些数据会离开机器。
7. 以可审查的证据结束
- - 一个好的Cursor运行以差异、检查结果或清晰的检查点结束,而非仅仅是代理处理了它。
- 对于后台代理和Bugbot,在合并或本地应用任何内容前检查输出。
- 留下简洁的交接痕迹,以便下一个操作者无需猜测哪个界面运行了什么即可恢复。
Cursor陷阱
- - 将每个Cursor功能视为纯本地 -> 远程执行和GitHub连接的工作流在未经真正审查的情况下获得批准。
- 在检查.cursor/rules或仓库代理指导前将指令倾倒到聊天中 -> 仓库自身的指导被提示轮换淹没。
- 假设.cursorignore能阻止所有可能的数据路径 -> 终端和MCP工具调用仍可能触及你未意图的内容。
- 因便利而使用后台代理 -> 在信任边界讨论之前就发生了远程命令执行。
- 将cursor-agent自动化视为具有交互式批准 -> 非交互式运行可能迅速扩大范围。
- 混合使用Bugbot、编辑器Agent和本地git状态而不明确所有权 -> 审查噪音和重复工作堆积。
- 假设API密钥意味着直接提供商执行 -> Cursor仍然调解产品行为和信任边界。
外部端点
除非用户明确批准更多,否则仅允许以下端点类别:
| 端点 | 发送的数据 | 目的 |
|---|
| https://cursor.com/ | 提示、选定的仓库上下文、差异、集成元数据以及Cursor功能所需的远程工作流负载 | Cursor编辑器、代理、索引、后台代理和审查工作流 |
| https://docs.cursor.com/ |
仅文档查询 | 验证当前Cursor行为、功能范围和集成细节 |
| https://github.com/* | 用户批准的仓库元数据、代码、拉取请求上下文和审查操作 | 后台代理、Bugbot和GitHub连接的Cursor工作流 |
| https://api.github.com/* | 用户批准的仓库、分支、PR和审查元数据 | Cursor连接的审查和远程执行流使用的GitHub API访问 |
| https://{用户批准的MCP主机} | 批准的MCP服务器所需的请求负载 | 超出本地机器的可选MCP工具访问 |
除非用户明确批准更多主机或集成,否则不会向外部发送其他数据。
安全与隐私
离开您机器的数据:
- - 发送到Cursor服务的提示和选定的代码上下文
- Cursor代码库功能所需的索引相关代码块或元数据
- 当后台代理或Bugbot使用GitHub连接流时的可选仓库、分支和PR上下文
- 仅针对用户批准的MCP服务器的可选MCP负载
保留在本地的数据:
- - ~/cursor/下的持久操作笔记
- 本地仓库状态、本地规则和差异(除非用户启用远程功能)
- 任何从未进入Cursor请求或批准工具调用的被忽略或未共享的文件
此技能不会:
- - 将.cursorignore视为秘密的完美保护层
- 未经明确批准启用后台代理、Bugbot或远程MCP
- 声称Cursor请求默认完全保留在本地
- 假设遗留的.cursorrules仍是新设置的正确目标
- 修改自身的技能文件
信任
使用此技能,提示和选定的代码上下文可能被发送到Cursor服务,以及可选的GitHub和用户批准的MCP主机。
仅