doc-comments

doc-comments is a skill for Claude Code, Codex from biomejs/biome. It costs 70 tokens per session (1,958 once invoked), scanned A, original, Apache-2.0.

Guidance for writing Rust comments and documentation comments in the Biome codebase. It explains how to write comments that remain useful to contributors who may read them much later without the original discussion.

In plain words
What is it for?
Use it when adding or editing Rust comments, Rustdoc, or documentation for Biome lint and assist rules.
Why use it?
It prevents comments from depending on missing history or addressing a reviewer instead of explaining the code. It also covers user-facing Rust documentation inside lint and assist rules.

Skill for Claude CodeCodex

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 skills/biomejs/biome/doc-comments
Any agent
npx skills add biomejs/biome --skill doc-comments
Clone the repo
git clone --depth 1 https://github.com/biomejs/biome

Made for: Claude Code, Codex.

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 doc-comments

README.md
[![agentmods](https://agentmods.dev/badge/skills/biomejs/biome/doc-comments.svg)](https://agentmods.dev/skills/biomejs/biome/doc-comments)
Your own site
<a href="https://agentmods.dev/skills/biomejs/biome/doc-comments"><img src="https://agentmods.dev/badge/skills/biomejs/biome/doc-comments.svg" alt="Measured on agentmods" height="20"></a>
Per session 70 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,958 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.00070 $0.01958
Opus 5 $0.00035 $0.00979
Sonnet 5 $0.00014 $0.00392
Haiku 4.5 $0.00007 $0.00196

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

Security

Grade A, and why

doc-comments 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 4d 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.

.claude/skills/doc-comments/SKILL.md · 209 lines

How it starts

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

Purpose

Developer-facing comments and doc comments in this repository are read by contributors, months or years after they were written, with none of the context you have right now. This skill defines who that reader is, what each kind of comment is for, and which patterns are banned.

Scope boundary: rustdoc inside declare_lint_rule! / declare_assist_rule! blocks is end-user documentation generated into the website. Load this skill for comment hygiene, but use lint-rule-development for the audience, content structure, examples, and option documentation. Its content rules take precedence for those blocks.

The Reader

For developer-facing comments, write for a Biome contributor who is competent in Rust but has no access to your current context: not this conversation, not the pull request, not the issue, not the diff. They see only the repository at HEAD.

Two consequences follow directly:

  1. Never narrate change history. Words like "now", "previously", "no longer", "the new approach" are meaningless at HEAD, where only one approach exists. State how the code works, not how it came to be.
  2. Never address the reviewer. A comment that argues your change is correct ("this properly handles X") belongs in the PR description, not in the source. The comment must justify the code as it stands, permanently.

Three Kinds of Documentation, Three Different Jobs

Kind Job Contains
//! module docs Explanation Why the module exists, core concepts and terminology, how the pieces relate, design rationale
/// item docs Reference The contract: behavior, inputs and outputs, invariants, panics, errors. Neutral and factual
// inline comments Rationale Only what the code cannot say: constraints, workarounds (with issue links), non-obvious coupling, why the obvious alternative is wrong

Do not mix the jobs. Implementation details do not belong in /// docs — put them as // comments inside the body. The contract does not belong scattered across inline comments — put it on the item.

Read the full file on GitHub · 209 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. 4d ago First seen · 209 lines · 70 tokens per session scan A 0518d3f099c2

Subscribe to this mod's changes

doc-comments is a skill published in the GitHub repository biomejs/biome (25,705 stars, last pushed today), licensed Apache-2.0. It adds 70 tokens to every session and 1,958 once invoked, about $0.0003 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.

Related

Other skills, from other repositories

Biome

Biome 2.x — fast all-in-one web toolchain in Rust. Formats, lints, assists. Replaces Prettier + ESLint.

pledgeandgrow/pledge-skills · 33 tokens

prettier-docs

Prettier 3.9.5 — opinionated code formatter. CLI, API, config, plugins, editor integration, CI.

pledgeandgrow/pledge-skills · 34 tokens

electron-node-upgrade

Guide for performing Node.js version upgrades in the Electron project. Use when working on the roller/node/main branch to fix patch conflicts during e sync --3. Covers the patch application workflow, conflict resolution, analyzing upstream Node.js changes, building, running the Node.js test suite, and proper commit…

electron/electron · 69 tokens

electron-chromium-upgrade

Guide for performing Chromium version upgrades in the Electron project. Use when working on the roller/chromium/main branch to fix patch conflicts during e sync --3. Covers the patch application workflow, conflict resolution, analyzing upstream Chromium changes, and proper commit formatting for patch fixes.

electron/electron · 62 tokens

chrome-release-verify

End-to-end Chrome security backport for an Electron release branch. Given a Chrome Releases blog URL and a branch (e.g. 41-x-y), determines which CVE fixes are missing from the actual synced source, writes the cherry-pick patches locally, validates them with e sync --3 + lint --patches, then pushes a single PR. Use…

electron/electron · 121 tokens

triage-prs

Triage open electron/electron pull requests by CI check status — lists PRs that are green/passing, failing, still pending, or have no checks at all, annotated with their Status on the "PR Triage" project board and with the new-pr label. Can scope to a single named check, e.g. PRs whose "faraday/cage" check is pending.…

electron/electron · 157 tokens