docs-location

docs-location is a cursor rule for Cursor from dmno-dev/varlock. It costs 987 tokens per session, scanned A, original, MIT.

A repository rule for documentation pages written in MDX, a Markdown format that can include interactive components.

In plain words
What is it for?
Use it when creating or organizing documentation pages, guides, integrations, plugins, reference material, and environment specifications.
Why use it?
It prevents documentation files from being placed outside the project’s designated documentation directory and keeps the sidebar structure organized.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when creating or organizing documentation pages, guides, integrations, plugins, reference material, and environment specifications.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/dmno-dev/varlock/docs-location
About the project

Varlock is a configuration system for environment-variable files that gives coding agents schemas and validation rules without revealing secret values. Developers use it to manage, validate, load, and protect application configuration across environments.

dmno-dev/varlock · 4,723 stars · on GitHub · varlock.dev

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.

Clone the repo
git clone --depth 1 https://github.com/dmno-dev/varlock

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for docs-location

README.md
[![agentmods](https://agentmods.dev/badge/rules/dmno-dev/varlock/docs-location/github.svg)](https://agentmods.dev/rules/dmno-dev/varlock/docs-location)
Your own site
<a href="https://agentmods.dev/rules/dmno-dev/varlock/docs-location"><img src="https://agentmods.dev/badge/rules/dmno-dev/varlock/docs-location/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for docs-location

Your own site · 80×15
<a href="https://agentmods.dev/rules/dmno-dev/varlock/docs-location"><img src="https://agentmods.dev/badge/rules/dmno-dev/varlock/docs-location.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 987 This file is loaded in full into every session.
When invoked 987 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00987 $0.00987
Opus 5.5 $0.00395 $0.00395
Sonnet 5.5 $0.00197 $0.00197
Haiku 4.5 $0.00099 $0.00099

Measured 1mo ago against content hash 7654b0fd0ccb, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

docs-location 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 1mo 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/docs-location.mdc · 114 lines

How it starts

The opening of the file, as written. The whole thing — 114 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Documentation Pages Location

Rules for placing and organizing documentation pages in the repository.

actions:

  • type: reject conditions:

    • pattern: "^(?!packages/varlock-website/src/content/docs/.*\.mdx$)" message: "Documentation pages (.mdx) must be placed in the packages/varlock-website/src/content/docs directory"
  • type: suggest message: | When creating documentation pages:

    1. Always place documentation files under packages/varlock-website/src/content/docs/:

      packages/varlock-website/src/content/docs/
      ├── getting-started/
      ├── guides/           # how-to guides (nested by topic in the sidebar)
      ├── integrations/     # frameworks, languages, platforms
      ├── plugins/          # secret backends
      ├── reference/        # CLI + schema language
      └── env-spec/
      
    2. Top-level sections become sidebar tabs (Astro docs pattern), configured in packages/varlock-website/src/sidebar.ts and rendered by TabbedSidebar.astro:

      • Getting Started - Onboarding (keep short)
      • Guides - How-to guides, nested into Core / Encryption and delivery / AI and agents / Ops and migration
      • Reference - CLI, schema language, and @env-spec
      • Ecosystem - Integrations and Plugins (nested catalogs)

      Within a tab, nest subgroups so no level has more than ~8–10 siblings.

    3. File naming:

      • Use kebab-case for filenames
      • Always use .mdx
      • Prefer a parent overview page plus children when a topic has independent H2 sections (CLI command groups, per-sandbox-tool, local vs remote MCP, etc.)
    4. Never place documentation files:

      • In the project root
      • Outside packages/varlock-website/src/content/docs/
      • Under guides/ for Docker (use integrations/docker)
    5. Update the sidebar in packages/varlock-website/src/sidebar.ts:

      • Every page must have a corresponding sidebar entry

      • Add the page under the correct nested subgroup (do not append to a flat 15+ item list)

      • Aim for ≤8–10 siblings at any nesting level

      • Example (page under Guides > Core):

        {
          label: 'Guides',
          items: [
            {
              label: 'Core',
              collapsed: true,
              items: [
                { label: 'Schema', slug: 'guides/schema' },
                { label: 'New Feature', slug: 'guides/new-feature' },
              ],
            },
          ],
        }
        

        Top-level labels must stay one of: Getting Started, Guides, Reference, Ecosystem (they render as the tab switcher). Do not add a fifth top-level group without updating TabbedSidebar.astro icons.

    6. If the page is a plugin or integration, also update homepage tiles in packages/varlock-website/src/lib/works-with-tiles.ts when it should appear on the homepage.

examples:

  • input: |

    Bad: Documentation file in wrong location

    docs/my-guide.mdx my-guide.mdx src/content/my-guide.mdx

    Good: Documentation file in correct location

    packages/varlock-website/src/content/docs/guides/my-guide.mdx output: "Correctly placed documentation file"

  • input: |

    Bad: Flat dump into Guides with 20 siblings

    Added guides/new-ai-thing.mdx at the end of the Guides items array

    Good: Nested under the right subgroup

    Added under Guides > AI and agents in sidebar.ts

    output: "Documentation file nested in the correct sidebar subgroup"

Read the full file on GitHub · 114 lines

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. 1mo ago First seen · 114 lines · 987 tokens per session scan A 7654b0fd0ccb

Subscribe to this mod's changes

docs-location is a cursor rule published in the GitHub repository dmno-dev/varlock (4,723 stars, last pushed today), licensed MIT. It adds 987 tokens to every session, about $0.0039 per session on Opus 5.5. 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.