formatter-development

formatter-development is a skill for Claude Code, Codex from biomejs/biome. It costs 57 tokens per session (1,148 once invoked), scanned A, original, Apache-2.0.

Guidance for changing how Biome formats source code, including layout choices, comments, syntax nodes, tests, and comparisons with Prettier. A formatter rewrites code into a consistent layout without changing its intended meaning.

In plain words
What is it for?
Use it when implementing or debugging Biome formatter behavior, formatting rules, comment handling, verbatim sections, formatter tests, or generated formatter code.
Why use it?
It helps preserve syntax and comments while making the smallest safe formatting change. Focused tests help catch differences in valid, malformed, and commented code.

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/formatter-development
Any agent
npx skills add biomejs/biome --skill formatter-development
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 formatter-development

README.md
[![agentmods](https://agentmods.dev/badge/skills/biomejs/biome/formatter-development.svg)](https://agentmods.dev/skills/biomejs/biome/formatter-development)
Your own site
<a href="https://agentmods.dev/skills/biomejs/biome/formatter-development"><img src="https://agentmods.dev/badge/skills/biomejs/biome/formatter-development.svg" alt="Measured on agentmods" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,148 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.00057 $0.01148
Opus 5 $0.00028 $0.00574
Sonnet 5 $0.00011 $0.00230
Haiku 4.5 $0.00006 $0.00115

Measured today against content hash 73b9dbd37b58, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

formatter-development 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 today.

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/formatter-development/SKILL.md · 112 lines

How it starts

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

Formatter Development

Use crates/biome_formatter/CONTRIBUTING.md and the language formatter's guide as the canonical architecture references. Inspect neighboring node implementations before selecting IR primitives.

Workflow

  1. Reproduce the behavior with a focused internal formatter spec or quick_test.
  2. Inspect the node fields, comments, and nearby formatting rules.
  3. Implement the smallest layout change using formatter IR.
  4. Run focused formatter tests and inspect snapshots.
  5. Compare with Prettier when compatibility is relevant.
  6. Format and lint before committing.

Node Rules

Generated node rules implement FormatNodeRule. In fmt_fields:

  • destructure the generated *Fields type explicitly;
  • format source tokens through their typed accessors;
  • use _ for an intentionally ignored field rather than ..;
  • preserve every token and comment unless the formatter contract intentionally replaces it;
  • keep layout decisions near the type that owns them.

format_verbatim_* methods preserve a node's source text. Replace verbatim formatting with structured formatting only when tests cover valid, malformed, and commented forms of the node.

Token Rules

Format, replace, or remove every token. Formatter tests panic when a token is not handled, preventing accidental source loss.

Use format_replaced when substituting a token and format_removed when removing one.

Ad-Hoc Formatting

Format a node through node.format() when possible. Its regular rule checks formatter-suppression comments as part of normal formatting.

When a helper formats a node or its tokens outside FormatNodeRule, run the formatter tests. If the suppression-check assertion reports a node, call f.context().comments().mark_suppression_checked(node.syntax()) for that reported node. The assertion shows that the helper bypasses the node's normal suppression check.

IR Composition

Use semantic IR rather than writing whitespace as arbitrary text:

  • space() for required spaces;
  • soft line breaks for optional wrapping;
  • hard line breaks for mandatory breaks;
  • groups to choose flat versus expanded layout;
  • indentation primitives matching the enclosing construct;
  • conditional content tied to the group whose fit decision controls it.

Read the full file on GitHub · 112 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. today Changed · +7 lines · +1 tokens per session 73b9dbd37b58
  2. 4d ago First seen · 105 lines · 56 tokens per session scan A b52cda40e3a9

Subscribe to this mod's changes

formatter-development is a skill published in the GitHub repository biomejs/biome (25,705 stars, last pushed today), licensed Apache-2.0. It adds 57 tokens to every session and 1,148 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