biome: Skill for Claude Code

.agents/skills/syntax-text-handling/SKILL.md

syntax-text-handling is a skill for Claude Code, Codex from biomejs/biome. It costs 0 tokens per session (1,364 once invoked), scanned A, original, Apache-2.0.

A guide for safely reading and storing source text from Biome's syntax trees, which represent parsed code. It covers tokens, quoted strings, source ranges, and embedded values such as HTML attributes.

In plain words
What is it for?
Working with syntax tokens and nodes, extracting quoted or embedded text, preserving comments and trivia, and diagnosing text or range handling problems.
Why use it?
It helps developers preserve the original source correctly and avoid bugs involving whitespace, ownership, text ranges, or temporary data.

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/syntax-text-handling/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 syntax-text-handling

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/biomejs/biome/syntax-text-handling"><img src="https://agentmods.dev/badge/skills/biomejs/biome/syntax-text-handling.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,364 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.00000 $0.01364
Opus 5.5 $0.00000 $0.00546
Sonnet 5.5 $0.00000 $0.00273
Haiku 4.5 $0.00000 $0.00136

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

Security

Grade A, and why

syntax-text-handling 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 7d 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/syntax-text-handling/SKILL.md · 124 lines

How it starts

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

Syntax Text Handling

Use typed syntax APIs and preserve source ownership instead of converting syntax text into strings.

Inspect Before Implementing

Do not infer an AST shape from source spelling. Inspect the parser quick test for the language and search generated node definitions and existing consumers. Load testing-codegen for the current quick-test command.

Check every relevant union member and framework-specific value representation. Similar source syntax may use different typed nodes.

Traversal

Before walking a subtree, scanning tokens or trivia, or writing an analyzer Visitor, read references/traversal.md. It covers preorder_of_kinds, skip_subtree, borrowed_tokens, and the visited_kinds contract every custom Visitor implements.

Text Accessors

API Result Use
SyntaxToken::text_trimmed() &str Borrow token text without leading or trailing trivia
SyntaxToken::token_text_trimmed() TokenText Retain token-backed text without trivia
SyntaxToken::text() &str Exact source text including trivia
SyntaxNode::text_trimmed() node text Diagnostics or display where interior trivia is intentional
inner_string_text(token) free helper TokenText Quote-stripped token content
HtmlString::inner_string_text() SyntaxResult<TokenText> Quote-stripped content from a typed HTML string node

SyntaxNode::text_trimmed() removes only outer trivia. Whitespace and comments between child tokens remain, so it is not a semantic accessor for a multi-token node. Prefer a typed token, typed accessor, or structural match.

Do not call .to_string(), .to_trimmed_string(), or format! merely to compare syntax text. Borrow a &str or retain a TokenText.

Quoted Strings

Use the syntax crate's inner_string_text() implementation. It handles the language's token representation and returns token-backed text.

let string = value.as_html_string()?;
let inner = string.inner_string_text().ok()?;
let matches_handler = inner.text() == "handler";

Read the full file on GitHub · 124 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 7d ago Changed · +7 lines · -73 tokens per session 1a71deb9f3d4
  2. 1mo ago Changed · +16 lines · +5 tokens per session f9c8825cc4d2
  3. 1mo ago First seen · 101 lines · 68 tokens per session scan A c76166ceaeeb

Subscribe to this mod's changes

syntax-text-handling is a skill published in the GitHub repository biomejs/biome (26,016 stars, last pushed today), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,364 tokens. 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.