開始使用
安裝
- 前往 Cursor integrations
- 點擊 Slack 旁的 Connect,或從這裡前往安裝頁面
- 系統會提示你在工作區安裝 Cursor 的 Slack 應用程式
-
在 Slack 完成安裝後,會被導回 Cursor 繼續完成設定
- 連結 GitHub(若尚未連結),並選擇預設儲存庫
- 啟用用量計費
- 確認隱私設定
- 在 Slack 提及 @Cursor 就能開始使用 Background Agents
如何使用
指令
指令 | 說明 |
---|---|
@Cursor [prompt] | 啟動 Background Agent。在已有 agent 的討論串中,會新增後續指示 |
@Cursor settings | 設定預設值與頻道的預設儲存庫 |
@Cursor [options] [prompt] | 使用進階選項:branch 、model 、repo |
@Cursor agent [prompt] | 在討論串中強制建立新的 agent |
@Cursor list my agents | 顯示你目前執行中的 agents |
選項
選項 | 說明 | 範例 |
---|---|---|
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: 為現有代理新增後續指示
- Delete: 停止並封存 Background Agent
- View request ID: 檢視用於疑難排解的唯一 request ID(聯絡支援時請附上)
- Give feedback: 提供代理效能的回饋
設定
設定
預設模型
預設儲存庫
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 | 當 agent 完成時傳送狀態更新、完成通知與 PR 連結 |
files:read | 下載分享的檔案(日誌、截圖、程式碼範例)以取得額外脈絡 |
files:write | 上傳 agent 變更的視覺化摘要以便快速檢視 |
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 帳號配對,以控管權限與安全存取 |