# Roo Code Modes — Architect, Code, Ask & Debug Agents > Roo Code's Modes feature splits the agent into 4 specialists with their own prompts and tool whitelists. Boomerang task delegation between modes built in. ## Install Save the content below to `.claude/skills/` or append to your `CLAUDE.md`: ## Quick Use 1. Install Roo Code from VS Code marketplace (search 'Roo Code') 2. Open the chat panel, click the mode dropdown — switch between Architect / Code / Ask / Debug 3. To add custom modes, save the `.roomodes` template below to your repo root --- ## Intro Roo Code's Modes are scoped agent personalities — Architect (plans without editing), Code (edits files), Ask (read-only Q&A), Debug (root-cause investigation). Each mode has its own system prompt and tool whitelist, so you don't get an architect that touches files or a debugger that adds new dependencies. Best for: teams who want clean separation between planning and execution. Works with: Roo Code in VS Code, Cursor (via .roomodes config). Setup time: 30 seconds. --- ### The 4 default modes | Mode | What it does | Tools allowed | |---|---|---| | **Architect** | Reads code, plans changes, writes design docs | read-only + create design files | | **Code** | Edits code based on a plan | read + write + execute | | **Ask** | Answers questions about the codebase | read-only | | **Debug** | Investigates a bug systematically | read + selective execute (no edits) | Switch with `Cmd+Shift+P → Roo Code: Switch Mode` or the dropdown in the chat panel. ### Custom modes Create `.roomodes` in your repo to add project-specific modes: ```yaml customModes: - slug: security-auditor name: Security Auditor roleDefinition: | You are a security auditor. Read code, identify OWASP Top 10 vulnerabilities, and produce a severity-classified report. Never modify files. groups: - read - mcp customInstructions: | Output findings as a markdown table: severity | file:line | issue | fix. Cite the OWASP category for each finding. - slug: pr-reviewer name: PR Reviewer roleDefinition: | You are a senior reviewer. Read git diff, flag bugs and style issues, suggest improvements. Never modify files. groups: - read customInstructions: | Use git CLI to read the diff. Output a markdown review comment. ``` ### Boomerang task delegation Modes work together via Boomerang — Architect plans, then *delegates* to Code via the new_task tool. The Code mode finishes, then "boomerangs" results back to Architect for verification. One human prompt drives a multi-mode workflow. --- ### FAQ **Q: Is Roo Code free?** A: Yes. Roo Code is open-source under Apache-2.0 license. You bring your own LLM API key (Claude / OpenAI / Bedrock / OpenRouter / etc) and pay for inference. **Q: How is this different from Cline?** A: Roo Code forked from Cline in 2025 and added Modes, Boomerang task delegation, and custom mode definitions. Cline still works on a single-mode model. Both share the .clinerules / .roomodes format. **Q: Can I use modes in Cursor?** A: Roo Code is its own VS Code extension. Cursor has a similar feature called Custom Modes (Cursor v0.45+) that uses a different config format. The .roomodes file in this asset is Roo-specific. --- ## Source & Thanks > Built by [Roo Code](https://github.com/RooCodeInc). Licensed under Apache-2.0. > > [RooCodeInc/Roo-Code](https://github.com/RooCodeInc/Roo-Code) — ⭐ 16,000+ --- ## 快速使用 1. 从 VS Code 商店装 Roo Code(搜 'Roo Code') 2. 打开聊天面板,点模式下拉切换 Architect / Code / Ask / Debug 3. 加自定义模式:把下面的 `.roomodes` 模板保存到仓库根目录 --- ## 简介 Roo Code 的 Modes 是带作用域的 agent 人格 —— Architect(只规划不动文件)/ Code(改代码)/ Ask(只读问答)/ Debug(根因调查)。每个模式有独立的系统 prompt 和工具白名单,所以你不会遇到「架构师顺手改文件」或「调试员加新依赖」。适合需要清晰分离规划和执行的团队。兼容 Roo Code(VS Code)和 Cursor(通过 .roomodes 配置)。装机时间 30 秒。 --- ### 4 个默认模式 | 模式 | 干什么 | 允许的工具 | |---|---|---| | **Architect** | 读代码、规划改动、写设计文档 | 只读 + 创建设计文档 | | **Code** | 按规划改代码 | 读 + 写 + 执行 | | **Ask** | 回答关于代码库的问题 | 只读 | | **Debug** | 系统化调查 bug | 读 + 选择性执行(不改文件) | 切换:`Cmd+Shift+P → Roo Code: Switch Mode` 或聊天面板里的下拉菜单。 ### 自定义模式 在仓库里建 `.roomodes` 加项目专属模式: ```yaml customModes: - slug: security-auditor name: Security Auditor roleDefinition: | You are a security auditor. Read code, identify OWASP Top 10 vulnerabilities, and produce a severity-classified report. Never modify files. groups: - read - mcp customInstructions: | Output findings as a markdown table: severity | file:line | issue | fix. Cite the OWASP category for each finding. - slug: pr-reviewer name: PR Reviewer roleDefinition: | You are a senior reviewer. Read git diff, flag bugs and style issues, suggest improvements. Never modify files. groups: - read customInstructions: | Use git CLI to read the diff. Output a markdown review comment. ``` ### Boomerang 任务委派 模式之间通过 Boomerang 协作 —— Architect 规划完,用 new_task 工具 *委派* 给 Code。Code 跑完之后把结果 "回旋" 给 Architect 做验证。一个用户 prompt 驱动多模式工作流。 --- ### FAQ **Q: Roo Code 免费吗?** A: 免费。Roo Code Apache-2.0 开源。你用自己的 LLM API key(Claude / OpenAI / Bedrock / OpenRouter 等),按推理量付费。 **Q: 跟 Cline 区别在哪?** A: Roo Code 是 2025 年从 Cline fork 出来的,加了 Modes、Boomerang 任务委派、自定义模式定义。Cline 还停在单模式模型。两边都兼容 .clinerules / .roomodes 格式。 **Q: Cursor 能用 modes 吗?** A: Roo Code 是独立的 VS Code 扩展。Cursor 有自己的 Custom Modes 特性(v0.45+),用不同的配置格式。这份资产里的 .roomodes 文件是 Roo 专用。 --- ## 来源与感谢 > Built by [Roo Code](https://github.com/RooCodeInc). Licensed under Apache-2.0. > > [RooCodeInc/Roo-Code](https://github.com/RooCodeInc/Roo-Code) — ⭐ 16,000+ --- Source: https://tokrepo.com/en/workflows/roo-code-modes-architect-code-ask-debug-agents Author: Roo Code