biome: Skill for Claude Code

.agents/skills/testing-codegen/SKILL.md

testing-codegen is a skill for Claude Code, Codex from biomejs/biome. It costs 45 tokens per session (1,511 once invoked), scanned A, original, Apache-2.0.

Project guidance for testing and generating code in Biome, a code formatter and checker. It explains how to choose focused tests, inspect snapshot changes, check for unused snapshots, and run required generators.

In plain words
What is it for?
Use it when changing Biome lint rules, crates, parsers, formatters, command-line migrations, or documentation tests, and when updating snapshots or checking for orphaned ones.
Why use it?
Large test runs can be slow and snapshot updates can hide incorrect expectations. These instructions help select an appropriate test and require reviewing generated or recorded output before accepting it.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents); mentions AGENTS.md.

This is biomejs/biome's own configuration. It tells Claude Code and Codex how to work on biome itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything biome configures →

About the project

Biome is a web-development toolchain that formats and checks source code for languages such as JavaScript, TypeScript, JSX, and CSS. Developers use its command-line and language-server interfaces to maintain code quality in web projects. Catalogue add-ons extend workflows around the toolchain.

biomejs/biome · 26,016 stars · on GitHub · biomejs.dev

Reuse

Borrowing it

Nothing to install: this file belongs to biomejs/biome. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/biomejs/biome/main/.agents/skills/testing-codegen/SKILL.md
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 testing-codegen

README.md
[![agentmods](https://agentmods.dev/badge/skills/biomejs/biome/testing-codegen/github.svg)](https://agentmods.dev/skills/biomejs/biome/testing-codegen)
Your own site
<a href="https://agentmods.dev/skills/biomejs/biome/testing-codegen"><img src="https://agentmods.dev/badge/skills/biomejs/biome/testing-codegen/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for testing-codegen

Your own site · 80×15
<a href="https://agentmods.dev/skills/biomejs/biome/testing-codegen"><img src="https://agentmods.dev/badge/skills/biomejs/biome/testing-codegen.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,511 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Snyk pass 7 Sept 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00045 $0.01511
Opus 5.5 $0.00018 $0.00604
Sonnet 5.5 $0.00009 $0.00302
Haiku 4.5 $0.00005 $0.00151

Measured 1mo ago against content hash 7ffb53029932, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

testing-codegen 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 1mo 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/skills/testing-codegen/SKILL.md · 138 lines

How it starts

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

Testing and Code Generation

Choose the narrowest test that exercises the changed behavior, then broaden only when shared infrastructure or integration risk justifies it.

Test Selection

Change Start with
Lint rule just test-lintrule <ruleName>
One crate cargo test -p <crate> or the crate's focused test target
Parser or formatter investigation just qt <package>
CLI migration focused biome_cli migration tests
Documentation code just test-doc

Use -- --show-output or --nocapture only when the test's diagnostic output is needed.

Quick tests are scratch space for inspecting CST, formatter IR, or one analyzer query. Persistent behavior belongs in the subsystem's normal fixture directory before finishing.

Snapshot Workflow

Run the focused test to create pending snapshots. Treat unrelated test failures separately. Never update, add or delete snapshots manually. Let insta do that.

Agents must not run unfiltered cargo insta review; it needs a TTY. In a non-TTY agent shell, cargo-insta 1.44+ prints a filtered --snapshot diff without prompting:

cargo insta pending-snapshots --workspace
cargo insta review --workspace --snapshot '<path-from-list>'

After inspecting the full diff, accept or reject only that snapshot:

cargo insta accept --workspace --snapshot '<same-path>'
cargo insta reject --workspace --snapshot '<same-path>'

Repeat for each change, list pending snapshots again, then rerun the test. Review means checking behavior in the diff. A passing test proves only that output matches the snapshot.

Never use unfiltered cargo insta accept or cargo insta reject, cargo insta test --accept, cargo insta test --force-update-snapshots, or INSTA_UPDATE=always/force. They skip individual review and can modify unrelated work.

Orphaned Snapshots

Do not delete suspected orphan snapshots manually. Deletion is safe only after running the complete workspace snapshot suite without package, target, or test filters:

Read the full file on GitHub · 138 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. 1mo ago Changed 7ffb53029932
  2. 1mo ago Changed · +26 lines 89ccebcdbce7
  3. 1mo ago First seen · 112 lines · 45 tokens per session scan A f15a331e9c73

Subscribe to this mod's changes

testing-codegen is a skill published in the GitHub repository biomejs/biome (26,016 stars, last pushed today), licensed Apache-2.0. It adds 45 tokens to every session and 1,511 once invoked, about $0.0002 per session on Opus 5.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.