add-docs-page

A writing rule for new MDX documentation files. MDX is Markdown with support for interactive components, and this rule covers pages added to the documentation site.

In plain words
What is it for?
Adding guides or other documentation pages while keeping the site’s structure, sidebar, notes, tabs, and style consistent.
Why use it?
It reminds contributors about the required page location, layout, formatting, links, navigation, and local testing steps.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/dmno-dev/varlock/add-docs-page
Clone the repo
git clone --depth 1 https://github.com/dmno-dev/varlock

Made for: Cursor.

Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 376 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00376
Opus 5 $0.00000 $0.00188
Sonnet 5 $0.00000 $0.00075
Haiku 4.5 $0.00000 $0.00038

Measured 2d ago against content hash ce94f7dc9a99, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

add-docs-page scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/add-docs-page.mdc · 46 lines

What it actually says

filters:

Applies to all new .mdx files in the docs directory

  • type: file_extension pattern: ".mdx$"
  • type: event pattern: "file_create"
  • type: path pattern: "packages/varlock-website/src/content/docs/*/"

actions:

  • type: suggest message: | When adding a new documentation page:

    • Follow all requirements in the [docs-location] rule for file placement, naming, and sidebar navigation.
    • Additionally, follow these style and content conventions:
      • Use the same heading structure, intro, and code block formatting as other guides.
      • Use Starlight's Markdown asides (triple colon syntax) for notes, tips, cautions, and warnings (see docs).
      • Use Astro Starlight tab components for alternative instructions (e.g., package manager differences).
      • Reference and link to other docs where relevant.
      • Test the docs site locally to ensure the new page appears in the sidebar and is accessible.

examples:

  • input: | Used > for notes and tips in the new guide. output: | Use Starlight's Markdown asides (triple colon syntax, e.g., :::tip ... :::) for notes and tips.

  • input: | Added a new guide but did not follow the directory or sidebar requirements. output: | See the [docs-location] rule for correct file placement and sidebar navigation requirements.

metadata: priority: high version: 1.0

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 46 lines · 0 tokens per session scan A ce94f7dc9a99

Subscribe to this mod's changes

add-docs-page is a cursor rule published in the GitHub repository dmno-dev/varlock (4,238 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 376 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.