migrate-oxfmt
БесплатноБез исполняемых скриптовНе проверенGuide for migrating a project from Prettier or Biome to Oxfmt. Use when asked to migrate, convert, or switch a project's formatter from Prettier or Biome to…
от oxc-project★ 23 705 звёзд на GitHubОб этом скилле
This skill guides you through migrating a project from Prettier or Biome to Oxfmt.
Overview
Oxfmt is a high-performance, Prettier-compatible code formatter. Most Prettier options are supported directly.
An automated migration tool is built into Oxfmt, supporting both Prettier and Biome as migration sources.
Step 1: Run Automated Migration
First, decide whether the automated tool fits:
- Static config (JSON, or a JS/TS config that just exports a plain object): use
--migratebelow. - Dynamic JS/TS config (logic such as environment branches or computed values):
--migratewrites only a resolved snapshot of the values, and the logic does not survive (a warning is printed). Port the logic tooxfmt.config.tsmanually with the option mappings in this guide. - Nested per-directory configs:
--migrateonly handles the config in the current directory. Run it again in each nested directory (see "Nested Config" in Step 2).
From Prettier
npx oxfmt@latest --migrate prettier
This will:
- Find your Prettier config in the current directory, in the same order as Prettier
- Supported:
package.json(prettierfield),.prettierrc(JSON only),.prettierrc.json, and JS/TS configs (.prettierrc.*,prettier.config.*) - Shareable configs (e.g.
"prettier": "@company/prettier-config") are resolved - YAML, JSON5 and TOML configs are not supported. Convert them to JSON or JS first
- Supported:
- Create
.oxfmtrc.jsonwith migrated options- Only Prettier-compatible options are migrated, others are skipped with a warning
- Migrate
overridesoverrides[].options.parseris migrated toassociations[].language
- Migrate
.prettierignorepatterns toignorePatterns - Migrate
prettier-plugin-tailwindcssoptions tosortTailwindcss - Migrate
prettier-plugin-svelteoptions tosvelte(svelteSortOrder→sortOrder,svelteAllowShorthand→allowShorthand,svelteIndentScriptAndStyle→indentScriptAndStyle) - Migrate
prettier-plugin-astrooptions toastro(astroAllowShorthand→allowShorthand,astroSkipFrontmatter→skipFrontmatter,astroCompressHTML→compressHTML) - Detect
prettier-plugin-packagejsonand enablesortPackageJson - Skip other plugins with a warning
Notes (Prettier):
- Fails if no Prettier config is found in the current directory. Use
--initto create a blank.oxfmtrc.jsoninstead. - The generated
.oxfmtrc.jsonmay not be formatted yet. Runoxfmtafter migration.
From Biome
npx oxfmt@latest --migrate biome
This will:
- Find and read
biome.jsonorbiome.jsonc - Create
.oxfmtrc.jsonwith migrated options - Migrate negated patterns from
files.includestoignorePatterns - Map Biome's two-level config (
formatter.*andjavascript.formatter.*) to Oxfmt options
Biome option mapping:
| Biome | Oxfmt |
|---|---|
formatter.indentStyle ("tab"/"space") |
useTabs (true/false) |
formatter.indentWidth |
tabWidth |
formatter.lineWidth |
printWidth |
javascript.formatter.quoteStyle |
singleQuote |
javascript.formatter.jsxQuoteStyle |
jsxSingleQuote |
javascript.formatter.quoteProperties ("asNeeded") |
quoteProps ("as-needed") |
javascript.formatter.trailingCommas |
trailingComma |
javascript.formatter.semicolons ("always"/"asNeeded") |
semi (true/false) |
javascript.formatter.arrowParentheses ("asNeeded") |
arrowParens ("avoid") |
javascript.formatter.bracketSameLine |
bracketSameLine |
formatter.bracketSpacing |
bracketSpacing |
formatter.attributePosition ("multiline") |
singleAttributePerLine (true) |
Notes (Biome):
- For
formatter.*options in the table, ajavascript.formatter.*value of the same name takes precedence when present.bracketSameLineis read only fromjavascript.formatter.bracketSameLine. - Options not set in
biome.jsonare written to.oxfmtrc.jsonwith Biome's default values explicitly (e.g.printWidth: 80,useTabs: true), so the output preserves Biome's formatting behavior. - If no Biome config is found, creates a blank
.oxfmtrc.jsoninstead. overridescannot be auto-migrated and must be converted manually (a warning is printed if detected).
Notes (both sources):
- Fails if an Oxfmt config (
.oxfmtrc.json,.oxfmtrc.jsonc,oxfmt.config.tsoroxfmt.config.mts)
Установить migrate-oxfmt в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл migrate-oxfmt?
Guide for migrating a project from Prettier or Biome to Oxfmt. Use when asked to migrate, convert, or switch a project's formatter from Prettier or Biome to Oxfmt.
Как установить скилл migrate-oxfmt?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл migrate-oxfmt запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic