doc.linea AGENTS.md

Repository instructions for Linea documentation, a Docusaurus website that explains the Linea blockchain and its operator stack. They describe the documentation areas, terminology, design rules, and evidence required for technical claims.

In plain words
What is it for?
Use them when editing network, protocol, stack, API, changelog, or website-component documentation and when checking terminology, source references, and design-token usage.
Why use it?
They help coding agents place changes correctly and avoid inventing API behavior, protocol details, names, or visual styles.

Instructions file for CodexOpenCode

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 instructions/consensys/doc.linea/agents-md
Clone the repo
git clone --depth 1 https://github.com/Consensys/doc.linea

Made for: Codex, OpenCode.

Per session 879 This file is loaded in full into every session.
When invoked 879 The same file — it is already loaded in full.
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.00879 $0.00879
Opus 5 $0.00439 $0.00439
Sonnet 5 $0.00176 $0.00176
Haiku 4.5 $0.00088 $0.00088

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

Security

Grade A, and why

doc.linea AGENTS.md 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.

AGENTS.md · 65 lines

How it starts

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

AI Agent Instructions

Rules for AI coding agents (Claude Code, GitHub Copilot, Cursor, Codex, etc.) working on this Docusaurus v3 documentation site, docs.linea.build.

Repository areas

Tab Directory Documents
Linea Mainnet docs/network Linea Mainnet
Lineth Stack docs/stack Lineth (the operator stack)
Protocol docs/protocol Lineth (the protocol)
Reference docs/api Linea and Lineth
Changelog docs/changelog Linea and Lineth

See README.mdx for full tab descriptions, audiences, and the src/ component/theme layout.

Critical rules

  1. Do not invent protocol or API behavior. Never state as fact any parameter, return value, or behavior you haven't verified against source code, a spec, or another authoritative reference. If uncertain, mark it [VERIFY] (see editorial-voice.mdc).
  2. Use Linea and Lineth precisely. They're related but distinct terms. Check /protocol/linea-vs-lineth before asserting which one applies to a claim, and don't guess from memory. See .cursor/rules/terminology.mdc.
  3. Never hardcode brand colors, spacing, or radii in src/. Use the var(--linea-*) design tokens in src/css/tokens.css. See .cursor/rules/css-styling.mdc.
  4. Verify before requesting review. Preview locally with npm run start, and confirm npm run build succeeds.
  5. Pass CI. PRs run ESLint/Stylelint, TypeScript, Vale spelling/style, and link checking. Fix warnings before requesting review; see Quality checks before pushing.

AI guidance

Detailed rules live in .cursor/rules/ and apply automatically in Cursor when editing a file matching their globs. Other agents should read the relevant file directly before editing matching content:

Rule file Applies to Covers
content-structure.mdc docs/**/*.{md,mdx} Tab/audience/tone, page structure
editorial-voice.mdc docs/**/*.{md,mdx} Voice, heading style, [VERIFY] markers
terminology.mdc docs/**/*.{md,mdx} Casing, Linea/Lineth naming, component capitalization
markdown-formatting.mdc docs/**/*.{md,mdx} Frontmatter, links, line wrapping, images
contributor-workflow.mdc repo-wide Issue-first workflow, redirects, PR hygiene
css-styling.mdc src/**/*.{css,tsx,jsx,ts,js} CSS architecture, design tokens, forbidden patterns

Read the full file on GitHub · 65 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 · 65 lines · 879 tokens per session scan A 9eb057dfb62e

Subscribe to this mod's changes

doc.linea AGENTS.md is an instructions file published in the GitHub repository Consensys/doc.linea (474 stars, last pushed 6d ago), licensed Apache-2.0. It adds 879 tokens to every session, about $0.0044 per session on Opus 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.