开始上手
安装
- 前往 Cursor 集成
- 点击 Slack 旁的 Connect,或从这里进入安装页面
- 系统会提示你在工作区安装用于 Slack 的 Cursor 应用
-
在 Slack 中安装完成后,你会被重定向回 Cursor 完成最后设置
- 连接 GitHub(若尚未连接)并选择一个默认仓库
- 启用按用量计费
- 确认隐私设置
- 在 Slack 中通过提及 @Cursor 开始使用 Background Agents
使用方法
命令
Command | Description |
---|---|
@Cursor [prompt] | 启动一个 Background Agent。在已有 agent 的线程中,会添加后续指令 |
@Cursor settings | 配置默认值和频道的默认仓库 |
@Cursor [options] [prompt] | 使用高级选项:branch 、model 、repo |
@Cursor agent [prompt] | 在线程中强制创建一个新 agent |
@Cursor list my agents | 显示你正在运行的 agents |
选项
Option | Description | Example |
---|---|---|
branch | 指定基准分支 | branch=main |
model | 选择 AI 模型 | model=o3 |
repo | 指定目标仓库 | repo=owner/repo |
autopr | 启用/禁用自动创建 PR | autopr=false |
语法格式
- 方括号格式 @Cursor [branch=dev, model=o3, repo=owner/repo, autopr=false] Fix the login bug
- 行内格式 @Cursor branch=dev model=o3 repo=owner/repo autopr=false Fix the login bug
选项优先级
- 显式值会覆盖默认值
- 若有重复,后面的值覆盖前面的值
- 行内选项优先于设置弹窗中的默认值
使用线程上下文
S
Sarah2:30 PM
Hey team, we're getting reports that users can't log in after the latest deploy
M
Mike2:32 PM
I checked the logs - looks like the auth token validation is failing on line 247 of auth.js
A
Alex2:33 PM
Oh, I think it's because we changed the token format but didn't update the validation regex
S
Sarah2:35 PM
Yeah, the regex still expects the old format. We need to update it to handle both old and new formats for backwards compatibility
Y
You2:36 PM
@Cursor fix this
⏳1
Background Agents 在被调用时会读取整个线程的上下文,
并基于团队的讨论来理解并实现解决方案。
何时使用强制命令
Add follow-up
(来自上下文菜单)?
在 agent 的回复上用上下文菜单(⋯)添加后续指令。当一个线程里有多个 agent、而你需要指定要跟进哪一个时,这很有用。
状态更新与交接


管理 agents

- Add follow-up:为现有 agent 添加后续指令
- Delete:停止并归档该 Background Agent
- View request ID:查看用于故障排查的唯一请求 ID(联系支持时请附上)
- Give feedback:对 agent 的表现提交反馈
配置
设置
默认模型
默认仓库
https://github.com/org/repository
org/repository
如果你引用了不存在的仓库,会看起来像是没有访问权限。
当 Background Agent 启动失败时,错误信息中会显示这一点。
基础分支
main
)。
频道设置
- 不同频道使用不同的仓库
- 团队希望所有成员保持一致的设置
- 你想避免在每条命令中都指定仓库
- 在目标频道运行 @Cursor settings
- 为该频道设置默认仓库
- 在该频道使用 Background Agents 的所有团队成员都会使用这些默认值
频道设置优先于个人默认设置,但可以被如下显式选项覆盖@Cursor [repo=...] [prompt]
隐私
不支持隐私模式(旧版)。Background Agents 在运行时需要临时代码存储。
显示 Agent 摘要
在外部频道显示 Agent 摘要
权限
权限 | 描述 |
---|---|
app_mentions:read | 监听 @ 提及以启动 Background Agents 并响应请求 |
channels:history | 在添加后续指令时读取线程历史消息以获取上下文 |
channels:join | 在被邀请或需要时自动加入公共频道 |
channels:read | 访问频道元数据(ID 和名称)以发布回复和更新 |
chat:write | 当代理完成时发送状态更新、完成通知和 PR 链接 |
files:read | 下载共享文件(日志、截图、代码示例)以获取更多上下文 |
files:write | 上传代理变更的可视化摘要,便于快速审阅 |
groups:history | 在多轮对话中读取私有频道历史消息作为上下文 |
groups:read | 访问私有频道元数据以发布回复并保持对话连贯 |
im:history | 访问私信历史,以在持续对话中获取上下文 |
im:read | 读取私信元数据以识别参与者并保持正确的线程关联 |
im:write | 发起私信,用于私密通知或一对一沟通 |
mpim:history | 访问群组私信历史以支持多人对话 |
mpim:read | 读取群组私信元数据以定位参与者并确保正确送达 |
reactions:read | 读取表情反应以获取用户反馈和状态信号 |
reactions:write | 添加表情反应标记状态:⏳ 运行中,✅ 已完成,❌ 失败 |
team:read | 识别工作区细节以区分不同安装并应用设置 |
users:read | 将 Slack 用户与 Cursor 账号匹配,以进行权限与安全访问控制 |