biome

GitHub

用于在.NET仓库中配置Biome,为JS/TS/CSS等前端资产提供统一的格式化、Lint和导入排序。涵盖版本升级适配、迁移策略及脚本集成,替代或简化ESLint+Prettier组合。

catalog/Tools/Biome/skills/biome/SKILL.md managedcode/dotnet-skills

Trigger Scenarios

需要快速的前端格式化和Lint工具 希望用Biome替代ESLint+Prettier 仓库已存在biome.json或相关依赖

Install

npx skills add managedcode/dotnet-skills --skill biome -g -y
More Options

Non-standard path

npx skills add https://github.com/managedcode/dotnet-skills/tree/main/catalog/Tools/Biome/skills/biome -g -y

Use without installing

npx skills use managedcode/dotnet-skills@biome

指定 Agent (Claude Code)

npx skills add managedcode/dotnet-skills --skill biome -a claude-code -g -y

安装 repo 全部 skill

npx skills add managedcode/dotnet-skills --all -g -y

预览 repo 内 skill

npx skills add managedcode/dotnet-skills --list

SKILL.md

Frontmatter
{
    "name": "biome",
    "description": "Use Biome in .NET repositories that ship Node-based frontend assets and want a fast combined formatter-linter-import organizer for JavaScript, TypeScript, CSS, JSON, GraphQL, or HTML. USE FOR: biome.json or @biomejs\/biome setup; fast frontend formatting and linting; replacing overlapping frontend style tools deliberately. DO NOT USE FOR: ESLint-only plugin coverage; runtime site audits such as headers, accessibility, or browser behavior. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made.",
    "compatibility": "Requires a .NET repository with frontend assets managed through Node or a standalone Biome binary workflow; keep ownership explicit versus ESLint, Stylelint, and webhint."
}

Biome for Frontend Assets in .NET Repositories

Trigger On

  • the repo has biome.json, @biomejs/biome, or the user asks for a faster all-in-one frontend formatter-linter stack
  • the repo wants one tool for formatting, linting, and import organization across JS, TS, CSS, JSON, GraphQL, or HTML
  • the team is comparing Biome against ESLint plus Prettier or wants to simplify the current stack

Do Not Use For

  • repos that rely on ESLint plugins or framework-specific rules Biome does not cover yet
  • runtime site audits such as headers, accessibility, and SEO; route that to webhint
  • cases where a dedicated CSS or HTML tool is still the deliberate owner and no migration is requested

Inputs

  • the nearest AGENTS.md
  • package.json
  • biome.json or biome.jsonc
  • current ownership across ESLint, Prettier, Stylelint, and import ordering

Workflow

  1. Decide ownership first:
    • Biome as the main formatter and linter
    • Biome only for formatting
    • Biome in coexistence with ESLint for plugin gaps
  2. Prefer a repo-local pinned install so CI and developer machines use the same version.
  3. Generate biome.json only after confirming what the repo wants Biome to own.
  4. Add repeatable scripts to package.json, for example:
    • biome check .
    • biome check . --write
  5. Keep file ownership explicit:
    • Biome can own formatting, linting, and import sorting
    • webhint still owns site-runtime audits
    • ESLint may stay for plugin-heavy cases the repo intentionally keeps
  6. Start migrations with check and bounded folders before flipping the whole repo to --write.
  7. Re-run the frontend build and tests after broad formatting or lint-fix passes.

Current Upstream Notes

  • Biome CLI 2.5.8 adds useReactCompiler, noSvelteLegacyConst, and noInvalidPropertyInitValue, and parses HTML style attributes as CSS. Enable new rules deliberately because React Compiler and Svelte legacy checks can change an existing migration plan.
  • Biome CLI 2.5.9 adds the Nursery rules useNamedLayer, useTailwindShorthandClasses, useControlLabel, noUnsafeTypeAssertion, and useAstroClientOnlyDirectiveValue. Enable them explicitly; validate CSS/HTML formatting plus Tailwind, Astro, Svelte, and Vue diagnostics before accepting a broad CI change.
  • The release improves import-cycle performance and fixes Vue globals, Svelte object literals, CSS comments, and related formatter/parser paths. Re-run the repo's existing biome check command before removing suppressions or accepting formatter churn.
  • When --stdin-file-path is used, verify that the intended nested biome.json is selected and that ignored input produces the expected warning. Keep fixtures for Vue custom blocks, Svelte attachments, Tailwind class sorting, and non-ASCII diagnostic spans when those surfaces matter.
  • Recent Biome changes also continue expanding CSS/SCSS, HTML accessibility, import sorting, watch mode, and upgrade-command surfaces; verify actual CLI ownership before replacing ESLint or Stylelint.

Bootstrap When Missing

  1. Detect current state:
    • rg --files -g 'package.json' -g 'biome.json*'
    • rg -n '"@biomejs/biome"|"eslint"|"prettier"|"stylelint"' --glob 'package.json' .
  2. Prefer a repo-local pinned install:
    • npm i -D -E @biomejs/biome
  3. Create config deliberately:
    • npx @biomejs/biome init
  4. Add repeatable commands to AGENTS.md and package.json, then verify with:
    • npx @biomejs/biome check .
    • npx @biomejs/biome check . --write
  5. Return status: configured if Biome is now wired with explicit ownership, or status: improved if the existing setup was tightened.
  6. Return status: not_applicable when the repo intentionally stays on ESLint-centered ownership and no migration or comparison was requested.

Handle Failures

  • Missing-rule parity with specialized ESLint plugins is an ownership problem; keep ESLint for those files until the gap is intentionally closed.
  • Overly broad --write runs can cause large churn; start with bounded folders or changed files first.
  • Generated assets or vendored code should be excluded in biome.json before trusting the signal.
  • If developers complain that Biome and ESLint disagree, define file ownership instead of running both broadly on the same surface by accident.

Deliver

  • explicit Biome ownership and version pinning
  • checked-in config and repeatable check commands
  • a migration or coexistence plan versus ESLint and other frontend tools

Validate

  • the chosen ownership model is documented
  • CI and local runs use the same Biome version
  • the target globs exclude generated and vendored assets
  • downstream build or test flows still pass after --write runs

Ralph Loop

  1. Plan: analyze current state, target outcome, constraints, and risks.
  2. Execute one step and produce a concrete delta.
  3. Review the result and capture findings.
  4. Apply fixes in small batches and rerun checks.
  5. Update the plan after each iteration.
  6. Repeat until outcomes are acceptable.
  7. If a dependency is missing, bootstrap it or return status: not_applicable with a reason.

Required Result Format

  • status: complete | clean | improved | configured | not_applicable | blocked
  • plan: concise plan and current step
  • actions_taken: concrete changes made
  • verification: commands, checks, or review evidence
  • remaining: unresolved items or none

Example Requests

  • "Replace Prettier and basic linting with Biome in this repo."
  • "Add Biome to the frontend under ClientApp."
  • "Explain whether we should keep ESLint after adding Biome."

Version History

  • 0559476 Current 2026-08-19 23:37

    更新上游版本说明,涵盖Biome CLI 2.5.8和2.5.9的新特性及规则变更指南

  • 7ab7f03 2026-07-25 05:26

Same Skill Collection

catalog/Frameworks/gRPC/skills/grpc/SKILL.md
catalog/Frameworks/Official-Astro/skills/astro-developer/SKILL.md
catalog/Frameworks/Official-DotNet-ASPNetCore/skills/configuring-opentelemetry-dotnet/SKILL.md
catalog/Frameworks/Official-DotNet-ASPNetCore/skills/dotnet-webapi/SKILL.md
catalog/Frameworks/Official-DotNet-ASPNetCore/skills/minimal-api-file-upload/SKILL.md
catalog/Frameworks/Orleans/skills/orleans/SKILL.md
catalog/Frameworks/ThreeJS-WebGPU-TSL/skills/webgpu-threejs-tsl/SKILL.md
catalog/Libraries/Official-DotNet-Data/skills/optimizing-ef-core-queries/SKILL.md
catalog/Platform/Official-DotNet-Advanced/skills/csharp-scripts/SKILL.md
catalog/Platform/Official-DotNet-Advanced/skills/nuget-trusted-publishing/SKILL.md
catalog/Platform/Official-DotNet-Blazor/skills/create-blazor-project/SKILL.md
catalog/Platform/Official-DotNet-Blazor/skills/fetch-and-send-data/SKILL.md
catalog/Platform/Official-DotNet-Blazor/skills/support-prerendering/SKILL.md
catalog/Platform/Official-DotNet-Blazor/skills/use-js-interop/SKILL.md
catalog/Platform/Official-DotNet-Experimental/skills/exp-mock-usage-analysis/SKILL.md
catalog/Platform/Official-DotNet-Experimental/skills/exp-simd-vectorization/SKILL.md
catalog/Platform/Official-DotNet-Test-Migration/skills/migrate-xunit-to-mstest/SKILL.md
catalog/Platform/Official-DotNet-Test-Migration/skills/migrate-xunit-to-xunit-v3/SKILL.md
catalog/Platform/Official-DotNet-Upgrade/skills/dotnet-aot-compat/SKILL.md
catalog/Testing/Official-DotNet-Test/skills/code-testing-extensions/SKILL.md
catalog/Testing/Official-DotNet-Test/skills/filter-syntax/SKILL.md
catalog/Testing/Official-DotNet-Test/skills/find-untested-sources/SKILL.md
catalog/Testing/Official-DotNet-Test/skills/platform-detection/SKILL.md
catalog/Testing/Official-DotNet-Test/skills/scaffold-dotnet-test-project/SKILL.md
catalog/Testing/Official-DotNet-Test/skills/test-gap-analysis/SKILL.md
catalog/Testing/Official-DotNet-Test/skills/testability-obstacle/SKILL.md
catalog/Testing/Playwright/skills/playwright-visual-testing/SKILL.md
catalog/Testing/xUnit/skills/xunit/SKILL.md
catalog/Tools/Code-Analysis/skills/code-analysis/SKILL.md
catalog/Tools/HTMLHint/skills/htmlhint/SKILL.md
catalog/Tools/Official-DotNet-Diagnostics/skills/analyzing-dotnet-performance/SKILL.md
catalog/Tools/Official-DotNet-Diagnostics/skills/clr-activation-debugging/SKILL.md
catalog/Tools/Official-DotNet-Diagnostics/skills/dotnet-trace-collect/SKILL.md
catalog/Tools/Official-DotNet-Diagnostics/skills/dump-collect/SKILL.md
catalog/Tools/Official-DotNet-MSBuild/skills/binlog-failure-analysis/SKILL.md
catalog/Tools/Official-DotNet-MSBuild/skills/copy-to-output-directory/SKILL.md
catalog/Tools/Official-DotNet-MSBuild/skills/msbuild-server/SKILL.md
catalog/Tools/Official-DotNet-MSBuild/skills/resolve-project-references/SKILL.md
catalog/Tools/ReportGenerator/skills/reportgenerator/SKILL.md
catalog/Tools/ReSharper-CLT/skills/resharper-clt/SKILL.md
catalog/Tools/Roslynator/skills/roslynator/SKILL.md
catalog/Tools/Stylelint/skills/stylelint/SKILL.md
external-sources/upstreams/webgpu-claude-skill/skills/webgpu-threejs-tsl/SKILL.md
catalog/Frameworks/ASP.NET-Core/skills/aspnet-core/SKILL.md
catalog/Frameworks/Aspire/skills/aspire/SKILL.md
catalog/Frameworks/Azure-Functions/skills/azure-functions/SKILL.md
catalog/Frameworks/Blazor/skills/blazor/SKILL.md
catalog/Frameworks/Entity-Framework-6/skills/entity-framework6/SKILL.md
catalog/Frameworks/Entity-Framework-Core/skills/entity-framework-core/SKILL.md
catalog/Frameworks/MAUI/skills/maui/SKILL.md

Metadata

Files
0
Version
0559476
Hash
3d1b8c94
Indexed
2026-07-25 05:26

ホーム - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-30 11:14
浙ICP备14020137号-1 $お客様$