About code-formatting
A repository skill that runs Biome on JavaScript, TypeScript, and JSON files changed on the current branch. It offers a branch script and supports choosing a comparison branch.
Key features
- 01Finds files changed from a base branch
- 02Filters JS, TS, and JSON formats
- 03Runs `npx biome check --write`
- 04Uses repository Biome configuration
- 05Supports a custom base branch
Use cases
- 01Format files changed on the current branch
- 02Run formatting against a `develop` base
- 03Apply the repository's CI formatting settings
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ pollinations/ pollinations --skill code-formattingAfter installing, type/code-formattingin Claude Code to confirm it loaded.
Bundled filesscripts/format-branch.sh
Details
From the project READMECode 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 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)
Comments
Markdown supported