type-inference

type-inference is a skill for Claude Code from biomejs/biome. It costs 78 tokens per session (2,051 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 Code

Written for Claude Code: installed under .claude/.

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 · 25,715 stars · on GitHub · biomejs.dev

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

Made for: Claude Code.

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.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.svg" alt="Measured on agentmods" 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,051 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.1 $0.00078 $0.02051
Opus 5 $0.00039 $0.01026
Sonnet 5 $0.00016 $0.00410
Haiku 4.5 $0.00008 $0.00205

Measured 6d ago against content hash 0a5c91a33593, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 6d 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/type-inference/SKILL.md · 213 lines

How it starts

The opening of the file, as written. The whole thing — 213 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, 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.

Do not use these checked-in files as current examples:

  • crates/biome_js_type_info/src/resolver.rs
  • crates/biome_js_type_info/src/flattening.rs
  • crates/biome_js_type_info/src/type.rs
  • crates/biome_js_type_info/src/conditionals.rs
  • crates/biome_js_type_info/src/helpers.rs
  • crates/biome_module_graph/src/js_module_info/module_resolver.rs

They are not declared by the active crate module trees. Treat them as legacy residue unless the task explicitly concerns removing or migrating them.

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.

Read the full file on GitHub · 213 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. 6d 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 (25,715 stars, last pushed today), licensed Apache-2.0. It adds 78 tokens to every session and 2,051 once invoked, about $0.0004 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.