Token导航 LogoToken导航TokenDH.com
开发external-servicegithub未标认证来源可访问许可证需确认审计通过

biomeBiome 代码规范

Agent Skill

biome 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

749

周安装

30

GitHub Stars

74

下载量

242
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/dralgorhythm/claude-agentic-framework --skill biome

简介

biome 是一个用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息的工具,适合在 Codex、Claude、Cursor、Gemini CLI 中整理仓库状态与代码变更。

  • 适用于需要围绕项目协作事项进行信息梳理或自动化处理的场景,尤其关注代码规范与协作流程。
  • 可通过 npx skills add 命令从指定 GitHub 仓库安装,具体用法需结合原始 README 进一步确认。
  • 安装前建议核实权限范围、维护状态,并注意是否涉及联网、命令执行或文件读写操作。
  • biome 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Biome 2.x

Overview

Fast, all-in-one toolchain for linting and formatting JavaScript, TypeScript, JSX, and JSON. Biome 2.x replaces ESLint and Prettier with a single, performant tool written in Rust.

Install: pnpm add -D @biomejs/biome

API Reference: Use Context7 MCP for full rule reference and CLI flags (mcp__context7__resolve-library-id@biomejs/biome).

Workflows

Initial setup:

  1. Install Biome: pnpm add -D @biomejs/biome
  2. Initialize config: pnpm biome init
  3. Configure biome.json with project standards
  4. Install VS Code extension: biomejs.biome
  5. Add npm scripts to package.json
  6. Test: pnpm biome check.

Migrating from ESLint/Prettier:

  1. Run migration helper: pnpm biome migrate eslint --write
  2. Review generated biome.json
  3. Remove ESLint/Prettier configs and dependencies
  4. Update pre-commit hooks and CI scripts
  5. Run full check: pnpm biome check --write.

Daily usage:

  1. Format on save (VS Code integration)
  2. Run pnpm biome check. before commits
  3. Fix auto-fixable issues: pnpm biome check --write.
  4. Review manual fixes for remaining issues

Configuration

biome.json Structure

{
  "$schema": "https://biomejs.dev/schemas/2.0.0/schema.json",
  "organizeImports": { "enabled": true },
  "linter": {
    "enabled": true,
    "rules": { "recommended": true }
  },
  "formatter": {
    "enabled": true,
    "indentStyle": "space",
    "indentWidth": 2,
    "lineWidth": 100
  },
  "javascript": {
    "formatter": {
      "quoteStyle": "single",
      "semicolons": "always",
      "trailingCommas": "es5",
      "arrowParentheses": "asNeeded"
    }
  },
  "files": {
    "ignore": ["dist", "build", "node_modules", "*.min.js", "coverage"]
  }
}

TypeScript / React Project Config

{
  "linter": {
    "rules": {
      "recommended": true,
      "a11y": { "noBlankTarget": "error", "useAltText": "error", "useButtonType": "error" },
      "complexity": { "noExcessiveCognitiveComplexity": "warn", "noUselessFragments": "error" },
      "correctness": { "noUnusedVariables": "error", "useExhaustiveDependencies": "warn", "useHookAtTopLevel": "error" },
      "performance": { "noAccumulatingSpread": "warn" },
      "security": { "noDangerouslySetInnerHtml": "warn" },
      "style": { "noNonNullAssertion": "warn", "useConst": "error", "useImportType": "error" },
      "suspicious": { "noExplicitAny": "error", "noDebugger": "error", "noConsoleLog": "warn" }
    }
  },
  "javascript": {
    "formatter": { "jsxQuoteStyle": "double", "quoteStyle": "single" }
  }
}

Per-File Overrides

{
  "overrides": [
    {
      "include": ["tests/**/*.ts"],
      "linter": { "rules": { "suspicious": { "noExplicitAny": "off" } } }
    },
    {
      "include": ["scripts/**/*.js"],
      "formatter": { "lineWidth": 120 }
    }
  ]
}

CLI Commands

# Check (lint + format) — use this for most tasks
pnpm biome check .
pnpm biome check --write .          # auto-fix
pnpm biome check --write --dry-run . # preview changes

# Lint or format only
pnpm biome lint --write .
pnpm biome format --write .

# Diagnostics
pnpm biome rage                     # effective config + diagnostics
pnpm biome explain src/App.tsx      # explain failures for a file
pnpm biome migrate eslint --write   # migrate from ESLint
pnpm biome migrate prettier --write # migrate from Prettier

Package.json Scripts

{
  "scripts": {
    "lint": "biome lint .",
    "format": "biome format --write .",
    "check": "biome check .",
    "fix": "biome check --write .",
    "typecheck": "tsc --noEmit",
    "quality": "pnpm lint && pnpm typecheck && pnpm build"
  }
}

Editor Integration

VS Code settings.json

{
  "editor.defaultFormatter": "biomejs.biome",
  "editor.formatOnSave": true,
  "editor.codeActionsOnSave": {
    "quickfix.biome": "explicit",
    "source.organizeImports.biome": "explicit"
  },
  "eslint.enable": false,
  "prettier.enable": false,
  "[javascript]": { "editor.defaultFormatter": "biomejs.biome" },
  "[typescript]": { "editor.defaultFormatter": "biomejs.biome" },
  "[typescriptreact]": { "editor.defaultFormatter": "biomejs.biome" },
  "[json]": { "editor.defaultFormatter": "biomejs.biome" },
  "biome.lspBin": "./node_modules/@biomejs/biome/bin/biome"
}

Ignoring Code

// biome-ignore lint/suspicious/noExplicitAny: legacy code
function legacy(param: any) { return param; }

// biome-ignore format: preserve matrix formatting
const matrix = [
  1, 0, 0,
  0, 1, 0,
  0, 0, 1,
];

Prefer files.ignore in biome.json for ignoring entire directories over inline comments.

Git Hooks Integration

Using lint-staged + Husky:

// package.json
{
  "lint-staged": {
    "*.{js,jsx,ts,tsx,json}": ["biome check --write --no-errors-on-unmatched"]
  }
}

Using Lefthook (lefthook.yml):

pre-commit:
  parallel: true
  commands:
    biome:
      glob: "*.{js,ts,jsx,tsx,json}"
      run: biome check --write --no-errors-on-unmatched {staged_files}

CI/CD Integration

GitHub Actions

name: Code Quality
on: [push, pull_request]
jobs:
  quality:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: pnpm/action-setup@v4
        with: { version: 10 }
      - uses: actions/setup-node@v4
        with: { node-version: '24', cache: 'pnpm' }
      - run: pnpm install --frozen-lockfile
      - run: pnpm biome check .
      - run: pnpm typecheck

ESLint Rule Equivalents

ESLint RuleBiome Rule
no-unused-varscorrectness/noUnusedVariables
@typescript-eslint/no-explicit-anysuspicious/noExplicitAny
react-hooks/exhaustive-depscorrectness/useExhaustiveDependencies
no-consolesuspicious/noConsoleLog
prefer-conststyle/useConst
jsx-a11y/alt-texta11y/useAltText

Best Practices

  • Use recommended ruleset as baseline, then customize specific rules
  • Enable format-on-save in VS Code for seamless workflow
  • Run check before commits using git hooks (Husky/Lefthook)
  • Use biome check (not lint + format separately) for unified workflow
  • Ignore generated files in biome.json, not inline comments
  • Use overrides for different rules in tests vs source
  • Commit biome.json to version control for team consistency
  • Document custom rules with comments explaining why they're needed

Anti-Patterns

  • Running lint and format separately (use check instead)
  • Disabling recommended rules without justification
  • Using biome-ignore excessively (fix the underlying issue)
  • Not committing biome.json to version control
  • Mixing ESLint and Biome in the same project
  • Ignoring files via inline comments instead of configuration
  • Not testing migration thoroughly before removing ESLint/Prettier
  • Skipping pre-commit hooks for "quick fixes"
  • Using outdated schema version in biome.json

Feedback Loops

# Preview formatting changes without writing
pnpm biome format --write --dry-run .

# Diagnose config issues
pnpm biome rage

# CI test locally (exit code 0 = success)
pnpm biome check . --error-on-warnings && echo "OK"

Verify VS Code integration: Command Palette → "Biome: Show Output Channel" → should show LSP server logs.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.77%
按下载量换算84

Claude

29.36%
按下载量换算71

Cursor

18.05%
按下载量换算44

Gemini CLI

9.17%
按下载量换算22

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

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

来源信息

继续浏览同类 Skills