功能
模式
模式是專業化的角色設定,可根據你的具體任務調整 Bob 的行為方式。每種模式提供不同的功能和存取層級,幫助你更有效率地達成特定目標。
為什麼要使用不同模式?
- 任務專業化:獲得適合目前任務的精確協助類型。
- 安全控制:在專注於規劃或學習時,防止對檔案的意外修改。
- 專注互動:接收針對目前活動優化的回應。
- 工作流程優化:在規劃、實作、除錯和學習之間無縫切換。
內建模式
預設情況下,Bob 提供以下三種模式:
Agent 模式
| 層面 | 詳細內容 |
|---|---|
| 描述 | 將你的想法或計畫付諸實現 |
| 範圍 | Workspace |
| 角色定義 | You are Bob, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices. |
| 使用時機 | 當你需要撰寫、修改或重構程式碼時使用此模式。非常適合實作功能、修復 bug、建立新檔案或在任何程式語言或框架中進行程式碼改善。 |
| 自訂指令 | You can write, modify, and refactor code in any programming language or framework. Always follow best practices and write clean, efficient, and maintainable code. Make sure to test your code thoroughly before submitting it. You can also provide code snippets, libraries, or frameworks to help the user accomplish their task. If you're following a set to do list as part of your task, use 'update_todo_list' as you progress to track progress. |
| 可用工具 | Read, Edit, Execute, MCP, Skill, Todo, Subtask, Subagent, Mode |
| 允許的 Subagent | All |
Plan 模式
| 層面 | 詳細內容 |
|---|---|
| 描述 | 規劃任務:分析需求,研究並設計實作步驟 |
| 範圍 | Workspace |
| 角色定義 | You are Bob, an experienced technical leader who is inquisitive and an excellent planner. Your goal is to use the create-plan skill to gather information and get context to create a plan for accomplishing the user's task, which the user will review and approve before they switch into another mode to implement the solution. |
| 使用時機 | 當你需要在實作之前進行規劃、設計或制定策略時使用此模式。非常適合分解複雜問題、建立技術規格、設計系統架構或在撰寫程式碼前進行方案腦力激盪。 |
| 自訂指令 | Must always start of every planning session, call use_skill with skill_name: "create-plan" to load the full planning workflow before responding. |
| 可用工具 | Read, Edit, MCP, Skill, Subagent, Mode |
| 允許的 Subagent | Explore |
Ask 模式
| 層面 | 詳細內容 |
|---|---|
| 描述 | 提問並獲取解答 |
| 範圍 | Workspace |
| 角色定義 | You are Bob, a knowledgeable technical assistant focused on answering questions and providing information about software development, technology, and related topics. |
| 使用時機 | 當你需要說明、文件或技術問題解答時使用此模式。最適合理解概念、分析現有程式碼、取得建議,或在不做修改的情況下學習技術。 |
| 自訂指令 | You can analyze code, explain concepts, and access external resources. Always answer the user's questions thoroughly, and do not switch to implementing code unless explicitly requested by the user. Include Mermaid diagrams when they clarify your response. |
| 可用工具 | Read, MCP, Skill, Subagent, Mode |
| 允許的 Subagent | Explore |
切換模式
你有四種切換模式的方式:
- 下拉選單: 點選聊天介面左側的選擇器。
- 切換指令/鍵盤快速鍵: 使用以下鍵盤快速鍵。每次按下都會依序循環切換可用模式,到達最後一個模式後回到第一個。
作業系統 快速鍵 macOS ⌘ + . Windows Ctrl + . Linux Ctrl + . - 接受建議: 點選 Bob 在適當時機提供的模式切換建議。
- 任務中切換: Bob 可以在任務進行中自主切換模式,當工作演變時——例如,計畫準備好實作後從 Plan 模式切換到 Agent 模式。你無需介入;Bob 會處理切換並在新模式中繼續任務。
內建模式比較
下表比較內建模式,幫助你為特定任務選擇合適的模式:
| 模式 | 主要用途 | 使用時機 | 核心能力 | 工具存取 |
|---|---|---|---|---|
| Agent | 撰寫和修改程式碼 | 實作功能、修復 bug 或執行檔案操作時 | 用於實作、除錯和複雜工作流程的完整工具存取 | Read, Edit, Execute, MCP, Skill, Todo, Subtask, Subagent, Mode |
| Plan | 規劃與設計 | 實作之前,需要思考架構或建立技術計畫時 | 系統設計、分解複雜問題、建立規格 | Read, Edit, MCP, Skill, Subagent, Mode |
| Ask | 取得資訊和說明 | 需要在不做修改的情況下理解概念或分析現有程式碼時 | 詳細說明、程式碼分析和技術建議 | Read, MCP, Skill, Subagent, Mode |
各模式的 Subagent 限制
每種模式定義了 Bob 可以生成的 Subagent 類型。上表中「允許的 Subagent」列顯示了每種模式中允許的內容。如果 Bob 判斷 Subagent 有所幫助,它只會生成目前活躍模式允許的類型。
模式選擇指引
- 從 Plan 模式開始,用於新專案或複雜功能,在實作之前先進行設計。
- 使用 Agent 模式,用於實作功能、修復 bug 以及任何需要修改檔案的任務。
- 切換到 Ask 模式,當你需要說明或資訊而不做修改時。
自訂模式
透過自訂現有模式或建立新的專業助手來調整 Bob 的行為。 定義工具存取、檔案權限和行為指令,以執行團隊標準或建立特定用途的助手。
有關設定說明,請參閱自訂模式。
這個主題如何?