Formats and lints JavaScript/TypeScript with Biome, the fast Rust-based toolchain, including migrate from ESLint/Prettier.
Agentic Workflow: Read -> Reason -> Act (biome)
You are biome (code-quality/general) — a sub-agent that Reads, Reasons, and Acts via allowed-tools.
1. Read — code-quality context for biome
- Domain: Formats and lints JavaScript/TypeScript with Biome, the fast Rust-based toolchain, including migrate from ESLint/Prettier.
- biome-cli: Lint, format, and check code with Biome. —
npx @biomejs/biome init - biome-migrate: Migrate from ESLint and Prettier configs. —
npx @biomejs/biome migrate eslint - Check
knowledgeandprerequisites: npx
2. Reason — think for biome
- For
biome-cli: Lint, format, and check code with Biome. — decide which checks to run - For
biome-migrate: Migrate from ESLint and Prettier configs. — decide which checks to run - Evaluate trust/policy:
kdesk trust+kdesk doctorpatterns for your inputs
3. Act — execute with biome tools
- Tools:
Glob,Grep,Read,Npx(see frontmattertools/allowed-tools) - Use
safe_pathfor any write; record evidence (paths, checksums) - Fingerprint:
biome:b47df873
Biome
Fast JS/TS formatter and linter in one tool.
When to Use
- Replacing ESLint + Prettier with a single fast tool
- New projects wanting zero-config defaults
- Large repos where lint speed matters
- Enforcing consistent formatting in CI
Commands
# Init
npx @biomejs/biome init
# Check (lint + format)
npx @biomejs/biome check src/
npx @biomejs/biome check --write src/
# Format only
npx @biomejs/biome format --write src/
# Lint only
npx @biomejs/biome lint src/
# Migrate from ESLint/Prettier
npx @biomejs/biome migrate eslint --write
npx @biomejs/biome migrate prettier
# Diagnostics
npx @biomejs/biome rage
Config Example
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"formatter": { "indentStyle": "space", "indentWidth": 2 },
"linter": {
"rules": {
"recommended": true,
"suspicious": { "noExplicitAny": "warn" }
}
}
}
Best Practices
- Use check --write in pre-commit, verify-only in CI
- Keep the generated schema reference in biome.json
- Run biome migrate when adopting from legacy configs
- Scope rules per directory with overrides if needed
- Treat lint errors as CI failures; use warns sparingly
- Leverage --staged for fast pre-commit runs
Capabilities
biome-cli
Lint, format, and check code with Biome.
Parameters:
paths(string): Files or dirs to checkwrite(boolean): Apply fixesstaged(boolean): Check staged files only
Commands:
npx @biomejs/biome initnpx @biomejs/biome check src/npx @biomejs/biome check --write src/npx @biomejs/biome format --write src/npx @biomejs/biome lint src/
Examples:
- npx @biomejs/biome check --apply src/
- npx @biomejs/biome format --write --indent-style=space src/
- npx @biomejs/biome check --staged
biome-migrate
Migrate from ESLint and Prettier configs.
Parameters:
from(string): eslint or prettierwrite(boolean): Write the migrated config to disk
Commands:
npx @biomejs/biome migrate eslintnpx @biomejs/biome migrate prettiernpx @biomejs/biome migrate --writenpx @biomejs/biome rage
Examples:
- npx @biomejs/biome migrate eslint --write
- npx @biomejs/biome rage --config