{"id":"bde293b4-fa99-441e-acb1-e3bb29e976b9","shortId":"UZZtBb","kind":"skill","title":"biome-js","tagline":"This skill should be used when the user asks to \"configure Biome\", \"extend biome config\", \"set up BiomeJS\", \"add biome overrides\", \"biome lint-staged\", \"fix biome errors\", or mentions biome.jsonc, Biome linting, or Biome formatting configuration.","description":"# BiomeJS Skill\n\nQuick guidance for BiomeJS configuration based on Sablier project patterns.\n\n## Core Concepts\n\n### Extending Shared Configs\n\nExtend shared configs via npm package exports. The consuming project must always provide its own `files.includes`:\n\n```jsonc\n{\n  \"$schema\": \"./node_modules/@biomejs/biome/configuration_schema.json\",\n  \"extends\": [\"@sablier/devkit/biome\"],\n  \"files\": {\n    \"includes\": [\"**/*.{js,json,jsonc,ts}\", \"!node_modules/**/*\"]\n  }\n}\n```\n\nFor UI projects, extend both base and ui configs:\n\n```jsonc\n{\n  \"extends\": [\"@sablier/devkit/biome/base\", \"@sablier/devkit/biome/ui\"],\n  \"files\": {\n    \"includes\": [\"**/*.{css,js,jsx,json,jsonc,ts,tsx}\"]\n  }\n}\n```\n\n### Monorepo Inheritance\n\nIn monorepos, workspace configs inherit from root using `\"//\"`:\n\n```jsonc\n// packages/my-package/biome.jsonc\n{\n  \"extends\": [\"//\"],\n  \"overrides\": [\n    // package-specific overrides\n  ]\n}\n```\n\n### File Includes Pattern\n\nAlways specify `files.includes` explicitly. Common patterns:\n\n| Project Type | Pattern                                       |\n| ------------ | --------------------------------------------- |\n| Library      | `**/*.{js,json,jsonc,ts}`                     |\n| UI/Frontend  | `**/*.{css,js,jsx,json,jsonc,ts,tsx}`         |\n| With GraphQL | `**/*.{css,graphql,js,jsx,json,jsonc,ts,tsx}` |\n\nExclusions: `!node_modules/**/*`, `!**/generated`, `!dist`\n\n## Common Overrides\n\n### Test Files\n\nRelax strict rules in test files:\n\n```jsonc\n{\n  \"overrides\": [\n    {\n      \"includes\": [\"**/tests/**/*.ts\", \"**/*.test.ts\"],\n      \"linter\": {\n        \"rules\": {\n          \"style\": {\n            \"noNonNullAssertion\": \"off\"\n          },\n          \"suspicious\": {\n            \"noExplicitAny\": \"off\"\n          }\n        }\n      }\n    }\n  ]\n}\n```\n\n### Generated/ABI Files\n\nDisable sorting and compact formatting for generated code:\n\n```jsonc\n{\n  \"overrides\": [\n    {\n      \"includes\": [\"**/abi/**/*.ts\", \"**/generated/**/*.ts\"],\n      \"assist\": {\n        \"actions\": {\n          \"source\": {\n            \"useSortedKeys\": \"off\"\n          }\n        }\n      },\n      \"javascript\": {\n        \"formatter\": {\n          \"expand\": \"never\"\n        }\n      }\n    }\n  ]\n}\n```\n\n### Import Restrictions\n\nEnforce barrel imports for specific modules:\n\n```jsonc\n{\n  \"overrides\": [\n    {\n      \"includes\": [\"src/**/*.{ts,tsx}\"],\n      \"linter\": {\n        \"rules\": {\n          \"correctness\": {\n            \"noRestrictedImports\": {\n              \"level\": \"error\",\n              \"options\": {\n                \"paths\": {\n                  \"@/core\": \"Import from @/core (barrel) instead of subpaths\"\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  ]\n}\n```\n\n## Key Rules Reference\n\n| Rule                      | Default              | Rationale                               |\n| ------------------------- | -------------------- | --------------------------------------- |\n| `noFloatingPromises`      | error                | Floating promises cause bugs            |\n| `noUnusedImports`         | off                  | Allow during dev, enforce in pre-commit |\n| `noUnusedVariables`       | error                | Keep code clean                         |\n| `useImportType`           | warn (separatedType) | Explicit type imports                   |\n| `useSortedKeys`           | on                   | Consistent object ordering              |\n| `useSortedClasses`        | warn (UI)            | Tailwind class sorting                  |\n| `useFilenamingConvention` | kebab/camel/Pascal   | Flexible naming                         |\n| `noVoid`                  | off                  | Useful for useEffect callbacks          |\n| `useTemplate`             | off                  | Allow string concatenation              |\n\n## Git Hooks Integration\n\n### Lint-Staged Configuration\n\nStandard pattern for pre-commit hooks:\n\n```javascript\n// .lintstagedrc.js\nmodule.exports = {\n  \"*.{json,jsonc,ts,tsx}\": \"bun biome check --write\",\n  \"*.{md,yml,yaml}\": \"bun prettier --cache --write\",\n  \"*.{ts,tsx}\": \"bun biome check --write --only=correctness/noUnusedImports\",\n};\n```\n\nThe separate `noUnusedImports` pass enforces import cleanup only at commit time, not during development.\n\n## UI-Specific Configuration\n\nFor frontend projects with Tailwind CSS:\n\n```jsonc\n{\n  \"css\": {\n    \"parser\": {\n      \"tailwindDirectives\": true\n    }\n  },\n  \"assist\": {\n    \"actions\": {\n      \"source\": {\n        \"useSortedAttributes\": \"on\"\n      }\n    }\n  },\n  \"linter\": {\n    \"rules\": {\n      \"nursery\": {\n        \"useSortedClasses\": {\n          \"fix\": \"safe\",\n          \"level\": \"warn\",\n          \"options\": {\n            \"attributes\": [\"classList\"],\n            \"functions\": [\"clsx\", \"cva\", \"cn\", \"tv\", \"tw\"]\n          }\n        }\n      }\n    }\n  }\n}\n```\n\nBiome `v2.4.0+` auto-enables CSS Modules parsing for `*.module.css`, so explicit\n`\"cssModules\": true` is usually unnecessary unless your project needs non-standard behavior.\n\n## Biome v2.4+ Notes\n\n- `biome check` and `biome ci` now support `--only` and `--skip` for targeted rule/action runs.\n- `biome check --write` now also applies formatting when applying fixes.\n- Config lookup now also supports hidden files: `.biome.json` and `.biome.jsonc`.\n- Config lookup now also supports user config directories (for example, `$HOME/.config/biome` on Linux/macOS equivalents).\n- New formatter option `formatter.trailingNewline` can disable trailing newline insertion.\n- HTML formatter behavior changed significantly in `v2.4.0`; expect larger diffs in HTML/Vue/Svelte/Astro if formatter support is enabled.\n\n## Troubleshooting\n\n### Common Issues\n\n**\"No files matched\"**: Check `files.includes` patterns match your file structure.\n\n**Conflicting rules**: Overrides are applied in order; later overrides take precedence.\n\n**Schema errors**: Use local schema reference for IDE support:\n\n```jsonc\n\"$schema\": \"./node_modules/@biomejs/biome/configuration_schema.json\"\n```\n\n### Biome vs Prettier\n\nBiome handles JS/TS/JSON/CSS formatting. Use Prettier for:\n\n- Markdown (`.md`, `.mdx`)\n- YAML (`.yml`, `.yaml`)\n\n## Additional Resources\n\n### Examples\n\nWorking examples in `./examples/`:\n\n- **`./examples/base-config.jsonc`** - Minimal library configuration\n- **`./examples/ui-config.jsonc`** - Frontend project with Tailwind\n- **`./examples/lint-staged.js`** - Pre-commit hook configuration\n\n### Full Documentation\n\nFor advanced features, migrations, or complete rule reference, consult the official Biome documentation via Context7 MCP:\n\n```\nUse context7 to fetch Biome documentation for [specific topic]\n```\n\nThe official docs at biomejs.dev should be consulted as a last resort for features not covered here.","tags":["biome","agent","skills","paulrberg","agent-skills","ai-agents"],"capabilities":["skill","source-paulrberg","skill-biome-js","topic-agent-skills","topic-ai-agents"],"categories":["agent-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/PaulRBerg/agent-skills/biome-js","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add PaulRBerg/agent-skills","source_repo":"https://github.com/PaulRBerg/agent-skills","install_from":"skills.sh"}},"qualityScore":"0.475","qualityRationale":"deterministic score 0.47 from registry signals: · indexed on github topic:agent-skills · 50 github stars · SKILL.md body (6,656 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-22T00:56:17.056Z","embedding":null,"createdAt":"2026-04-18T22:17:32.799Z","updatedAt":"2026-04-22T00:56:17.056Z","lastSeenAt":"2026-04-22T00:56:17.056Z","tsv":"'/abi':205 '/core':240,243 '/examples':559 '/examples/base-config.jsonc':560 '/examples/lint-staged.js':569 '/examples/ui-config.jsonc':564 '/generated':166,207 '/node_modules':76,535 '/tests':181 'action':210,377 'add':22 'addit':553 'advanc':578 'allow':262,304 'also':444,453,463 'alway':69,131 'appli':445,448,517 'ask':12 'assist':209,376 'attribut':390 'auto':401 'auto-en':400 'barrel':221,244 'base':48,93 'behavior':422,485 'biom':2,15,17,23,25,30,35,38,329,342,398,423,426,429,440,537,540,588,597 'biome-j':1 'biome.json':457 'biome.jsonc':34,459 'biomej':21,41,46 'biomejs.dev':606 'biomejs/biome/configuration_schema.json':77,536 'bug':259 'bun':328,335,341 'cach':337 'callback':301 'caus':258 'chang':486 'check':330,343,427,441,506 'ci':430 'class':290 'classlist':391 'clean':274 'cleanup':353 'clsx':393 'cn':395 'code':201,273 'commit':269,319,356,572 'common':135,168,501 'compact':197 'complet':582 'concaten':306 'concept':54 'config':18,57,60,96,115,450,460,466 'configur':14,40,47,313,364,563,574 'conflict':513 'consist':283 'consult':585,609 'consum':66 'context7':591,594 'core':53 'correct':234 'correctness/nounusedimports':346 'cover':617 'css':103,146,155,370,372,403 'cssmodul':410 'cva':394 'default':252 'dev':264 'develop':360 'diff':492 'directori':467 'disabl':194,479 'dist':167 'doc':604 'document':576,589,598 'enabl':402,499 'enforc':220,265,351 'equival':473 'error':31,237,255,271,525 'exampl':469,555,557 'exclus':163 'expand':216 'expect':490 'explicit':134,278,409 'export':64 'extend':16,55,58,78,91,98,122 'featur':579,615 'fetch':596 'file':80,101,128,171,177,193,456,504,511 'files.includes':73,133,507 'fix':29,385,449 'flexibl':294 'float':256 'format':39,198,446,543 'formatt':215,475,484,496 'formatter.trailingnewline':477 'frontend':366,565 'full':575 'function':392 'generat':200 'generated/abi':192 'git':307 'graphql':154,156 'guidanc':44 'handl':541 'hidden':455 'home/.config/biome':470 'hook':308,320,573 'html':483 'html/vue/svelte/astro':494 'ide':531 'import':218,222,241,280,352 'includ':81,102,129,180,204,228 'inherit':111,116 'insert':482 'instead':245 'integr':309 'issu':502 'javascript':214,321 'js':3,82,104,141,147,157 'js/ts/json/css':542 'json':83,106,142,149,159,324 'jsonc':74,84,97,107,120,143,150,160,178,202,226,325,371,533 'jsx':105,148,158 'kebab/camel/pascal':293 'keep':272 'key':248 'larger':491 'last':612 'later':520 'level':236,387 'librari':140,562 'lint':27,36,311 'lint-stag':26,310 'linter':184,232,381 'lintstagedrc.js':322 'linux/macos':472 'local':527 'lookup':451,461 'markdown':547 'match':505,509 'mcp':592 'md':332,548 'mdx':549 'mention':33 'migrat':580 'minim':561 'modul':87,165,225,404 'module.css':407 'module.exports':323 'monorepo':110,113 'must':68 'name':295 'need':418 'never':217 'new':474 'newlin':481 'node':86,164 'noexplicitani':190 'nofloatingpromis':254 'non':420 'non-standard':419 'nononnullassert':187 'norestrictedimport':235 'note':425 'nounusedimport':260,349 'nounusedvari':270 'novoid':296 'npm':62 'nurseri':383 'object':284 'offici':587,603 'option':238,389,476 'order':285,519 'overrid':24,123,127,169,179,203,227,515,521 'packag':63,125 'package-specif':124 'packages/my-package/biome.jsonc':121 'pars':405 'parser':373 'pass':350 'path':239 'pattern':52,130,136,139,315,508 'pre':268,318,571 'pre-commit':267,317,570 'preced':523 'prettier':336,539,545 'project':51,67,90,137,367,417,566 'promis':257 'provid':70 'quick':43 'rational':253 'refer':250,529,584 'relax':172 'resort':613 'resourc':554 'restrict':219 'root':118 'rule':174,185,233,249,251,382,514,583 'rule/action':438 'run':439 'sablier':50 'sablier/devkit/biome':79 'sablier/devkit/biome/base':99 'sablier/devkit/biome/ui':100 'safe':386 'schema':75,524,528,534 'separ':348 'separatedtyp':277 'set':19 'share':56,59 'signific':487 'skill':5,42 'skill-biome-js' 'skip':435 'sort':195,291 'sourc':211,378 'source-paulrberg' 'specif':126,224,363,600 'specifi':132 'src':229 'stage':28,312 'standard':314,421 'strict':173 'string':305 'structur':512 'style':186 'subpath':247 'support':432,454,464,497,532 'suspici':189 'tailwind':289,369,568 'tailwinddirect':374 'take':522 'target':437 'test':170,176 'test.ts':183 'time':357 'topic':601 'topic-agent-skills' 'topic-ai-agents' 'trail':480 'troubleshoot':500 'true':375,411 'ts':85,108,144,151,161,182,206,208,230,326,339 'tsx':109,152,162,231,327,340 'tv':396 'tw':397 'type':138,279 'ui':89,95,288,362 'ui-specif':361 'ui/frontend':145 'unless':415 'unnecessari':414 'use':8,119,298,526,544,593 'useeffect':300 'usefilenamingconvent':292 'useimporttyp':275 'user':11,465 'usesortedattribut':379 'usesortedclass':286,384 'usesortedkey':212,281 'usetempl':302 'usual':413 'v2.4':424 'v2.4.0':399,489 'via':61,590 'vs':538 'warn':276,287,388 'work':556 'workspac':114 'write':331,338,344,442 'yaml':334,550,552 'yml':333,551","prices":[{"id":"3ae22e63-31bc-48aa-953f-a136b7bd8110","listingId":"bde293b4-fa99-441e-acb1-e3bb29e976b9","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"PaulRBerg","category":"agent-skills","install_from":"skills.sh"},"createdAt":"2026-04-18T22:17:32.799Z"}],"sources":[{"listingId":"bde293b4-fa99-441e-acb1-e3bb29e976b9","source":"github","sourceId":"PaulRBerg/agent-skills/biome-js","sourceUrl":"https://github.com/PaulRBerg/agent-skills/tree/main/skills/biome-js","isPrimary":false,"firstSeenAt":"2026-04-18T22:17:32.799Z","lastSeenAt":"2026-04-22T00:56:17.056Z"}],"details":{"listingId":"bde293b4-fa99-441e-acb1-e3bb29e976b9","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"PaulRBerg","slug":"biome-js","github":{"repo":"PaulRBerg/agent-skills","stars":50,"topics":["agent-skills","ai-agents"],"license":"mit","html_url":"https://github.com/PaulRBerg/agent-skills","pushed_at":"2026-04-20T16:22:56Z","description":"PRB's collection of agent skills","skill_md_sha":"7b90cd81499f25ff9e3a2a3e7ae6f0337522f76b","skill_md_path":"skills/biome-js/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/PaulRBerg/agent-skills/tree/main/skills/biome-js"},"layout":"multi","source":"github","category":"agent-skills","frontmatter":{"name":"biome-js","description":"This skill should be used when the user asks to \"configure Biome\", \"extend biome config\", \"set up BiomeJS\", \"add biome overrides\", \"biome lint-staged\", \"fix biome errors\", or mentions biome.jsonc, Biome linting, or Biome formatting configuration."},"skills_sh_url":"https://skills.sh/PaulRBerg/agent-skills/biome-js"},"updatedAt":"2026-04-22T00:56:17.056Z"}}