Coding & Refactoringlow risk
biome-complete
Complete Biome toolchain guidance for real repository workflows. Use when users ask to configure biome.json, run lint or format commands, migrate from ESLint or Prettier, tune rule severity, fix formatter drift, or replace mixed ESLint+Prettier pipelines with Biome-only workflows.
pantheon-org/tekhne·skills/development/biome-complete/SKILL.md
37/ 100推荐值
导入这个 Skill
选择你的 coding agent,复制项目级或个人级安装命令。
导入当前项目.agents/skills/biome-complete
npx skills add https://github.com/pantheon-org/tekhne/tree/4a79b500f771a61b6b4bf63751e038649d6535bc/skills/development/biome-complete -a codex -y导入个人环境~/.agents/skills/biome-complete
npx skills add https://github.com/pantheon-org/tekhne/tree/4a79b500f771a61b6b4bf63751e038649d6535bc/skills/development/biome-complete -a codex -g -y导入当前项目.claude/skills/biome-complete
npx skills add https://github.com/pantheon-org/tekhne/tree/4a79b500f771a61b6b4bf63751e038649d6535bc/skills/development/biome-complete -a claude-code -y导入个人环境~/.claude/skills/biome-complete
npx skills add https://github.com/pantheon-org/tekhne/tree/4a79b500f771a61b6b4bf63751e038649d6535bc/skills/development/biome-complete -a claude-code -g -y导入当前项目.agents/skills/biome-complete
npx skills add https://github.com/pantheon-org/tekhne/tree/4a79b500f771a61b6b4bf63751e038649d6535bc/skills/development/biome-complete -a github-copilot -y导入个人环境~/.copilot/skills/biome-complete
npx skills add https://github.com/pantheon-org/tekhne/tree/4a79b500f771a61b6b4bf63751e038649d6535bc/skills/development/biome-complete -a github-copilot -g -y导入当前项目.agents/skills/biome-complete
npx skills add https://github.com/pantheon-org/tekhne/tree/4a79b500f771a61b6b4bf63751e038649d6535bc/skills/development/biome-complete -a cursor -y导入个人环境~/.cursor/skills/biome-complete
npx skills add https://github.com/pantheon-org/tekhne/tree/4a79b500f771a61b6b4bf63751e038649d6535bc/skills/development/biome-complete -a cursor -g -y导入当前项目.agents/skills/biome-complete
npx skills add https://github.com/pantheon-org/tekhne/tree/4a79b500f771a61b6b4bf63751e038649d6535bc/skills/development/biome-complete -a gemini-cli -y导入个人环境~/.gemini/skills/biome-complete
npx skills add https://github.com/pantheon-org/tekhne/tree/4a79b500f771a61b6b4bf63751e038649d6535bc/skills/development/biome-complete -a gemini-cli -g -yNative Gemini CLI
gemini skills install https://github.com/pantheon-org/tekhne.git --scope workspace --path skills/development/biome-complete⚠ 安装命令使用开源 skills CLI。执行前请检查来源、脚本和权限。
Skill 指令
在 GitHub 查看原始文件 ↗# Biome Complete Toolchain ## When to Apply Use this skill when the request includes: - "set up Biome" - "configure biome.json" - "migrate from ESLint" or "migrate from Prettier" - "fix lint and format drift" - "run Biome in CI" ## When Not to Apply Do not use this skill when the user asks for ESLint-only or Prettier-only solutions. ## Principles 1. Use one source of truth for linting and formatting. 2. Prefer deterministic commands and verifiable output. 3. Keep SKILL.md short; move deep details to `references/`. ## Deterministic Workflow 1. Confirm scope: migration, config, lint, format, or CI. 2. Initialize config if missing: `bunx @biomejs/biome init`. 3. Run checks and capture results: `bunx @biomejs/biome check .`. - **Verify:** Confirm diagnostics are printed. If command fails, check Node.js version (≥14) and file permissions. 4. Apply safe autofixes: `bunx @biomejs/biome check . --write`. - **Verify:** Re-run `biome check .` and confirm reduced error count. If errors persist, review unsupported rules or migration conflicts in `references/migration-eslint-prettier.md`. 5. Add targeted suppressions only when justified. 6. Verify commands pass in local and CI contexts: `bunx @biomejs/biome check . --error-on-warnings`. - **Verify:** Exit code 0 indicates success. If non-zero, review remaining diagnostics and address or document exceptions. **Error Recovery:** If `biome check` fails after migration, isolate conflicting rules by temporarily disabling rule groups in `biome.json` linter section, then re-enable one group at a time to identify the source. ## Quick Commands ### Initialize ```bash bunx @biomejs/biome init ``` Expected result: `biome.json` exists. ### Check repository ```bash bunx @biomejs/biome check . ``` Expected result: diagnostics printed with file paths. ### Apply safe fixes ```bash bunx @biomejs/biome check . --write ``` Expected result: fixable issues are rewritten. ### Format files ```bash bunx @biomejs/biome format . --write ``` Expected result: formatting is normalized. ### Check one file ```bash bunx @biomejs/biome check src/index.ts ``` Expected result: file-level diagnostics only. ### Run in CI ```bash bunx @biomejs/biome check . --error-on-warnings ``` Expected result: non-zero exit when warnings or errors exist. ## Anti-Patterns ### NEVER run Biome and ESLint on the same files **WHY:** Competing rules create contradictory output and noisy reviews. **BAD:** ESLint and Biome both lint `src/**/*.ts`. **GOOD:** Route TS linting and formatting through Biome only. **Consequence:** Duplicate diagnostics and unstable CI outcomes. ### NEVER run Prettier and Biome formatter on the same files **WHY:** Different formatting models cause churn in every commit. **BAD:** `prettier --write .` and `biome format . --write` in the same pipeline. **GOOD:** Keep only `biome format . --write` for supported files. **Consequence:** Constant formatting diffs and merge friction. ### NEVER skip `biome.json` customization after init **WHY:** Defaults may not match repository conventions. **BAD:** Commit default config without reviewing formatter/linter settings. **GOOD:** Define formatter width, linter domains, and VCS ignores explicitly. **Consequence:** Inconsistent style and avoidable lint regressions. ### NEVER blanket-ignore diagnostics to get green CI **WHY:** Broad suppressions hide real defects and debt. **BAD:** Disable full rule groups without rationale. **GOOD:** Add narrow suppressions with a reason and follow-up ticket. **Consequence:** Quality silently degrades over time. ## References - [Config: biome.json](references/config-biome-json.md) — full biome.json schema, formatter width, linter domains, and VCS ignore patterns - [Linting Rule Categories](references/linting-rule-categories.md) — all rule groups, severity levels, and category-level enable/disable patterns - [Formatter Options](references/formatter-options.md) — indent style, line width, quote style, and language-specific overrides - [Migration: ESLint & Prettier](references/migration-eslint-prettier.md) — step-by-step migration guide, rule mapping, and conflict resolution