You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Roo Code allows you to create **custom modes**that can be either global (available across all projects) or project-specific (defined within a single project). These modes let you tailor Roo's behavior to specific tasks or workflows by defining:
3
+
Roo Code allows you to create **custom modes**to tailor Roo's behavior to specific tasks or workflows. Custom modes can be either **global** (available across all projects) or **project-specific** (defined within a single project). They allow you to define:
4
4
5
5
***A unique name and slug:** For easy identification.
6
6
***A role definition:** A description of the mode's purpose and expertise.
@@ -15,7 +15,7 @@ Roo Code allows you to create **custom modes** that can be either global (availa
15
15
***Experimentation:** Safely experiment with different prompts and configurations without affecting other modes.
16
16
***Team Collaboration:** Share custom modes with your team to standardize workflows.
17
17
18
-
## Creating a Custom Mode
18
+
## Creating Custom Modes
19
19
20
20
You have three options for creating custom modes:
21
21
@@ -33,36 +33,54 @@ Roo Code will guide you through the process.
33
33
34
34
### 2. Using the Prompts Tab
35
35
36
-
1.**Open the Prompts Tab:** Click the <Codiconname="notebook" /> icon in the Roo Code top menu bar.
36
+
1.**Open the Prompts Tab:** Click the notebook icon in the Roo Code top menu bar.
37
37
2.**Click "Create New Mode":** Use the "+" button to add a new mode.
38
38
3.**Fill in the Fields:** Enter the mode's name, role definition, custom instructions, and select the allowed tool groups.
39
39
4.**Click "Create Mode":** Save your new mode.
40
40
41
41
Note: Adding/editing file type restrictions is not yet supported in the prompts tab UI.
42
42
43
-
### 3. Manual Configuration (Advanced)
43
+
### 3. Manual Configuration
44
44
45
-
Custom modes can be configured in two locations:
45
+
Custom modes can be configured by directly editing JSON files. There are two locations for custom mode configurations:
46
46
47
-
1.**Global Configuration:**
48
-
- Located at `~/Library/Application Support/Cursor/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_custom_modes.json`
49
-
-These modes are available across all projects
47
+
1.**Global Configuration:**
48
+
* Located at `~/Library/Application Support/Cursor/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_custom_modes.json`
49
+
*These modes are available across all projects.
50
50
51
-
2.**Project-Specific Configuration:**
52
-
-Located in `.roomodes` file in your project's root directory
53
-
-These modes are only available within that specific project
54
-
-Project-specific modes take precedence over global modes with the same slug
51
+
2.**Project-Specific Configuration:**
52
+
*Located in a `.roomodes` file in your project's root directory.
53
+
*These modes are only available within that specific project.
54
+
***Project-specific modes take precedence over global modes with the same slug.** This means if you define a mode with the slug "code" in your `.roomodes` file, it will override the global "code" mode when you're working in that project.
55
55
56
56
To edit either configuration:
57
57
58
-
1.**Open the Prompts Tab:** Click the <Codiconname="notebook" /> icon in the Roo Code top menu bar.
59
-
2.**Open the Settings File:** Click the <Codiconname="code" /> in the top right corner of the "Prompts" tab.
58
+
1.**Open the Prompts Tab:** Click the notebook icon in the Roo Code top menu bar.
59
+
2.**Open the Settings File:** Click the code icon (`<>`) in the top right corner of the "Prompts" tab. (This will allow you to edit either the Global or project-specific configuration file. You can also edit a project-specific configuration, by manually creating/opening the `.roomodes` file in your project's root directory.)
60
60
3.**Edit the JSON:** Add or modify mode configurations within the `customModes` array, following the format described below.
61
61
4.**Save the File:** Roo Code will automatically detect the changes.
62
62
63
63
## Custom Mode Configuration (JSON Format)
64
64
65
-
Both global and project-specific configuration files use the same JSON format. Here's an example:
65
+
Both global and project-specific configuration files use the same JSON format. The configuration is a JSON object with a `customModes` key, which contains an array of mode definitions. Each mode definition is a JSON object with the following properties:
66
+
67
+
*`slug`: (Required) A unique identifier for the mode (lowercase letters, numbers, and hyphens). Shorter is better.
68
+
*`name`: (Required) The display name for the mode.
69
+
*`roleDefinition`: (Required) A detailed description of the mode's role and capabilities.
70
+
*`groups`: (Required) An array of allowed tool groups. Each group can be specified either as a string (e.g., `"edit"` to allow editing any file) or with file restrictions (e.g., `["edit", { "fileRegex": "\\.md$", "description": "Markdown files only" }]` to only allow editing markdown files).
71
+
* Available tool groups are: `"read"`, `"edit"`, `"browser"`, `"command"`, `"mcp"`.
72
+
***Understanding `fileRegex`:** The `fileRegex` property uses a *regular expression* (or *regex*) to define which files the mode is allowed to edit. A regular expression is a sequence of characters that specifies a search pattern. Here's a breakdown of some common regex components used in the examples:
73
+
*`\.`: Matches a literal dot (`.`). The backslash is used to "escape" the dot, since a dot has a special meaning in regular expressions (matching any character).
74
+
*`(test|spec)`: Matches either "test" or "spec". The parentheses create a *capturing group*, and the pipe (`|`) acts as an "or".
75
+
*`(js|ts|jsx|tsx)`: Matches "js", "ts", "jsx", or "tsx".
76
+
*`$`: Matches the end of the string. This ensures that the entire filename matches the pattern, not just a part of it.
77
+
* For example, `\\.md$` matches any filename that ends with ".md". `\\.(test|spec)\\.(js|ts|jsx|tsx)$` matches filenames like "myComponent.test.js", "utils.spec.ts", etc.
78
+
* You can learn more about regular expressions on websites like [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions).
79
+
*`customInstructions`: (Optional) Additional instructions for the mode.
80
+
81
+
Here are some examples:
82
+
83
+
**Example 1: A simple documentation writer mode (could be global or project-specific):**
66
84
67
85
```json
68
86
{
@@ -76,7 +94,16 @@ Both global and project-specific configuration files use the same JSON format. H
"customInstructions": "Focus on editing and formatting markdown files."
173
+
}
174
+
]
175
+
}
176
+
```
177
+
By following these instructions, you can create and manage custom modes to enhance your workflow with Roo-Code.
178
+
93
179
## Community Gallery
94
180
95
181
Ready to explore more? Check out the [Custom Modes Gallery](../community#custom-modes-gallery) to discover and share custom modes created by the community!
Copy file name to clipboardExpand all lines: docs/community.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,3 +39,23 @@ A specialized mode for writing and maintaining Jest test suites with TypeScript
39
39
"customInstructions": "When writing tests:\n- Always use describe/it blocks for clear test organization\n- Include meaningful test descriptions\n- Use beforeEach/afterEach for proper test isolation\n- Implement proper error cases\n- Add JSDoc comments for complex test scenarios\n- Ensure mocks are properly typed\n- Verify both positive and negative test cases"
40
40
}
41
41
```
42
+
43
+
### VibeMode by [@richardwhiteii](https://github.com/richardwhiteii)
44
+
45
+
A mode for transforming natural language descriptions into working code, embracing intuitive and flow-based development.
46
+
47
+
```json
48
+
{
49
+
"slug": "vibemode",
50
+
"name": "VibeMode",
51
+
"roleDefinition": "You are Roo, a Vibe Coding assistant that transforms natural language descriptions into working code. You embrace the philosophy that coding should be intuitive and flow-based, where developers can 'give in to the vibes' and focus on what they want to build rather than how to build it.\n\nDescription: An AI coding partner focused on natural language programming and vibe-based development with continuous testing\n\nSystem Prompt: You are a Vibe Coding assistant that helps transform natural language descriptions into working code. Focus on understanding intent over technical specifics while ensuring functionality through continuous testing. Embrace experimentation and rapid iteration with built-in validation.\n\nGoals:\n- Transform natural language descriptions into functional code\n- Maintain flow state by handling technical details automatically\n- Suggest improvements while preserving user intent\n- Handle error resolution autonomously when possible\n- Ensure code quality through continuous testing\n- Validate each iteration before proceeding\n\nPrimary Responsibilities:\n\nNatural Language Programming\n- Transform conversational descriptions into functional code\n- Handle technical implementation details automatically\n- Maintain creative flow by managing error resolution autonomously\n- Suggest improvements while preserving user intent\n- Generate appropriate tests for new functionality\n\nWorkflow Optimization\n- Minimize keyboard interaction by supporting voice-to-text input\n- Handle error messages through simple copy-paste resolution\n- Maintain context across development sessions\n- Switch to appropriate specialized modes when needed\n- Run tests automatically after each significant change\n- Provide immediate feedback on test results\n\nTest-Driven Development\n- Create tests before implementing new features\n- Validate changes through automated testing\n- Maintain test coverage throughout development\n- Flag potential issues early in the development cycle\n- Ensure backwards compatibility with existing functionality\n\nPrompt Templates:\n- Initialization: 'I want to create {description}'\n- Refinement: 'Can you modify this to {change}'\n- Error Handling: 'Fix this error: {error}'\n- Iteration: 'Let's improve {aspect}'\n- Test Creation: 'Generate tests for {feature}'\n- Validation: 'Verify the changes to {component}'",
52
+
"groups": [
53
+
"read",
54
+
"edit",
55
+
"browser",
56
+
"command",
57
+
"mcp"
58
+
],
59
+
"customInstructions": "Prioritize working solutions over perfect code. Use error messages as learning opportunities. Maintain a conversational, encouraging tone. Suggest improvements without breaking flow. Document key decisions and assumptions. Focus on understanding intent over technical specifics. Embrace experimentation and rapid iteration. Switch to architect mode when structural changes are needed. Switch to ask mode when research is required. Switch to code mode when precise implementation is needed. Maintain context across mode transitions. Handle errors autonomously when possible. Preserve code context and conversation history. Support voice-to-text input through SuperWhisper integration. Generate and run tests for each new feature. Validate all changes through automated testing. Maintain test coverage throughout development. Provide immediate feedback on test results. Flag potential issues early in development cycle. Ensure backwards compatibility."
0 commit comments