Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

configure-formatting

БесплатноЗапускает вложенные скриптыНе проверен

Set up formatters (Biome, Ruff format, rustfmt) with pre-commit and CI format checks. Use when a repo has no formatter, replacing Prettier or Black, or…

laurigatesот laurigates★ 61 звезда на GitHub

Об этом скилле

/configure:formatting

Check and configure code formatting tools against modern best practices.

When to Use This Skill

Use this skill when... Use another approach when...
Setting up Biome, Ruff format, or rustfmt for a project Running an existing formatter (biome format, ruff format)
Migrating from Prettier or ESLint to Biome, or Black to Ruff Fixing individual formatting issues in specific files
Auditing formatter configuration for completeness and best practices Configuring linting rules (/configure:linting instead)
Adding format-on-save and CI format checks Setting up pre-commit hooks only (/configure:pre-commit instead)
Standardizing formatting settings across a monorepo Editing .editorconfig or .vscode/settings.json manually

Context

  • Biome config: !find . -maxdepth 1 -name 'biome.json'
  • Prettier config: !find . -maxdepth 1 \( -name '.prettierrc*' -o -name 'prettier.config.*' \)
  • Rustfmt config: !find . -maxdepth 1 \( -name 'rustfmt.toml' -o -name '.rustfmt.toml' \)
  • EditorConfig: !find . -maxdepth 1 -name '.editorconfig'
  • Package JSON: !find . -maxdepth 1 -name 'package.json'
  • Python project: !find . -maxdepth 1 -name 'pyproject.toml'
  • Rust project: !find . -maxdepth 1 -name 'Cargo.toml'
  • Pre-commit: !find . -maxdepth 1 -name '.pre-commit-config.yaml'
  • Project standards: !find . -maxdepth 1 -name '.project-standards.yaml'

Parameters

Parse from $ARGUMENTS:

  • --check-only: Report compliance status without modifications
  • --fix: Apply all fixes automatically without prompting
  • --formatter <formatter>: Override formatter detection (biome, ruff, rustfmt)

Version Checking

CRITICAL: Before flagging outdated formatters, verify latest releases using WebSearch or WebFetch:

  1. Biome: Check biomejs.dev or GitHub releases
  2. Ruff: Check docs.astral.sh/ruff or GitHub releases
  3. rustfmt: Bundled with Rust toolchain - check Rust releases

Execution

Execute this code formatting configuration workflow:

Step 1: Detect formatters and integration state

Run the detection script to scan the project for formatter config files, script/hook/CI presence, and a recommendation over the detected booleans:

bash "${CLAUDE_SKILL_DIR}/scripts/configure-formatting.sh" --home-dir "$HOME"

Parse STATUS= and the ISSUES: block from the output. The KEY=VALUE lines report formatter detection (BIOME, PRETTIER, RUFF_FORMAT, BLACK, RUSTFMT, EDITORCONFIG), integration signals (FORMAT_SCRIPT, PRE_COMMIT_FORMAT, CI_FORMAT), and a RECOMMENDATION of configured (a modern formatter is set up), migrate (a legacy formatter wants migration to Biome/Ruff), or setup (no formatter detected).

How CI_FORMAT is decided. The probe scans .github/workflows/*.yml|yaml for a command that runs the formatter, then resolves one level of package-script indirection:

Signal CI_FORMAT Why
Workflow runs biome check / biome ci true In Biome 2.x check is the combined command (formatter + linter + import sorting); ci is its CI-oriented variant
Workflow runs biome format, ruff format, cargo fmt, prettier true Format-only commands, named directly
Workflow runs biome lint false Lint-only — it does not format
Workflow runs bun run <s> / npm run <s> / pnpm run <s> / yarn <s> and package.json's scripts.<s> contains any command above true The idiomatic setup keeps the real command in package.json
That script calls another script (depth 2+) false Exactly one level is resolved; deeper chains are out of scope

Indirection needs jq and a readable package.json. When package.json is absent, unparseable, or has no scripts key — or jq is unavailable — the lookup degrades silently to the direct-command scan (no stderr, exit 0).

Modern formatting preferences:

  • JavaScript/TypeScript: Biome (replaces Prettier; replaces ESLint only when the repo is dropping it). A repo that keeps ESLint gets Biome as a formatter only. On RECOMMENDATION=migrate with Prettier present, offer migration to Biome — do not configure Prettier as the target formatter.
  • Python: Ruff format (replaces Black)
  • Rust: rustfmt (standard)

Step 2: Generate compliance report

Print a formatted compliance report:

Code Formatting Compliance Report
==================================
Project: [name]
Language: [detected]
Formatter: [detected]

Configuration:  [status per check]
Format Options: [status per check]
Scripts:        [status per check]
Integration:    [status per check]

Overall: [X issues found]
Recommendations: [list specific fixes]

If `--c

Полный SKILL.md на GitHub

Установить configure-formatting в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Glob
Grep
Read
Write
Edit
Bash(bash ${CLAUDE_SKILL_DIR}/scripts/configure-formatting.sh *)
Bash(find *)
Bash(npm install *)
Bash(npm uninstall *)
Bash(bun add *)
Bash(uv add *)
Bash(uv remove *)
Bash(uv run ruff *)
Bash(biome format *)
Bash(ruff format *)
Bash(cargo fmt *)
AskUserQuestion
TodoWrite
WebSearch
WebFetch

Вложенные файлы

REFERENCE.mdscripts/configure-formatting.sh

FAQ

Что делает скилл configure-formatting?

Set up formatters (Biome, Ruff format, rustfmt) with pre-commit and CI format checks. Use when a repo has no formatter, replacing Prettier or Black, or unifying monorepo style.

Как установить скилл configure-formatting?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл configure-formatting запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить configure-formatting с