AGENT SKILL

biome

暂无简介

License 许可
MIT
最近更新
2026-07-07
Stars
★ 0
Forks
0

03 SKILL.md 正文

Biome Skill

Fast formatter and linter for JavaScript, TypeScript, JSX, and more.

Setup for Bun CLI Projects

tsconfig.json

For Bun projects (not Node), configure TypeScript to use Bun's types:

{
  "compilerOptions": {
    "target": "ES2020",
    "module": "ES2020",
    "lib": ["ES2020"],
    "jsx": "react-jsx",
    "moduleResolution": "bundler",
    "types": ["bun", "react"],
    "strict": true,
    "skipLibCheck": true,
    "rootDir": "./src",
    "outDir": "./dist"
  },
  "include": ["src/**/*"],
  "exclude": ["node_modules"]
}

Key points:

  • types: ["bun", "react"] — Use Bun's native types (fs, path, process) instead of Node
  • moduleResolution: "bundler" — Bun's resolution strategy
  • No @types/node needed for Bun

biome.json

Basic Biome config for TypeScript/React:

{
  "organizeImports": {
    "enabled": true
  },
  "linter": {
    "enabled": true,
    "rules": {
      "recommended": true,
      "suspicious": {
        "noImplicitAnyLet": "error"
      }
    }
  },
  "formatter": {
    "enabled": true,
    "indentStyle": "space",
    "indentSize": 2,
    "lineWidth": 100
  }
}

package.json Scripts

{
  "scripts": {
    "lint": "biome lint --apply src/",
    "format": "biome format --write src/",
    "check": "biome check src/"
  }
}

Common Patterns

Strict Mode

Enable strict type checking:

{
  "compilerOptions": {
    "strict": true,
    "noImplicitAny": true,
    "strictNullChecks": true,
    "strictFunctionTypes": true
  }
}

React JSX

For React with Biome:

{
  "compilerOptions": {
    "jsx": "react-jsx",
    "jsxImportSource": "react"
  }
}

Exclude Patterns

Keep node_modules and build artifacts out of checks:

{
  "include": ["src/**/*"],
  "exclude": ["node_modules", "dist", "build", ".claude"]
}

Edge Cases & Gotchas

Biome + Prettier Conflicts

Problem: Both tools try to format, resulting in conflicts

Symptom:

biome check  # Fails because Prettier already formatted differently

Solution:

  • Use only Biome (preferred)
  • Or: disable Biome formatting, use Prettier only
{
  "formatter": {
    "enabled": false  // Let Prettier handle formatting
  },
  "linter": {
    "enabled": true   // Biome handles linting
  }
}

Biome + ESLint Compatibility

Problem: ESLint and Biome have conflicting rules

Symptom:

eslint . --fix  # Formats one way
biome format . --write  # Reformats differently

Solution:

  • Remove ESLint if using Biome (don't mix)
  • Biome replaces ESLint + Prettier
# Pick one:
biome check && biome format --write  # Biome only
# OR
eslint . --fix && prettier --write  # ESLint + Prettier
# NOT both

Format-on-Save + Git Hooks Conflict

Problem: IDE formats on save, pre-commit hook formats again

Symptom:

1. Save file in VSCode (biome formats)
2. git commit
3. Pre-commit hook runs biome format
4. Changes happen after you saved, confusing

Solution:

// .vscode/settings.json
{
  "[javascript]": {
    "editor.defaultFormatter": "biomejs.biome",
    "editor.formatOnSave": false  // Let pre-commit handle it
  }
}
#!/bin/bash
# .git/hooks/pre-commit
biome check --apply-unsafe
git add -A

VSCode Extension Version Mismatch

Problem: VSCode extension version doesn't match project's Biome version

Symptom:

VSCode: Biome 1.8.2
Project: Biome 1.7.3
# Linting rules don't match

Solution:

# Lock extension version
# In .vscode/extensions.json or settings.json
{
  "recommendations": [
    "biomejs.biome@1.8.2"
  ]
}

Anti-Patterns

❌ Don't: Mix Biome and ESLint

{
  "extends": ["eslint:recommended"],
  "plugins": ["eslint-plugin-biome"]  // Redundant!
}
{
  "linter": {
    "enabled": true
  }
  // Use Biome alone
}

❌ Don't: Run format and lint separately

# Bad: two commands, easy to forget one
biome check
biome format --write
git add .
# Good: single command
biome check --apply-unsafe  # Check + fix in one
git add .

❌ Don't: Ignore Biome warnings in CI

# Bad: CI allows failures
biome check || true
git push
# Good: CI blocks on failures
biome check
# Exit code 1 if issues, blocks push

Troubleshooting

"Cannot find name 'fs'" → Missing types: ["bun"] in tsconfig.json

"Cannot find name 'process'" → Same issue, add the types field

ESLint conflicts → Biome is a drop-in replacement; remove ESLint config

Slow builds → Use biome check for faster validation, biome format --write only when needed

04 同仓库更多 Skills

killallservers
killallservers/agentic

hono

Ultrafast, lightweight web framework for building APIs and full-stack applications on Bun. Use Hono whenever you need to build HTTP APIs, serverless functions, or full-stack apps with type-safe routing, middleware, authentication, and database integration. Covers routing patterns, middleware (auth, CORS, compression), Drizzle ORM integration, validation, file uploads, JSX rendering, and deployment on Bun.

★ 0
killallservers
killallservers/agentic

drizzle-orm

Generate Drizzle ORM 1.x code for Bun SQLite. Use this whenever a user mentions Drizzle, databases, schemas, queries, or needs help with database code. Covers schema generation, type-safe queries, Relational Queries v2, migrations (Folders v3), relations, and setup — all for Drizzle 1.x (use latest beta if not released). Always use this skill when the user is working with Drizzle on Bun or needs database code generation in TypeScript.

★ 0
killallservers
killallservers/agentic

bun

Fast JavaScript runtime and all-in-one toolchain for building and deploying applications. Use Bun for package management, running TypeScript/JSX directly, testing, bundling, building HTTP servers with Bun.serve(), managing workspaces, and CLI tooling. Covers monorepos, workspace dependencies, streaming, WebSocket support, and deployment.

★ 0
killallservers
killallservers/agentic

biome

Fast formatter and linter for TypeScript, JavaScript, and JSX. Use this skill whenever you need to configure Biome (biome.jsonc), set up linting/formatting, migrate from ESLint/Prettier, fix code style issues, or optimize TypeScript project tooling. Always include biome commands in package.json scripts so the team has consistent, discoverable commands.

★ 0
killallservers
killallservers/agentic

hono

暂无简介

★ 0
killallservers
killallservers/agentic

drizzle

暂无简介

★ 0