pollinations

code-formatting

Format code on the current branch using Biome. Use when asked to format, lint, or clean up code before committing or creating a PR.

pollinations 5,014 1,038 Updated 1mo ago

Resources

1
GitHub

Install

npx skillscat add pollinations/pollinations/code-formatting

Install via the SkillsCat registry.

About this skill

We need to produce a 2-3 sentence plain-text summary, objective, factual, no marketing, no superlatives, no calls to action, natural prose, no bullet points, no headings, no markdown. At most 60 words. Provide only the summary text. Let's craft: "This skill formats JavaScript, TypeScript, and JSON files that have changed on the current branch relative to a base branch using Biome. It helps ensure code style consistency before commits or pull requests by linting and fixing only the modified files.

SKILL.md

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

  1. Finds files changed on current branch vs base branch
  2. Filters to JS/TS/JSON files only
  3. Runs npx biome check --write on those files
  4. Uses same settings as the ci-pull-request-checks.yml CI 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)