Token导航 LogoToken导航

Agent Skill · 前端设计

biome(Biome 代码规范)

biome 用于补充前端设计相关能力,适合在 Local Agent 中需要让 Agent 承接前端设计相关任务时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

biome 是前端设计类 Agent Skill,可用宿主为 Local Agent,通过unknown获取,权限为需要联网;许可证信息还不明确,暂无第三方扫描结果,按安装量在前端设计类的 10,216 个 Skill 里排第 9,692。

总安装 196周安装 8下载 63核验 2026-05-01
前端设计需要联网unknown未标认证来源可访问许可证需确认审计未展示Local Agent

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
许可证
unknown

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。当前暂无明确安装命令,请以来源页面说明为准。

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

biome 用于补充前端设计相关能力,适合在 Local Agent 中需要处理前端设计任务时使用。它适用于代码规范检查、样式优化和组件结构整理等场景,可帮助提升前端质量。使用时应结合具体项目框架和风格指南,参考原始 README 了解支持的规则和操作方式。

安装前需确认权限范围和维护状态,注意是否会触发联网、命令执行或文件读写操作。biome 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:biome

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

    没有现成安装命令,按unknown的说明从来源页面获取,仓库路径是 biome。

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

biome 怎么安装?

公开资料没有给出可以直接复制的命令,需要按来源页面说明手动安装,仓库内路径为 biome。

biome 支持哪些 AI 工具?

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

biome 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

biome 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

biome 用的人多吗?

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

biome 安全吗?

没有查到第三方扫描结果,安全性无法从公开资料判断,安装前请自行审查源码、依赖和命令行为。

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

值得选的地方

  • 专注 Local Agent 一种宿主,触发方式和使用习惯不用来回切换。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 没有第三方扫描结果,安全性只能靠自己读源码判断。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Local Agent,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 要求有安全扫描结论才肯安装的团队。
  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

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

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
biome

Biome 代码规范 · 本页

196—需要联网未明确未收录

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

SKILL.md 原文

Biome Skill

When to Use

Use this skill when:

  • Setting up Biome for the first time
  • Configuring linting rules
  • Setting up formatting standards
  • Integrating with CI/CD
  • Fixing linting errors
  • Configuring import sorting
  • Setting up pre-commit hooks with Biome

Critical Patterns

Biome Configuration

ALWAYS use a single biome.json in monorepo root:

{
  "$schema": "https://biomejs.dev/schemas/1.4.1/schema.json",
  "organizeImports": {
    "enabled": true
  },
  "linter": {
    "enabled": true,
    "rules": {
      "recommended": true,
      "correctness": {
        "noUnusedVariables": "error",
        "useExhaustiveDependencies": "warn"
      },
      "style": {
        "noNonNullAssertion": "warn",
        "useImportType": "error"
      },
      "suspicious": {
        "noExplicitAny": "error",
        "noConsoleLog": "warn"
      }
    }
  },
  "formatter": {
    "enabled": true,
    "formatWithErrors": false,
    "indentStyle": "space",
    "indentWidth": 2,
    "lineWidth": 100
  },
  "javascript": {
    "formatter": {
      "quoteStyle": "single",
      "trailingComma": "es5",
      "semicolons": "asNeeded",
      "arrowParentheses": "asNeeded"
    }
  }
}

Import Organization

Biome organizes imports automatically:

// Before Biome
import { useState } from 'react'
import type { Quiz } from '@/types'
import { Button } from '@/components/ui/button'
import { calculateScore } from './utils'

// After Biome (organized)
import { useState } from 'react'

import { Button } from '@/components/ui/button'
import type { Quiz } from '@/types'

import { calculateScore } from './utils'

Order enforced by Biome:

  1. Side-effect imports
  2. External dependencies
  3. Internal absolute imports
  4. Relative imports
  5. Type-only imports (grouped separately)

Linting Rules for TypeScript

ALWAYS enable strict TypeScript rules:

{
  "linter": {
    "rules": {
      "suspicious": {
        "noExplicitAny": "error",
        "noUnsafeDeclarationMerging": "error"
      },
      "correctness": {
        "noUnusedVariables": "error",
        "useExhaustiveDependencies": "warn"
      },
      "style": {
        "useImportType": "error",
        "noNonNullAssertion": "warn"
      }
    }
  }
}

Formatter Configuration

Consistent formatting across packages:

{
  "formatter": {
    "indentWidth": 2,
    "lineWidth": 100,
    "indentStyle": "space"
  },
  "javascript": {
    "formatter": {
      "quoteStyle": "single",
      "semicolons": "asNeeded",
      "trailingComma": "es5",
      "arrowParentheses": "asNeeded"
    }
  }
}

Why these choices:

  • quoteStyle: "single" - Consistent with most JS projects
  • semicolons: "asNeeded" - Clean code, ASI-safe
  • trailingComma: "es5" - Better git diffs
  • arrowParentheses: "asNeeded" - Cleaner arrow functions
  • lineWidth: 100 - Balance readability and screen width

Code Examples

Package Scripts

Add to each package.json:

{
  "scripts": {
    "lint": "biome check .",
    "lint:fix": "biome check --apply .",
    "format": "biome format --write .",
    "format:check": "biome format .",
    "check": "biome check --apply ."
  }
}

Root package.json (runs on all packages):

{
  "scripts": {
    "lint": "turbo run lint",
    "lint:fix": "turbo run lint:fix",
    "format": "turbo run format",
    "format:check": "turbo run format:check"
  }
}

CI Integration

GitHub Actions example:

name: Code Quality

on: [push, pull_request]

jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: pnpm/action-setup@v2
        with:
          version: 8
      - uses: actions/setup-node@v4
        with:
          node-version: 20
          cache: 'pnpm'

      - run: pnpm install
      - run: pnpm lint
      - run: pnpm format:check

Pre-commit Hooks

Using husky + lint-staged:

// package.json
{
  "lint-staged": {
    "*.{ts,tsx,js,jsx}": [
      "biome check --apply --no-errors-on-unmatched"
    ]
  }
}
# .husky/pre-commit
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

pnpm lint-staged

Ignoring Files

biome.json:

{
  "files": {
    "ignore": [
      "node_modules",
      "dist",
      ".next",
      "build",
      "coverage",
      "*.config.js"
    ]
  }
}

VSCode Integration

.vscode/settings.json:

{
  "editor.formatOnSave": true,
  "editor.defaultFormatter": "biomejs.biome",
  "editor.codeActionsOnSave": {
    "quickfix.biome": "explicit",
    "source.organizeImports.biome": "explicit"
  },
  "[typescript]": {
    "editor.defaultFormatter": "biomejs.biome"
  },
  "[typescriptreact]": {
    "editor.defaultFormatter": "biomejs.biome"
  }
}

Common Patterns

Fixing Common Issues

Issue: noExplicitAny errors

// ❌ Bad
function handleData(data: any) {
  return data.value
}

// ✅ Good
function handleData(data: unknown) {
  if (typeof data === 'object' && data !== null && 'value' in data) {
    return (data as { value: string }).value
  }
  throw new Error('Invalid data')
}

// ✅ Better with Zod
import { z } from 'zod'

const DataSchema = z.object({
  value: z.string(),
})

function handleData(data: unknown) {
  const parsed = DataSchema.parse(data)
  return parsed.value
}

Issue: noUnusedVariables

// ❌ Bad
function calculateScore(answers: Answer[], quizId: string) {
  return answers.filter(a => a.isCorrect).length
  // quizId is unused
}

// ✅ Good - remove unused param
function calculateScore(answers: Answer[]) {
  return answers.filter(a => a.isCorrect).length
}

// ✅ Good - prefix with _ if intentionally unused
function calculateScore(answers: Answer[], _quizId: string) {
  return answers.filter(a => a.isCorrect).length
}

Issue: useImportType

// ❌ Bad
import { Quiz } from '@/types'

const quiz: Quiz = { ... }

// ✅ Good
import type { Quiz } from '@/types'

const quiz: Quiz = { ... }

Auto-fix Workflow

# 1. Check issues
pnpm lint

# 2. Auto-fix what can be fixed
pnpm lint:fix

# 3. Format code
pnpm format

# 4. Check if there are remaining issues
pnpm lint

Commands Reference

# Check linting (no changes)
biome check .

# Check and auto-fix
biome check --apply .

# Format files (write)
biome format --write .

# Format files (check only)
biome format .

# Check specific files
biome check src/**/*.ts

# Run with detailed output
biome check --verbose .

# Check with specific config
biome check --config-path ./custom-biome.json .

Best Practices

ALWAYS:

  • Run biome check --apply before committing
  • Use noExplicitAny: "error" to prevent any types
  • Enable organizeImports for consistent import order
  • Configure pre-commit hooks to run Biome
  • Use single biome.json in monorepo root

NEVER:

  • Disable rules without documenting why
  • Use // @ts-ignore instead of // biome-ignore
  • Commit code that fails biome check
  • Mix Biome with other formatters (Prettier, ESLint)
  • Use any type (Biome will catch this)

Biome vs ESLint/Prettier

Why Biome:

  • ✅ Fast: 10-100x faster than ESLint
  • ✅ All-in-one: Linter + Formatter in one tool
  • ✅ Zero config: Works out of the box
  • ✅ TypeScript-first: Native TS support
  • ✅ Import sorting: Built-in organize imports

Migration from ESLint/Prettier:

  1. Remove ESLint and Prettier dependencies
  2. Remove .eslintrc.* and .prettierrc.* files
  3. Add biome.json configuration
  4. Update scripts to use Biome
  5. Update pre-commit hooks
  6. Update CI/CD pipelines

Monorepo Setup

Root biome.json (shared config):

{
  "$schema": "https://biomejs.dev/schemas/1.4.1/schema.json",
  "organizeImports": { "enabled": true },
  "linter": {
    "enabled": true,
    "rules": {
      "recommended": true
    }
  },
  "formatter": {
    "enabled": true,
    "indentWidth": 2,
    "lineWidth": 100
  }
}

Package-specific overrides (if needed):

// frontend/biome.json
{
  "extends": ["../biome.json"],
  "linter": {
    "rules": {
      "suspicious": {
        "noConsoleLog": "off"  // Allow console in frontend dev
      }
    }
  }
}

Troubleshooting

Issue: Biome not formatting on save

Solution:

  1. Install Biome VSCode extension
  2. Set as default formatter in .vscode/settings.json
  3. Enable format on save

Issue: Import organization not working

Solution:

{
  "organizeImports": {
    "enabled": true
  }
}

Run: biome check --apply.

Issue: Conflicts with existing ESLint config

Solution:

  1. Remove ESLint completely or
  2. Use ESLint only for custom rules Biome doesn't support
  3. Don't mix formatters

Resources

平台分布

Local Agent

71.15%
按下载量换算45

安全审计

暂无安全审计结果可展示。

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

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

继续浏览同类 Skills