快速开始
安装
- 前往 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 的回复上使用上下文菜单(⋯)来添加后续指令。当一个线程里有多个 agents、且你需要指定要跟进哪一个时,这很有用。
状态更新与交接


管理 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 摘要
权限
Permission | Description |
---|---|
app_mentions:read | 监听 @mention,以启动 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 账号匹配,用于权限和安全访问 |