biome: Skill for Claude Code

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

syntax-text-handling is a skill for Claude Code from biomejs/biome. It costs 73 tokens per session (1,200 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 Code

Written for Claude Code: installed under .claude/.

This is biomejs/biome's own configuration. It tells Claude Code 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 · 25,717 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/.claude/skills/syntax-text-handling/SKILL.md
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 syntax-text-handling

README.md
[![agentmods](https://agentmods.dev/badge/skills/biomejs/biome/syntax-text-handling.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 73 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,200 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.
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.00073 $0.01200
Opus 5 $0.00036 $0.00600
Sonnet 5 $0.00015 $0.00240
Haiku 4.5 $0.00007 $0.00120

Measured 2d ago against content hash f9c8825cc4d2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 2d 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/syntax-text-handling/SKILL.md · 117 lines

How it starts

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

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";

Do not strip quotes with byte slicing. Besides allocating or risking invalid boundaries, manual slicing duplicates language-specific behavior already covered by the accessor and its tests.

Read the full file on GitHub · 117 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. 2d ago Changed · +16 lines · +5 tokens per session f9c8825cc4d2
  2. 7d 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 (25,717 stars, last pushed today), licensed Apache-2.0. It adds 73 tokens to every session and 1,200 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.