開始使用
安裝
- 前往 Cursor 整合
- 點擊 Slack 旁的 Connect,或從這裡前往 安裝頁面
- 你會被引導在工作區中安裝 Cursor 的 Slack 應用程式。
-
在 Slack 安裝完成後,你會被導回 Cursor 以完成設定
- 連結 GitHub(如果尚未連結)並選擇預設儲存庫
- 啟用依用量計費
- 確認隱私設定
- 在 Slack 中提及 @Cursor 就能開始使用 Background Agents
使用方式
指令
指令 | 說明 |
---|---|
@Cursor [prompt] | 啟動 Background Agent。在已有代理的討論串中,會新增後續指示 |
@Cursor settings | 設定預設值與頻道的預設儲存庫 |
@Cursor [options] [prompt] | 使用進階選項:branch 、model 、repo |
@Cursor agent [prompt] | 在討論串中強制建立新的代理 |
@Cursor list my agents | 顯示你正在執行的代理 |
選項
選項 | 說明 | 範例 |
---|---|---|
branch | 指定基底分支 | branch=main |
model | 選擇 AI 模型 | model=o3 |
repo | 指定目標儲存庫 | repo=owner/repo |
autopr | 啟用/停用自動建立 PR | autopr=false |
語法格式
- 括號格式(Bracket format) @Cursor [branch=dev, model=o3, repo=owner/repo, autopr=false] Fix the login bug
- Inline 格式 @Cursor branch=dev model=o3 repo=owner/repo autopr=false Fix the login bug
選項優先順序
- 明確指定的值會覆蓋預設值
- 重複時,後面的值會覆蓋前面的值
- Inline 選項優先於設定視窗中的預設值
使用討論串脈絡
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
(從內容功能表)?
在代理的回覆上使用內容功能表(⋯)來提供後續指示。當討論串中有多個代理、需要指定要跟進哪一個時很實用。
狀態更新與交接


管理 agents

- Add follow-up:為現有 agent 新增後續指示
- Delete:停止並封存 Background Agent
- View request ID:檢視用於疑難排解的唯一 request 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 | 偵測 @ 提及以啟動 Background Agents 並回應請求 |
channels:history | 讀取討論串中的先前訊息,為後續指示提供脈絡 |
channels:join | 受邀或被請求時自動加入公開頻道 |
channels:read | 存取頻道中繼資料(ID 與名稱),以張貼回覆與更新 |
chat:write | 當代理完成時傳送狀態更新、完成通知與 PR 連結 |
files:read | 下載共享檔案(日誌、截圖、程式碼範例)以取得額外脈絡 |
files:write | 上傳代理變更的視覺化摘要,方便快速檢閱 |
groups:history | 讀取私人頻道中的先前訊息,為多輪對話提供脈絡 |
groups:read | 存取私人頻道中繼資料,以張貼回應並維持對話流程 |
im:history | 存取直接訊息歷史,為持續對話提供脈絡 |
im:read | 讀取 DM 中繼資料,以識別參與者並維持正確的串接 |
im:write | 發起直接訊息,用於私人通知或個別溝通 |
mpim:history | 存取群組 DM 歷史,用於多參與者對話 |
mpim:read | 讀取群組 DM 中繼資料,以標註參與者並確保正確投遞 |
reactions:read | 觀察表情符號反應,以取得使用者回饋與狀態信號 |
reactions:write | 新增表情符號反應以標記狀態——⏳ 代表執行中,✅ 代表已完成,❌ 代表失敗 |
team:read | 識別工作區詳細資訊,以區分安裝並套用設定 |
users:read | 將 Slack 使用者與 Cursor 帳號配對,以控管權限與確保安全存取 |