reference-file-standards

A set of writing rules for reference Markdown files used by coding agents. It favors short rules, tables, examples, and links to canonical project documentation.

In plain words
What is it for?
Use it when creating or editing Markdown files in a references directory, especially to structure guidance, record pitfalls, add examples, and keep documentation token-efficient.
Why use it?
It keeps reference files compact and useful, avoiding repeated tutorials and long explanations of standard tools that agents may already understand.

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/meet-miyani/compose-skill/reference-file-standards
Clone the repo
git clone --depth 1 https://github.com/Meet-Miyani/compose-skill

Made for: Cursor.

Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 1,107 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.01107
Opus 5 $0.00000 $0.00553
Sonnet 5 $0.00000 $0.00221
Haiku 4.5 $0.00000 $0.00111

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

Security

Grade A, and why

reference-file-standards 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 3d 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/reference-file-standards.mdc · 119 lines

How it starts

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

Reference File Writing Standards

Every reference file must be token-efficient. Agents already know standard APIs — provide patterns, pitfalls, and project-specific rules, not tutorials.

File Structure

  1. Line 1: # Title — concise topic name
  2. Line 2-3: One-liner scope — what this file covers and when to use it, not a marketing paragraph
  3. Cross-links — point to related canonical files (e.g., "For shared architecture concepts, see architecture.md")
  4. References: block (optional) — external URLs for provenance; keep, they're cheap
  5. No Table of Contents — agents navigate by headings, not TOC lists

Writing Rules

Rule Do Don't
Tables over prose | Issue | Fix | table Multi-paragraph explanations
Rules over explanations State the rule directly Explain "why" unless non-obvious
Examples over descriptions One BAD/GOOD code pair Three paragraphs describing the concept
No tutorial content Show the pattern/pitfall Explain what StateFlow or PagingSource is
One-liner intros "SQLite persistence via Room (KMP-ready since 2.7.0)" "Room is a powerful persistence library that provides an abstraction layer over SQLite..."
Trim filler words Direct statements "It is important to note that...", "In order to...", "You should consider..."

DRY Cross-Referencing

Each concept has ONE canonical home. Other files link to it instead of duplicating.

Concept Canonical home Other files do
MVI ViewModel collection pattern architecture.md § Reactive Data Collection 5-8 line domain stub + cross-link
State modeling (forms, calculators) architecture.md § State Modeling Cross-link
Effect delivery (Channel vs SharedFlow) architecture.md § Effect Delivery Cross-link
Generic test setup (runTest, Turbine) testing.md Domain-specific test factory + cross-link
Koin module patterns koin.md 1-2 line binding example + cross-link
Hilt module patterns hilt.md 1-2 line binding example + cross-link
Nav 3 + DI wiring navigation-3-di.md Condensed example + cross-link

Read the full file on GitHub · 119 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. 3d ago First seen · 119 lines · 0 tokens per session scan A ad56720dfd71

Subscribe to this mod's changes

reference-file-standards is a cursor rule published in the GitHub repository Meet-Miyani/compose-skill (293 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,107 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.