---
title: "Cline Rules (.clinerules/): paths and format · DotsAgent"
description: "Where .clinerules/ lives, its format and frontmatter, how global and nested copies merge, and which tools read it. Checked 2026-10-01."
url: https://dotsagent.io/instructions/files/cline-rules
---

.clinerules/

# Cline Rules (.clinerules/): where it lives and how tools read it

Cline Rules are Markdown files in .clinerules/ that Cline combines with global rules and with AGENTS.md. Optional paths frontmatter limits a rule to matching files.

## Where it lives

- Workspace: .clinerules/*.md or .cline/rules/*.md; both are searched.
- Global: Documents\Cline\Rules on Windows, ~/Documents/Cline/Rules on macOS and Linux, plus ~/.cline/rules and ~/Cline/Rules.
- Cross-tool files detected automatically: AGENTS.md, ~/.agents/AGENTS.md, .cursorrules and .windsurfrules.

## Format

Markdown files, optionally numbered such as 01-coding.md, with optional YAML frontmatter. A paths array of globs activates the rule when any pattern matches a file in context. No frontmatter means always active, paths: [] means never, and invalid YAML fails open.

Frontmatter keys: `paths`

`.clinerules/`

```
---
paths:
  - "src/components/**"
  - "src/hooks/**"
---

# Components and hooks

- Function components only.
- Hook names start with use and the files live in src/hooks/.
- Split any component that grows past 200 lines.
- Add a test next to each new hook.
```

## Precedence and merging

Workspace and global rules are combined, and workspace rules win on conflict. Each rule can be toggled on or off individually.

## Tips

- In context means mentioned paths, open or visible tabs, edited files and pending edits.
- Because invalid YAML fails open, a typo in paths makes the rule always active; check it after editing.
- Create rules from the Rules panel in VS Code or with the /newrule slash command.

Generate an AGENTS.md and matching rule files for five tools from one form. [Open the AGENTS.md generator →](https://dotsagent.io/instructions)

## Other instruction files

[AGENTS.md](https://dotsagent.io/instructions/files/agents-md)

[CLAUDE.md](https://dotsagent.io/instructions/files/claude-md)

[GEMINI.md](https://dotsagent.io/instructions/files/gemini-md)

[.cursor/rules/*.mdc](https://dotsagent.io/instructions/files/cursor-rules)

[.github/copilot-instructions.md](https://dotsagent.io/instructions/files/github-copilot-instructions)

[.devin/rules/*.md](https://dotsagent.io/instructions/files/windsurf-rules)

[~/.openclaw/workspace/AGENTS.md](https://dotsagent.io/instructions/files/openclaw-workspace)

## Sources

1. [docs.cline.bot](https://docs.cline.bot/features/cline-rules)/features/cline-rules

Independent reference for people who build AI agents. Not affiliated with any vendor named here.

© 2026 DotsAgent · Facts checked October 1, 2026
