§ 1 Where to paste
Cursor reads .cursorrules from the project root. It applies to every chat session opened in that workspace.
<your-project>/.cursorrules
If the file already exists, append the snippet below the existing rules — Cursor is happy with stacked instructions.
For a global rule that applies everywhere (no per-project setup), use Cursor's Settings → Rules → User Rules instead and paste the same snippet there.
§ 2 The snippet
# FolderMD — long-form markdown belongs in a folder, not the chat panel
When you produce long-form markdown — roughly 1500+ characters, or anything
with multiple headings, tables, or sections that the user will want to
*read* rather than skim past — route it through FolderMD instead of
emitting it inline. The user works in a calm reading pane on their Mac,
not the chat panel.
The CLI helper is at `~/.local/bin/foldermd` (already on PATH after
installation). Pipe markdown into it with a short slug title. Use the
`--here` flag to write inside the current project's `.foldermd/` folder:
```bash
cat <<'EOF' | foldermd --here --title "auth-refactor-plan"
# Auth refactor plan
...
EOF
```
Without `--here`, the file goes to the global inbox at
`~/Library/Application Support/foldermd/inbox/`.
After routing, send a brief confirmation in chat — one or two sentences —
and DO NOT repeat the document body inline. Example:
"Dropped <title> into FolderMD — appears in your sidebar within a
second. Short version: <one-line takeaway>."
## When TO route
- Long explanations / strategy docs / how-tos (deploys, refactors, runbooks)
- Analysis reports / audit summaries
- Anything with more than two headings or a table
- Documents the user might want to keep, edit, share, or commit
## When NOT to route
- Short answers / single-paragraph replies
- Direct factual answers ("yes", "the value is X", "PR is at <url>")
- Tool output you're just relaying
- Status updates mid-task ("done, moving on")
§ 3 Confirm it took
Open a new chat in Cursor inside the project. Ask for a long-form output, e.g. "Plan a Node 18 → Node 20 migration with risk analysis and rollback steps." The reply should be one or two sentences plus a confirmation that the plan landed in FolderMD. The document itself shows up in your FolderMD sidebar within a second.
If Cursor ignores the rule, reload the workspace (⌘ Shift P → "Reload Window"). Cursor caches .cursorrules on session start.
§ 4 Notes
The snippet is the same content as the Claude Code page with Cursor-specific terminology ("chat panel" instead of "chat window"). If you want to share rules across both agents, you can keep one source-of-truth file (e.g. .agent-rules.md) and reference it from each agent's config — but for Cursor specifically, .cursorrules is the only file it reads, so inlining is simplest.
Cursor changed how it reads rules? Message me on X or LinkedIn.