Cline rules (.clinerules)
.clinerules are the project instructions the Cline AI coding agent reads at session start to learn your project — stack, commands, conventions, what not to do, definition of done. Use a single .clinerules file at your repo root, or a .clinerules/ folder of modular rule files; Cline also supports global rules.
What are Cline rules?
Plain-Markdown instructions Cline loads into context automatically when you work in a repo. Their job is to give the agent the context a new teammate would need. It's the Cline-native version of the same idea as AGENTS.md, CLAUDE.md, and Cursor rules — same content, read from .clinerules.
What goes in a .clinerules file?
- Overview — one line on what the project is.
- Stack — languages, framework, database, key libraries.
- Commands — build, test, lint, dev, deploy.
- Conventions — the decisions and coding style the agent must follow.
- Don't — explicit anti-patterns and off-limits areas.
- Definition of done — what must be true before a change ships.
.clinerules example
# Acme Web > Senior full-stack engineer. Small, reviewable diffs. Tests with every change. ## Stack Next.js 15 (App Router) · TypeScript · Tailwind · Drizzle ORM · Postgres ## Commands - Build: `pnpm build` - Test: `pnpm test` - Lint: `pnpm lint && pnpm typecheck` ## Conventions - Server components by default; "use client" only when needed. - All DB access through src/db/ (Drizzle) — never raw SQL in routes. ## Don't - Don't add dependencies without asking. - Don't commit secrets — use .env.local (see .env.example). ## Definition of done - Lint + tests pass; new UI works at 375px.
Cline-specific: file vs folder, and global rules
- Single file. The simplest setup: one
.clinerulesMarkdown file at your repo root. Great for small projects. .clinerules/folder. Split rules into several Markdown files — e.g.testing.md,style.md,architecture.md. Cline combines them into the active context, so big rule sets stay organised instead of one giant file.- Toggle rules. Cline's Rules popover lets you enable or disable individual rule files, so you can switch sets on per task without deleting anything.
- Global rules. Beyond the project file, Cline supports global rules that apply across all your projects — your personal, cross-project preferences, read in addition to
.clinerules.
Best practices
- Keep it lean. ETH Zurich's Evaluating AGENTS.md found dump-everything files lowered task success ~3% and raised cost 20%+, while short curated ones improved success ~4%. Split large sets into a
.clinerules/folder rather than one bloated file. - Be specific. "DB access through
src/db/" beats "write clean code." - One source of truth. If you also run other agents, keep AGENTS.md canonical and generate or mirror your
.clinerulesfrom it — don't maintain copies that drift. - Check it into git so the team shares the project rules; keep personal prefs in Cline's global rules.
.clinerules vs CLAUDE.md vs AGENTS.md
Same guidance, different readers — AGENTS.md is the open standard (many tools), CLAUDE.md is Claude Code's, GEMINI.md is Gemini CLI's, and .clinerules is Cline's (with the file-or-folder format + global rules). The clean setup is one canonical file the rest import or are generated from. Full breakdown: AGENTS.md vs CLAUDE.md →
Generate .clinerules (and AGENTS.md, CLAUDE.md, GEMINI.md, Cursor, Copilot) — free
Fill in your project's rules once and get every file, correctly formatted, with a token-budget warning so they stay lean. No signup.
Open the Agent Memory Compiler →Keep it in sync with your work
Generated files drift the moment your project changes. In TaskPrio your rules live in one place and your agents pull them over MCP with get_next_task — the memory and the task queue become one source of truth. Edit once; every agent stays current. See the MCP queue →
FAQ
What is .clinerules?
Cline's project-rules file, auto-loaded at session start — stack, commands, conventions, don't-dos, definition of done. A single .clinerules file or a .clinerules/ folder, plus global rules.
What goes in it?
Overview, stack, commands, conventions, don't-dos, definition of done — kept lean; split big sets into a .clinerules/ folder.
Is it the same as CLAUDE.md or Cursor rules?
Same content, different reader. Keep one source: make AGENTS.md canonical and generate the per-tool files from it.