Answer: Conditional rules use YAML frontmatter at the top of rule files to scope rules to specific parts of your codebase; Cline gathers context from your current work, evaluates each rule's conditions, and activates matching rules. To write one with a paths condition, add YAML frontmatter to the top of any rule file in your `.clinerules/` directory with a `paths:` list of glob patterns. Status: Confirmed Entry: tool/cline/features/conditional-rules-paths Revision: 1 Digest: sha256:863166d933e0e39c (changes whenever the content changes) Timeline: Created: 2026-11-13T03:06:34Z Last changed: 2026-11-13T03:06:34Z Last verified: 2026-11-20T12:27:30Z Next check: 2026-11-21T12:27:30Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of mechanism | YAML frontmatter | [1] | 2026-11-20 activation process | evaluates each rule's conditions, and activates matching rules | [1] | 2026-11-20 context sources | open files, visible tabs, mentioned paths, edited files | [1] | 2026-11-20 rule file location | .clinerules/ | [1] | 2026-11-20 paths example | src/components/** | [1] | 2026-11-20 paths example 2 | src/hooks/** | [1] | 2026-11-20 activation notification | Conditional rules applied: workspace:frontend-rules.md | [1] | 2026-11-20 Sources: [1] Cline. "Rules". https://docs.cline.bot/customization/cline-rules.md Role: primary. Accessed: 2026-11-20T12:27:30Z Quote: "Conditional rules use YAML frontmatter at the top of your rule files." (Supports: mechanism) Quote: "evaluates each rule's conditions, and activates matching rules" (Supports: activation process) Quote: "it gathers context from your current work (open files, visible tabs, mentioned paths, edited files)" (Supports: context sources) Quote: "Add YAML frontmatter to the top of any rule file in your `.clinerules/` directory:" (Supports: rule file location) Quote: "- "src/components/**"" (Supports: paths example) Quote: "- "src/hooks/**"" (Supports: paths example 2) Quote: "**"Conditional rules applied: workspace:frontend-rules.md"**" (Supports: activation notification) Published: 2026-11-19T19:51:15Z Snapshot SHA-256: 1c64e90dbe6b7750d2b3163e399aef1f53cee91360fe21d9444c24c128b21049 (captured 2026-11-13T03:06:33Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-13T03:06:34Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T12:27:30Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:27:30Z Last attempt: 2026-11-20T12:27:30Z Notes and limitations: Extracted automatically from a single official source (section "Conditional Rules"). Related: https://latestn.com/tool/cline/features/create-skill How do I create a skill in Cline? https://latestn.com/tool/cline/features/create-tasks-on-board How do I add tasks to the Cline Kanban board? https://latestn.com/tool/cline/features/deprecated-features-alternatives What Cline features are deprecated and what should I use instead? https://latestn.com/tool/cline/features/clinecore-built-in-tools Which built-in tools does Cline offer when running through ClineCore? https://latestn.com/tool/cline/features/clineignore-deprecation Why is Cline removing .clineignore and what can I use for context filtering instead? https://latestn.com/tool/cline/features/cloud-agents-work-saved How does Cline Cloud Agents save my work? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T03:06:34Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/cline/features/conditional-rules-paths/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/cline/features/conditional-rules-paths POST: https://latestn.com/dispute/tool/cline/features/conditional-rules-paths with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/cline/features/conditional-rules-paths?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do conditional rules work in Cline and how do I write one with a paths condition? Revision 1, last verified 2026-11-20T12:27:30Z. https://latestn.com/tool/cline/features/conditional-rules-paths (accessed 2026-11-21T09:53:30Z). @misc{LatestN_tool_cline_features_conditional_rules_paths_r1, title = {How do conditional rules work in Cline and how do I write one with a paths condition?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/cline/features/conditional-rules-paths}}, note = {Revision 1; digest sha256:863166d933e0e39c; last verified 2026-11-20T12:27:30Z; accessed 2026-11-21T09:53:30Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/cline/features/conditional-rules-paths