Agent Skills
› pollinations/pollinations
› code-formatting
code-formatting
GitHub使用 Biome 工具格式化当前分支相较于基准分支的 JS/TS/JSON 代码,支持自定义基准分支。该 Skill 用于在提交或创建 PR 前清理代码风格,确保与 CI 工作流配置一致,提升代码质量。
Trigger Scenarios
用户要求格式化代码
准备提交代码前
创建 PR 前
Install
npx skills add pollinations/pollinations --skill code-formatting -g -y
SKILL.md
Frontmatter
{
"name": "code-formatting",
"description": "Format code on the current branch using Biome. Use when asked to format, lint, or clean up code before committing or creating a PR."
}
Code Formatting
Format JS/TS/JSON files changed on the current branch using Biome.
Quick Usage
.claude/skills/code-formatting/scripts/format-branch.sh
This formats all .js, .ts, .jsx, .tsx, .json, .jsonc files changed compared to main.
Custom Base Branch
.claude/skills/code-formatting/scripts/format-branch.sh develop
What It Does
- Finds files changed on current branch vs base branch
- Filters to JS/TS/JSON files only
- Runs
npx @biomejs/biome check --writeon those files - Uses same settings as the
ci-pull-request-checks.ymlCI workflow
Config
Biome config is at biome.jsonc in repo root.
Notes
- Run from repo root
- Requires Node.js/npx
- Only formats changed files (not entire codebase)
Version History
-
5cb4f4b
Current 2026-10-19 13:07
升级 Biome 至 2.5.15 版本,将执行命令从 biome 更改为 npx @biomejs/biome,并修复了因版本升级产生的新 lint 错误及格式问题。
- 99bce92 2026-07-25 10:38


