biome-anti-slop
GitHub在 TypeScript/JS 仓库中安装和配置 vendored Biome anti-slop GritQL 规则,自动处理依赖、复制规则文件及注册插件,确保 lint 配置与现有结构兼容。
Trigger Scenarios
Install
npx skills add nightly-labs/openbot --skill biome-anti-slop -g -y
SKILL.md
Frontmatter
{
"name": "biome-anti-slop",
"description": "Install and configure vendored Biome anti-slop GritQL rules in a local TypeScript or JavaScript repository. Use when a user asks to add, configure, update, or migrate Biome anti-slop lint rules."
}
Biome anti-slop
Vendor the bundled rules into the current repository and integrate them with its existing Biome setup. Preserve unrelated work and adapt to the repository's package manager and configuration.
Install
-
Inspect the repository before changing it:
- Read applicable agent instructions and check
git status. - Detect the package manager from
packageManagerand lockfiles. - Find
biome.jsonorbiome.jsoncfiles and existing anti-slop rules. - If multiple independent Biome roots exist, ask which one to configure.
- Read applicable agent instructions and check
-
Require
@biomejs/biomeversion>=2.5.9 <3. Preserve an existing dependency in that range. If Biome is absent from a package manifest, install the latest compatible 2.x release using@biomejs/biome@^2.5.9as a development dependency with the repository's package manager. If the repository uses a version outside that range, stop and ask before changing it. -
From the target repository, copy the bundled rules:
node <skill-directory>/scripts/install.jsThe default destination is
tools/biome/anti-slop. Pass another relative destination as the first argument when the repository has an established tooling layout. The installer refuses to replace an existing destination; use--forceonly after reviewing the existing files and the replacement diff. -
Register the installed rules. Do not type the rule names from memory or from this file. The installer prints two lists, read from the
// scope:line each rule declares, so they cannot go stale as rules are added, merged, or removed:- the
globallist goes in the top-levelpluginsarray; - the
testslist goes in apluginsarray on anoverridesentry matching**/*.test.tsand**/*.test.tsx, because those patterns are legitimate in product code and only wrong in a test.
Add them without removing existing plugins.
Preserve every existing configuration field. Also enable these native Biome rules at error severity, merging them into their existing groups:
{ "linter": { "rules": { "complexity": { "noBannedTypes": "error", "noUselessTypeConstraint": "error" }, "nursery": { "noMisleadingReturnType": "error", "noUnsafeTypeAssertion": "error", "useReduceTypeParameter": "error" }, "style": { "noNonNullAssertion": "error", "useAsConstAssertion": "error" }, "suspicious": { "noExplicitAny": "error", "noFocusedTests": "error", "noSkippedTests": "warn" } } } }noFocusedTestsis an error because a strayit.onlysilently disables the rest of its file;noSkippedTestsis a warning because a skip has honest uses and only needs a comment naming what unblocks it. Confirm every rule name and its current group with the installed Biome binary before editing configuration. The groups above are correct for Biome 2.5.9; ifbiome explainreports that a later compatible 2.x release promoted a nursery rule, use its reported stable group. Stop if any rule is unavailable rather than writing an invalid configuration.If one of these rules already uses object configuration, preserve its options and change only its
leveltoerror. Iflinter.enabledis explicitlyfalse, stop and ask before enabling it. Add the vendored anti-slop directory tofiles.includesas a negated pattern so routine checks do not reformat vendored rules. Also add negated patterns for project-local agent tooling directories that actually exist, such as.agentsor.codex; do not ignore all dot-directories. If no Biome configuration exists, create a minimal one with the local schema, the plugin list, and those file exclusions. - the
-
Keep each rule's declared severity. The set runs at two levels and the difference is a promise:
erroris for a pattern with no honest counter-example,warnfor a judgement a pattern cannot make - an options-object parameter is a readability call, whether aMapin a store is always replaced whole is a fact about the component, and whether a module has an injectable seam is a fact about the code under test. A warning is a prompt to think, never a demand to rewrite.A judgement the pattern cannot make at all is a different thing, and does not belong in the set: a rule that fires mostly on correct code trains readers to skim every warning beside it. Neither does a rule Biome already ships -
noUnsafeTypeAssertionandnoExplicitAnyown their patterns here, and a second diagnostic on the same line adds nothing to read. -
Every rule ships a fixture beside it under
fixtures/, marking each line the rule must reject with a trailing// flagand surrounding it with correct code the rule must leave alone. A GritQL pattern that matches nothing is green and enforces nothing, so a rule without a fixture proving both halves is not a rule. If the target repository adds one, it adds a fixture too. -
Run the repository's existing lint or check command. If none exists, run Biome directly. Report findings in owned source and fix them only when the user requested migration or cleanup. Do not suppress diagnostics, weaken their severity, or launder types to make the check pass.
-
Review the final diff and report the copied path, dependency change, configuration change, checks run, and any remaining findings.
Version History
- ac99196 Current 2026-11-02 08:39


