biome: Skill for Claude Code

.agents/skills/type-inference/SKILL.md

type-inference is a skill for Claude Code, Codex from biomejs/biome. It costs 78 tokens per session (2,021 once invoked), scanned A, original, Apache-2.0.

A specialist guide for Biome's JavaScript and TypeScript type-inference code, including how source types are collected, inferred, cached, and tested. Salsa is the system Biome uses to track dependencies and reuse computed results.

In plain words
What is it for?
Changing type inference, analyzer requests, import or cycle resolution, profiling, invalidation tests, and inferred data structures.
Why use it?
It directs changes to the correct architecture guides and tests, reducing the risk of breaking inference or using outdated implementation patterns.

Skill for Claude CodeCodex

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

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/type-inference/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 type-inference

README.md
[![agentmods](https://agentmods.dev/badge/skills/biomejs/biome/type-inference/github.svg)](https://agentmods.dev/skills/biomejs/biome/type-inference)
Your own site
<a href="https://agentmods.dev/skills/biomejs/biome/type-inference"><img src="https://agentmods.dev/badge/skills/biomejs/biome/type-inference/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 type-inference

Your own site · 80×15
<a href="https://agentmods.dev/skills/biomejs/biome/type-inference"><img src="https://agentmods.dev/badge/skills/biomejs/biome/type-inference.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,021 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.00078 $0.02021
Opus 5.5 $0.00031 $0.00808
Sonnet 5.5 $0.00016 $0.00404
Haiku 4.5 $0.00008 $0.00202

Measured 12d ago against content hash c9a7a515a410, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

type-inference 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 12d 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/type-inference/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.

Salsa-Backed Type Inference

Scope

Use this skill for JavaScript and TypeScript type inference: raw collection, Salsa-backed inferred values, analyzer requests, tracked queries, and inference-specific tests.

Load the corresponding skill for general lint scaffolding, diagnostics, snapshots, or changesets. CSS and HTML module-graph data is outside this skill unless it directly participates in JavaScript or TypeScript inference.

Read the Relevant Guide

Do not load both architecture guides in full for every inference task. Read the sections matching the boundary being changed:

Task Canonical guide
Raw and inferred representations, collection, inference layers, handles, normalization, work limits biome_js_type_info/CONTRIBUTING.md
Analyzer requests, tracked queries, resolution contexts, widening, profiling, Salsa execution tests biome_module_graph/CONTRIBUTING.md

Read both guides when changing the architecture across their boundary. Then inspect the implementation files for the specific request, query family, or representation being changed.

Mental Model

Type inference has five layers:

syntax and semantic collection
    -> raw module tables
    -> analyzer-facing requests
    -> tracked Salsa queries
    -> resolver helpers

Collection walks one module without database access. It records raw types, expressions, and binding types in JsModuleInfo. A request defines one analyzer-facing result contract. Tracked queries provide memoization and invalidation boundaries. Resolver helpers evaluate references and inferred structures inside those boundaries.

Keep the three type worlds distinct:

World Main types Purpose
Raw collector TypeData / RawTypeData, TypeReference, RawTypeId, TypeStore Module-local syntax, declarations, imports, and deferred expressions
Database-backed InferredTypeData<'db>, LocalTypeHandle, GlobalTypeId Inferred values and module ownership in tracked computations
Analyzer-facing InferredType<'db> Conservative, bounded inspection for lint rules

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. 12d ago Changed · -12 lines c9a7a515a410
  2. 28d ago Changed · +8 lines a9327bc600bf
  3. 1mo ago First seen · 213 lines · 78 tokens per session scan A 0a5c91a33593

Subscribe to this mod's changes

type-inference is a skill published in the GitHub repository biomejs/biome (26,016 stars, last pushed today), licensed Apache-2.0. It adds 78 tokens to every session and 2,021 once invoked, about $0.0003 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.