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.
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.
curl -O https://raw.githubusercontent.com/biomejs/biome/main/.claude/skills/syntax-text-handling/SKILL.mdgit clone --depth 1 https://github.com/biomejs/biomeWrote 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.
[](https://agentmods.dev/skills/biomejs/biome/syntax-text-handling)<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>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.
| Model | Per session | Once 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 |
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.
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.
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.
- 2d ago Changed · +16 lines · +5 tokens per session f9c8825cc4d2
- 7d ago First seen · 101 lines · 68 tokens per session scan A c76166ceaeeb
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.
Other skills, from other repositories
Biome
Biome 2.x — fast all-in-one web toolchain in Rust. Formats, lints, assists. Replaces Prettier + ESLint.
prettier-docs
Prettier 3.9.5 — opinionated code formatter. CLI, API, config, plugins, editor integration, CI.
migrate-oxfmt
Guide for migrating a project from Prettier or Biome to Oxfmt. Use when asked to migrate, convert, or switch a JavaScript/TypeScript project's formatter from Prettier or Biome to Oxfmt.
ultracite
Ultracite is a zero-config linting and formatting preset for JavaScript/TypeScript projects. Use when: (1) Setting up or initializing Ultracite in a project (ultracite init), (2) Running linting or formatting commands (check, fix, doctor), (3) Writing or reviewing JS/TS code in a project that uses Ultracite — to…
babel-docs
Babel 7.x/8.x — plugins, presets, config, @babel/core, parser, traverse, types, CLI, preset-env.
swc-docs
SWC 1.x — Rust-based JS/TS compiler. @swc/cli, @swc/core, .swcrc config, preset-env, minification, plugins.