Token导航 LogoToken导航

Agent Skill · 效率

biome(Biome 代码规范)

biome 用于辅助前端页面、组件、样式和交互逻辑开发,适合在 OpenClaw 中需要维护前端项目、生成组件或检查界面实现时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

biome 是效率类 Agent Skill,可用宿主为 OpenClaw,通过ClawHub获取,权限为操作浏览器;许可证为 MIT-0,第三方扫描已通过,按安装量在效率类的 21,003 个 Skill 里排第 10,649。

总安装 5,052周安装 217GitHub Stars 公开资料未说明下载 1,771核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT-0
版本
0.3.0

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:biome(Biome 代码规范)
来源仓库:https://github.com/tenequm/biome
安装命令:
openclaw skills install biome
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install biome

这个 Skill 是做什么的

效率类 Skill 把重复的整理、汇总、转换工作交给助手完成,减少手工复制粘贴。

Biome前端代码Lint与格式化技能,提供类型感知静态检查能力。支持GritQL自定义规则与导入管理器,平滑迁移ESLint/Prettier配置。集成在开发流程中自动修复语法问题,保持团队代码风格一致性。配置文件需提交至版本库共享,避免本地规则差异导致协作冲突。复杂项目建议分模块渐进式启用,逐步收敛技术债务积累。

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 OpenClaw;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 openclaw skills install biome;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

biome 怎么安装?

在终端执行 openclaw skills install biome。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

biome 支持哪些 AI 工具?

公开资料标注支持 OpenClaw。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

biome 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

biome 是免费的吗?

来源标注的许可证是 MIT-0。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

biome 用的人多吗?

公开数据是累计安装 5,052 次,近一周安装 217 次,下载 1,771 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

biome 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 专注 OpenClaw 一种宿主,触发方式和使用习惯不用来回切换。
  • 许可证明确为 MIT-0,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 OpenClaw,想直接扩展它能力的人。
  • 需要处理效率类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

效率类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
github

GitHub 代码协作 · OpenClaw

7,632,918545需要联网MIT-0通过
nano-pdf

Nano PDF 文档 · OpenClaw

4,249,476231需要联网MIT-0通过
auto-updater

自动更新程序 · OpenClaw

2,964,063386操作浏览器MIT-0通过
video-frames

视频帧 · OpenClaw

2,621,304112需要联网MIT-0通过
gemini

Gemini 助手 · OpenClaw

2,547,39648需要联网MIT-0有提醒
biome

Biome 代码规范 · 本页

5,052—操作浏览器MIT-0通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

name
biome
description
Lint and format frontend code with Biome 2.4. Covers type-aware linting, GritQL custom rules, domains, import organizer, and migration from ESLint/Prettier. Use when configuring linting rules, formatting code, writing custom lint rules, or setting up CI checks. Triggers on biome, biome config, biome lint, biome format, biome check, biome ci, gritql, migrate from eslint, migrate from prettier, import sorting, code formatting, lint rules, type-aware linting, noFloatingPromises.
metadata
version
0.3.1
upstream
@biomejs/biome@2.4.13

Biome

Fast, unified linting, formatting, and import organization for JavaScript, TypeScript, JSX, CSS, and GraphQL. Biome 2.4 provides type-aware linting without the TypeScript compiler, GritQL plugins for custom rules, and domain-based rule grouping. Single binary, zero config by default, 97% Prettier compatibility.

Critical Rules

files.ignore DOES NOT EXIST - use files.includes with negation

Biome 2.x only supports files.includes (with an s). There is NO files.ignore, NO files.include (without s), NO files.exclude. Using any of these will throw Found an unknown key errors.

The only valid keys under files are: includes, maxSize, ignoreUnknown. (experimentalScannerIgnores exists but is now marked deprecated in upstream docs and may be removed.)

To exclude files (generated code, vendored files, etc.), use negation patterns in files.includes:

{
  "files": {
    "includes": ["**", "!**/routeTree.gen.ts", "!**/generated/**"]
  }
}

For paths the scanner must skip even when other tools or assists would otherwise touch them, use the !! force-ignore syntax inside files.includes (replaces experimentalScannerIgnores):

{
  "files": {
    "includes": ["**", "!!**/legacy-vendor/**"]
  }
}

Do NOT use overrides with linter/formatter/assists: { enabled: false } to skip generated files - that approach is fragile (easy to miss a subsystem like assists/import organizer) and unnecessarily complex. Just exclude via files.includes.

Always use biome check, not separate lint + format

biome check runs formatter, linter, and import organizer in one pass. Never call biome lint and biome format separately in CI - use biome check (or biome ci for CI mode).

biome.json lives at project root

Every project needs one biome.json at the root. Monorepo packages use nested configs with "extends": "//" to inherit from root. Never use relative paths like "extends": ["../../biome.json"].

Use --write to apply fixes

biome check --write .            # Apply safe fixes only
biome check --write --unsafe .   # Apply all fixes including unsafe (review changes)

--fix exists as an alias for --write on biome lint and biome format, but biome check is the canonical entry point and --write is the documented flag. Stick with --write.

Safe vs unsafe fixes. Removing unused imports, parameters, and variables is classified as unsafe (an external caller could still reference the symbol). Plain --write will leave them in place and report the diagnostic. Use --write --unsafe (and review the diff) or delete them by hand.

Pin exact versions and migrate after upgrades

pnpm add --save-dev --save-exact @biomejs/biome@latest
pnpm biome migrate --write

The $schema URL in biome.json is version-pinned (e.g. "$schema": "https://biomejs.dev/schemas/2.4.13/schema.json"). After bumping @biomejs/biome, the CLI errors with The configuration schema version does not match the CLI version until you run biome migrate --write. Run it as part of the upgrade, not later.

Quick Start

pnpm add --save-dev --save-exact @biomejs/biome
pnpm biome init    # Creates default biome.json with recommended rules

IDE Setup

VS Code - Install biomejs.biome extension:

{
  "editor.defaultFormatter": "biomejs.biome",
  "editor.formatOnSave": true,
  "editor.codeActionsOnSave": {
    "source.fixAll.biome": "explicit",
    "source.organizeImports.biome": "explicit"
  }
}

source.fixAll.biome applies safe lint fixes on save; source.organizeImports.biome runs the assist. Both are needed for parity with the CLI's biome check --write.

Zed - Biome extension available natively. The inline-config feature (v2.4) lets editors override rules without affecting biome.json. Note the spelling: Zed uses inline_config (snake_case); the VS Code extension uses inlineConfig (camelCase).

{
  "formatter": { "language_server": { "name": "biome" } },
  "lsp": {
    "biome": {
      "settings": {
        "inline_config": {
          "linter": { "rules": { "suspicious": { "noConsole": "off" } } }
        }
      }
    }
  }
}

CI Integration

pnpm biome ci .                                  # No writes, non-zero exit on errors
pnpm biome ci --reporter=default --reporter=github .  # GitHub Actions annotations

Configuration (biome.json)

Recommended config for React/TypeScript projects

{
  "$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
  "vcs": {
    "enabled": true,
    "clientKind": "git",
    "useIgnoreFile": true
  },
  "files": {
    "includes": [
      "src/**/*.ts", "src/**/*.tsx",
      "tests/**/*.ts", "**/*.config.ts", "**/*.json",
      "!**/generated", "!**/components/ui"
    ]
  },
  "formatter": {
    "enabled": true,
    "indentStyle": "space",
    "indentWidth": 2,
    "lineWidth": 120
  },
  "linter": {
    "enabled": true,
    "rules": { "recommended": true },
    "domains": { "react": "recommended" }
  },
  "javascript": {
    "formatter": { "quoteStyle": "double" }
  },
  "assist": {
    "enabled": true,
    "actions": {
      "source": { "organizeImports": "on" }
    }
  }
}

Formatter options

Key options: indentStyle ("space"/"tab"), indentWidth, lineWidth, lineEnding ("lf"/"crlf"), trailingNewline. JS-specific: quoteStyle, trailingCommas, semicolons, arrowParentheses, bracketSpacing.

Linter rule configuration

Rules use severity levels "error", "warn", "info", or "off". Some accept options:

{
  "linter": {
    "rules": {
      "recommended": true,
      "style": {
        "noRestrictedGlobals": {
          "level": "error",
          "options": {
            "deniedGlobals": {
              "Buffer": "Use Uint8Array for browser compatibility."
            }
          }
        },
        "useComponentExportOnlyModules": "off"
      }
    }
  }
}

Import organizer

The import organizer (Biome Assist) merges duplicates, sorts by distance, and supports custom grouping. As of v2.4.13 it also sorts imports inside TypeScript modules (module "x" { ... }) and .d.ts declaration files.

{
  "assist": {
    "enabled": true,
    "actions": {
      "source": {
        "organizeImports": {
          "level": "on",
          "options": {
            "groups": [
              { "source": "builtin" },
              { "source": "external" },
              { "source": "internal", "match": "@company/*" },
              { "source": "relative" }
            ]
          }
        }
      }
    }
  }
}

Per-subsystem includes

Each subsystem (linter, formatter, assist) has its own includes for fine-grained scoping. Applied after files.includes - can only narrow, not widen.

{
  "files": {
    "includes": ["**", "!**/dist"]
  },
  "linter": {
    "includes": ["**", "!**/components/ui"]
  },
  "formatter": {
    "includes": ["**", "!**/components/ui"]
  }
}

This lints and formats everything except dist/ and components/ui, while assists (import organizer) still run on components/ui.

Overrides

Overrides apply different settings to specific file patterns. Use for per-file rule tweaks (e.g., relaxing rules for vendored/shadcn components). The field is includes (with s).

{
  "overrides": [
    {
      "includes": ["**/components/ui/**"],
      "linter": {
        "rules": {
          "suspicious": { "noDocumentCookie": "off" },
          "style": { "useComponentExportOnlyModules": "off" }
        }
      }
    },
    {
      "includes": ["**/*.test.ts"],
      "linter": {
        "rules": {
          "suspicious": { "noConsole": "off" }
        }
      }
    }
  ]
}

Monorepo configuration

Root biome.json holds shared config. Package configs inherit with "extends": "//":

{
  "$schema": "../../node_modules/@biomejs/biome/configuration_schema.json",
  "extends": "//"
}

Override specific rules per package by adding a linter.rules section alongside "extends": "//".

Configuration file discovery (v2.4)

Search order: biome.json -> biome.jsonc -> .biome.json -> .biome.jsonc -> platform config home.

Platform config home paths:

PlatformPath
Linux$XDG_CONFIG_HOME/biome (or ~/.config/biome)
macOS~/Library/Application Support/biome
Windows%APPDATA%\biome\config (i.e. C:\Users\<user>\AppData\Roaming\biome\config)

Other v2.4 highlights

  • Embedded snippets: Biome 2.4 formats and lints CSS and GraphQL embedded inside JavaScript (e.g. styled-components, Emotion, gql template literals). Works automatically; no extra config.
  • Vue/Svelte parser improvements: substantially fewer false positives in noUnusedVariables, useConst, useImportType, and noUnusedImports inside .vue and .svelte files.

Domains

Domains group lint rules by technology. Enable only what your stack needs:

{
  "linter": {
    "domains": {
      "react": "recommended",
      "next": "recommended",
      "test": "recommended",
      "types": "all"
    }
  }
}
DomainPurposeAuto-detected
reactReact hooks, JSX patternsreact >= 16.0.0
reactNativeReact Native rules (noReactNativeRawText, noReactNativeLiteralColors, noReactNativeDeepImports, useReactNativePlatformComponents)react-native
nextNext.js-specific rulesnext >= 14.0.0
solidSolid.js rulessolid-js dependency
qwikQwik-specific rules@builder.io/qwik
vueVue-specific rulesvue
testTesting best practices (any framework)jest, mocha, ava, or vitest
playwrightPlaywright test rules@playwright/test
drizzleDrizzle ORM safety rulesdrizzle-orm
turborepoTurborepo monorepo rulesturbo
projectCross-file analysis (noImportCycles, noUnresolvedImports)-
typesType inference rules (noFloatingPromises, noMisusedPromises)-

Activation levels: "recommended" (stable rules only), "all" (includes nursery), "none" (disable).

The project domain enables rules needing the module graph. The types domain (v2.4) enables rules requiring type inference. Both trigger a file scan that adds a small overhead.

Type-Aware Linting

Biome 2.0 introduced type-aware linting without the TypeScript compiler. Biome has its own type inference engine in Rust - no typescript dependency needed.

How it works

Enable the types domain to activate file scanning and type inference. Performance impact is minimal compared to typescript-eslint because inference runs natively.

v2.4.12 improvements: type-aware rules now resolve members through the Pick<T, K>, Omit<T, K>, Partial<T>, Required<T>, and Readonly<T> utility types (preserving optional, readonly, and nullable flags), so rules see the same shape your code does.

Key rules

RuleWhat it catches
noFloatingPromisesUnhandled promises (missing await/return/void)
noMisusedPromisesPromises in conditionals, array callbacks
useAwaitThenableAwaiting non-thenable values
noUnnecessaryConditionsConditions that are always true/false
useRegexpExecstring.match() where regexp.exec() is better
useFindarray.filter()[0] instead of array.find()
useArraySortCompareArray.sort() without compare function

noFloatingPromises

The most impactful type-aware rule. Detects unhandled promises:

// ERROR: floating promise
async function loadData() {
  fetch("/api/data");
}

// VALID: awaited
async function loadData() {
  await fetch("/api/data");
}

// VALID: explicitly voided (fire-and-forget)
async function loadData() {
  void fetch("/api/data");
}

Detects ~75% of cases compared to typescript-eslint, improving each release. v2.4.12 added detection through cross-module generic wrapper functions (e.g. a generic wrap(fn) re-exported from another file).

React Compiler interaction with useExhaustiveDependencies

If you use the React Compiler, useExhaustiveDependencies cannot tell that the compiler is handling memoization for you. Many React Compiler users (including Biome contributors) disable the rule entirely:

{
  "linter": {
    "rules": {
      "correctness": {
        "useExhaustiveDependencies": "off"
      }
    }
  }
}

If you keep the rule on, expect to suppress effects that intentionally depend on a value but don't read it in the body (e.g. location.pathname to re-trigger on navigation).

Limitations vs typescript-eslint

  • Complex generic type inference may miss some cases
  • Not a full type checker - handles common patterns, not every edge case
  • Rules still in nursery - expect improvements with each release
  • Major performance advantage: fraction of tsc-based linting time

GritQL Custom Rules

GritQL is a declarative pattern-matching language for custom lint rules. Create .grit files and register them as plugins.

{ "plugins": ["./lint-rules/no-object-assign.grit"] }

Examples

Ban Object.assign:

`$fn($args)` where {
    $fn <: `Object.assign`,
    register_diagnostic(
        span = $fn,
        message = "Prefer object spread instead of `Object.assign()`"
    )
}

CSS - enforce color classes:

language css;
`$selector { $props }` where {
    $props <: contains `color: $color` as $rule,
    not $selector <: r"\.color-.*",
    register_diagnostic(
        span = $rule,
        message = "Don't set explicit colors. Use `.color-*` classes instead."
    )
}

Plugin API

register_diagnostic() arguments:

  • severity - "hint", "info", "warn", "error" (default: "error")
  • message (required) - diagnostic message
  • span (required) - syntax node to highlight

Supported target languages: JavaScript (default) and CSS, plus JSON since v2.4 (the v2.4 release blog adds JSON; the linter/plugins/ reference page may still mention only JS/CSS - the blog is authoritative). Profile rule and plugin execution with biome lint --profile-rules ..

Suppression Patterns

Single-line

// biome-ignore lint/suspicious/noConsole: needed for debugging
console.log("debug info");

File-level

// biome-ignore-all lint/suspicious/noConsole: logger module

Range

// biome-ignore-start lint/style/useConst: legacy code
let x = 1;
let y = 2;
// biome-ignore-end lint/style/useConst
const a = 4; // this line IS checked

biome-ignore-end is optional - omit to suppress until end of file. Biome requires explanation text after the colon.

Migration

From ESLint

pnpm biome migrate eslint --write
pnpm biome migrate eslint --write --include-inspired  # Include non-identical rules

Supports legacy and flat configs, extends resolution, plugins (typescript-eslint, react, jsx-a11y, unicorn), .eslintignore.

From Prettier

pnpm biome migrate prettier --write

Maps tabWidth -> indentWidth, useTabs -> indentStyle, singleQuote -> quoteStyle, trailingComma -> trailingCommas.

From ESLint + Prettier combo

pnpm biome migrate eslint --write
pnpm biome migrate prettier --write
pnpm remove eslint prettier eslint-config-prettier eslint-plugin-prettier \
  @typescript-eslint/parser @typescript-eslint/eslint-plugin
rm .eslintrc* .prettierrc* .eslintignore .prettierignore

Enable VCS integration since ESLint respects gitignore by default:

{ "vcs": { "enabled": true, "clientKind": "git", "useIgnoreFile": true } }

CLI Reference

biome check (primary command)

biome check .                    # Check all files
biome check --write .            # Apply safe fixes
biome check --write --unsafe .   # Apply all fixes
biome check --changed .          # Only VCS-changed files
biome check --staged .           # Only staged files

biome ci (CI mode)

biome ci .                                           # No writes, exit code on errors
biome ci --reporter=github .                         # GitHub annotations
biome ci --reporter=sarif --reporter-file=report.sarif .  # SARIF output

biome lint

biome lint --only=suspicious/noDebugger .    # Single rule
biome lint --skip=project .                  # Skip domain
biome lint --only=types .                    # Only type-aware rules
biome lint --error-on-warnings .             # Warnings become errors
biome lint --enforce-assist .                # Fail when assist actions remain unapplied
biome lint --suppress --reason "tracked in #123" .  # Insert biome-ignore suppressions instead of fixes

--enforce-assist is useful in CI: import organization and other assist actions aren't lint diagnostics by default, so plain biome ci may pass even when imports are unsorted. Pair --suppress with --reason to bulk-add biome-ignore comments (Biome requires explanation text after the colon).

Other commands

biome format --write .                       # Format only
biome search '`console.$method($args)`' .    # GritQL pattern search
biome rage                                   # Debug info for bug reports
biome explain noFloatingPromises             # Explain a rule

Best Practices

  1. Use biome check as your single command - combines format, lint, and import organization
  2. Start with recommended: true - disable individual rules as needed
  3. Enable relevant domains - react, next, test, types based on your stack
  4. Enable VCS integration - respects .gitignore, enables --changed/--staged
  5. Use biome ci in pipelines - never writes files, clear exit codes
  6. Pin exact versions - avoid surprise rule changes between releases
  7. Run biome migrate --write after every upgrade
  8. Use --staged in pre-commit hooks: biome check --staged --write --no-errors-on-unmatched .
  9. Profile slow rules with biome lint --profile-rules (v2.4)
  10. Use GritQL plugins for project-specific patterns instead of disabling rules globally

Gotchas

These are real mistakes that have caused broken configs, dirty working trees, and wasted debugging time. Read before writing any Biome config.

  1. files.ignore, files.include, files.exclude do not exist. Only files.includes (with s). Biome will throw Found an unknown key for anything else. See the first critical rule above.
  1. organizeImports is NOT a top-level config key. In Biome 2.x it moved under assist.actions.source.organizeImports. Using it at the top level is a config error.
  1. overrides that disable linter + formatter still run assist. If you use overrides to skip a generated file, the import organizer (an assist action) will still rewrite it. This silently dirties your working tree. Use files.includes negation to fully exclude a file instead.
  1. overrides field is includes (with s), not include. Same naming as files.includes.
  1. biome check --write runs formatter + linter + assists in one pass. Any of these three can modify files. If a generated file keeps getting dirtied after check --write, check which subsystem is touching it - it's often the import organizer (assist), not the formatter or linter.
  1. Prefer --write over --fix. --fix is a documented alias for --write on biome lint and biome format, but biome check is the canonical entry point and --write is the documented flag everywhere. Pick --write and be consistent.
  1. package.json infinite reformatting loop. Biome's default JSON formatter uses tabs; pnpm (and several other tools) write package.json with 2-space indent. Each install rewrites it, then biome check --write rewrites it again, dirtying every commit. Fix by either excluding package.json ("!**/package.json" in files.includes) or overriding JSON to use spaces:
   {
     "overrides": [
       {
         "includes": ["**/package.json"],
         "json": { "formatter": { "indentStyle": "space", "indentWidth": 2 } }
       }
     ]
   }

Resources

  • Biome Docs: https://biomejs.dev/
  • Biome GitHub: https://github.com/biomejs/biome
  • GritQL Docs: https://docs.grit.io/
  • Biome v2 Blog: https://biomejs.dev/blog/biome-v2/
  • Biome v2.4 Blog: https://biomejs.dev/blog/biome-v2-4/
  • Migration Guide: https://biomejs.dev/guides/migrate-eslint-prettier/
  • Rules Reference: https://biomejs.dev/linter/javascript/rules/
  • Domains: https://biomejs.dev/linter/domains/
  • Plugins: https://biomejs.dev/linter/plugins/

For detailed lint rules by category with code examples, see rules-reference.md.

平台分布

OpenClaw

91.25%
按下载量换算1,616

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills