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.
npx agentmods add rules/consensys/doc.linea/markdown-formattinggit clone --depth 1 https://github.com/Consensys/doc.lineaWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.00741 |
| Opus 5 | $0.00000 | $0.00370 |
| Sonnet 5 | $0.00000 | $0.00148 |
| Haiku 4.5 | $0.00000 | $0.00074 |
Grade A, and why
markdown-formatting 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.
How it starts
The opening of the file, as written. The whole thing — 87 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Markdown formatting
File format
- Use
.mdxfor all pages underdocs/(not.md), so React components and Docusaurus elements (like<Tabs>) render correctly. This rule doesn't apply to root-level files such as this repo's ownREADME.mdx/CONTRIBUTING.md. - Prefer HTML-like formatting over plain Markdown syntax for elements like tables (use
<table>rather than pipe/dash Markdown tables). Several elements already require HTML syntax (<Tabs>, images), so using it everywhere avoids mixing both styles on one page.
Line wrapping
- Default to US English usage.
- Respect the 100-character line limit from
.editorconfig. Use the full 100 characters before wrapping. Don't break lines early at convenient points, and only wrap when a line would actually exceed the limit. - Never break words or URLs when wrapping a line.
- Use semantic line breaks: start each new sentence on a new line, even when it would still fit within the 100-character limit on the previous line. This is independent of the wrap rule above and keeps future diffs scoped to the sentence that changed.
Headings
- Don't add a top-level
# Headingunless you want the rendered page heading to read differently from the frontmattertitle(Docusaurus pullstitlefor the sidebar label, not the H1).
Frontmatter
Every page needs YAML frontmatter with at least title and description:
---
title: Title of the article
description: Description of the article
---
Don't add an image field manually: the social card is generated automatically on build.
Links
- Link to other docs pages with site-relative paths and no
.mdxextension (for example,./transaction-finality, not./transaction-finality.mdx). - The
](/pattern is an absolute link;](./and](../are relative links. Prefer relative links within the same tab. - Use descriptive link text embedded in the sentence. Don't use "click here" or a bare URL.
- If you move or rename a page, see
.cursor/rules/contributor-workflow.mdcfor theredirects.jsonrequirement.
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.
- 2d ago First seen · 87 lines · 0 tokens per session scan A 216635ed4c46
markdown-formatting is a cursor rule published in the GitHub repository Consensys/doc.linea (474 stars, last pushed 5d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 741 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.
Other cursor rules, from other repositories
documentation
Documentation discovery index for Lineth monorepo.
code-patterns
Python code style and recurring patterns (config, logging, errors, paths).
project-overview
Core project architecture, patterns, and conventions for the AI Documentation Generator.
creating-cursor-rules
Meta-rule for creating effective Cursor IDE rules with best practices, patterns, and examples.
performance
Remember: Premature optimization is the root of all evil. Profile first, optimize what matters, and keep solutions maintainable.
core
Rails 8 Core Principles Guide.