Cline
Cline Rules: workspace, global, and conditional rules
Where do Cline rules go, and how do I scope or toggle them?
Put project rules as markdown files in a .clinerules/ or .cline/rules/ folder at your project root, and personal rules in your global Cline Rules directory such as ~/Documents/Cline/Rules. Cline also detects .cursorrules, .windsurfrules, and AGENTS.md, and you can scope a rule to certain paths with YAML frontmatter. Every rule can be switched on or off from the scale icon in the Cline panel.
Where rules live
Workspace rules go in a .clinerules/ or .cline/rules/ directory at the project root. Both layouts are supported and are meant for team standards you share through version control. The official docs describe these locations as directories, not a single file.
- Global rules on Windows: Documents\Cline\Rules
- Global rules on macOS: ~/Documents/Cline/Rules
- Global rules on Linux and WSL: ~/Documents/Cline/Rules
- Workspace rules take precedence over conflicting global rules
- Numeric prefixes such as 01-coding.md help ordering but are optional
Example layout
my-project/
.clinerules/
01-coding.md
02-testing.mdOther rule files Cline reads
Cline detects several rule formats and shows them in its Rules panel, so teams that already use other tools can keep their existing files.
- Cursor Rules: .cursorrules
- Windsurf Rules: .windsurfrules
- AGENTS.md at the project root, or ~/.agents/AGENTS.md, for cross-tool compatibility
Conditional rules and toggling
Add YAML frontmatter with a paths list to a workspace rule to make it apply only when the current context matches those globs. Context includes open tabs, visible files, mentioned paths, edited files, and pending operations. A rule without frontmatter is always active unless you disable it.
.clinerules/react.md
--- paths: - "src/components/**" - "src/hooks/**" --- Use function components and hooks.
To toggle rules, click the scale icon at the bottom of the Cline panel, to the left of the model selector. Every rule has its own switch, so you can disable one without deleting the file. The same panel has a New rule file button, and the /newrule slash command lets Cline write a rule for you.
Workflows and MCP settings
Workflows are markdown files with step by step instructions that live alongside Cline Rules. You run one by typing a slash followed by the workflow file name in chat.
Run a workflow
/YOUR_WORKFLOW.md
MCP servers are configured in cline_mcp_settings.json. In the IDE extension, open it from the MCP Servers icon, then the Configure tab, then Configure MCP Servers. The CLI keeps it at ~/.cline/data/settings/cline_mcp_settings.json, which the CLINE_MCP_SETTINGS_PATH environment variable can override.
cline_mcp_settings.json
{
"mcpServers": {
"local-server": {
"command": "node",
"args": ["/path/to/server.js"],
"env": {
"API_KEY": "YOUR_VALUE"
},
"disabled": false,
"autoApprove": []
}
}
}Sources
More on Cline
Other guides
Get the weekly agent stack update
New official MCP servers, spec changes and harness releases, checked against the source. One email a week, no fluff.
Reviewed Oct 6, 2026. Settings change often; the linked vendor docs are the source of truth.