Creating a Rule
You can create a rule by clicking the+ button in the Rules tab. This will open a new file in your IDE which you can use to write your rule.

- Your rule will be stored in the
.clinerules/directory in your project (if it’s a Workspace Rule) - Or in the Global Rules directory (if it’s a Global Rule):
Global Rules Directory Location
The location of your Global Rules directory depends on your operating system:| Operating System | Default Location | Notes |
|---|---|---|
| Windows | Documents\Cline\Rules | Uses system Documents folder |
| macOS | ~/Documents/Cline/Rules | Uses user Documents folder |
| Linux/WSL | ~/Documents/Cline/Rules | May fall back to ~/Cline/Rules on some systems |
Note for Linux/WSL users: If you don’t find your global rules inYou can also have Cline create a rule for you by using the~/Documents/Cline/Rules, check~/Cline/Rulesas the location may vary depending on your system configuration and whether the Documents directory exists.
/newrule slash command in the chat.
Example Cline Rule Structure
Key Benefits
- Version Controlled: The
.clinerulesfile becomes part of your project’s source code - Team Consistency: Ensures consistent behavior across all team members
- Project-Specific: Rules and standards tailored to each project’s needs
- Institutional Knowledge: Maintains project standards and practices in code
.clinerules file in your project’s root directory:
AGENTS.md Standard Support
Cline also supports the AGENTS.md standard as a fallback (in addition to Cline Rules) by automatically detectingAGENTS.md files in
your workspace root. This allows you to use the same rules file across different AI
coding tools.
Tips for Writing Effective Cline Rules
- Be Clear and Concise: Use simple language and avoid ambiguity.
- Focus on Desired Outcomes: Describe the results you want, not the specific steps.
- Test and Iterate: Experiment to find what works best for your workflow.
.clinerules/ Folder System
.clinerules/ directory, combining them into a unified set of rules. The numeric prefixes (optional) help organize files in a logical sequence.
Using a Rules Bank
For projects with multiple contexts or teams, maintain a rules bank directory:Benefits of the Folder Approach
- Contextual Activation: Copy only relevant rules from the bank to the active folder
- Easier Maintenance: Update individual rule files without affecting others
- Team Flexibility: Different team members can activate rules specific to their current task
- Reduced Noise: Keep the active ruleset focused and relevant
Usage Examples
Switch between client projects:Implementation Tips
- Keep individual rule files focused on specific concerns
- Use descriptive filenames that clearly indicate the rule’s purpose
- Consider git-ignoring the active
.clinerules/folder while tracking theclinerules-bank/ - Create team scripts to quickly activate common rule combinations
Managing Rules with the Toggleable Popover
To make managing both single.clinerules files and the folder system even easier, Cline v3.13 introduces a dedicated popover UI directly accessible from the chat interface.
Located conveniently under the chat input field, this popover allows you to:
- Instantly See Active Rules: View which global rules (from your user settings) and workspace rules (
.clinerulesfile or folder contents) are currently active. - Quickly Toggle Rules: Enable or disable specific rule files within your workspace
.clinerules/folder with a single click. This is perfect for activating context-specific rules (likereact-rules.mdormemory-bank.md) only when needed. - Easily Add/Manage Rules: Quickly create a workspace
.clinerulesfile or folder if one doesn’t exist, or add new rule files to an existing folder.
.png)

