
Migrate Oxfmt
Switch a JavaScript or TypeScript repo from Prettier or Biome to Oxfmt without hand-rewriting formatter config and ignore rules.
Overview
Migrate-oxfmt is an agent skill for the Build phase that guides automated migration from Prettier or Biome to Oxfmt for JavaScript/TypeScript projects.
Install
npx skills add https://github.com/oxc-project/oxc --skill migrate-oxfmtWhat is this skill?
- Runs built-in automated migration via `npx oxfmt@latest --migrate prettier` or `--migrate biome`
- Creates `.oxfmtrc.json` from existing Prettier or Biome formatter settings
- Migrates `.prettierignore` and Biome `files.includes` negations into `ignorePatterns`
- Maps `prettier-plugin-tailwindcss` to `sortTailwindcss` and detects package-json sorting plugins
- Documents Biome two-level formatter fields mapped to Oxfmt options in a reference table
- Supports automated migration from both Prettier and Biome via `npx oxfmt@latest --migrate`
- Maps Biome `formatter.*` and `javascript.formatter.*` into a single `.oxfmtrc.json`
Adoption & trust: 1.9k installs on skills.sh; 21.5k GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You want Oxfmt’s speed and Prettier compatibility but your team still has Prettier or Biome configs, plugins, and ignore files wired through the repo.
Who is it for?
Solo builders modernizing formatter tooling on an existing JS/TS app or library who already use Prettier or Biome today.
Skip if: Greenfield projects with no formatter yet (initialize Oxfmt directly), or repos whose primary language stack is outside JS/TS formatting.
When should I use this skill?
Use when asked to migrate, convert, or switch a JavaScript/TypeScript project's formatter from Prettier or Biome to Oxfmt.
What do I get? / Deliverables
You get a generated `.oxfmtrc.json` with migrated options and ignore patterns so you can run Oxfmt as the single formatter going forward.
- Generated `.oxfmtrc.json` aligned with prior formatter settings
- Updated ignore/sort options migrated from legacy formatter plugins
Recommended Skills
Journey fit
Formatter migration is a build-time hygiene task you do while shaping the JS/TS codebase, before you rely on consistent style in review and CI. Frontend and full-stack TS/JS work is where Prettier, Biome, and Oxfmt configs and ignore patterns actually live.
How it compares
Use this procedural migration path instead of manually copying Prettier or Biome options field by field into Oxfmt.
Common Questions / FAQ
Who is migrate-oxfmt for?
It is for solo and indie developers (and small teams) shipping JS/TS products who need a reliable, scripted move from Prettier or Biome to Oxfmt.
When should I use migrate-oxfmt?
Use it during Build when you are standardizing format-on-save and CI checks, before a large refactor or release freeze, or when onboarding contributors complain about slow Prettier/Biome runs.
Is migrate-oxfmt safe to install?
Treat it like any community skill: review the Security Audits panel on this Prism page and inspect what `npx oxfmt@latest` will change in your repo before running migration on production branches.
SKILL.md
READMESKILL.md - Migrate Oxfmt
This skill guides you through migrating a JavaScript/TypeScript project from Prettier or Biome to [Oxfmt](https://oxc.rs/docs/guide/usage/formatter). ## 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 ### From Prettier ```bash npx oxfmt@latest --migrate prettier ``` This will: - Find and read your Prettier config (any format Prettier supports) - Create `.oxfmtrc.json` with migrated options - Migrate `.prettierignore` patterns to `ignorePatterns` - Migrate `prettier-plugin-tailwindcss` options to `sortTailwindcss` - Detect `prettier-plugin-packagejson` and enable `sortPackageJson` ### From Biome ```bash npx oxfmt@latest --migrate biome ``` This will: - Find and read `biome.json` or `biome.jsonc` - Create `.oxfmtrc.json` with migrated options - Migrate negated patterns from `files.includes` to `ignorePatterns` - Map Biome's two-level config (`formatter.*` and `javascript.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"`) | | `formatter.bracketSameLine` | `bracketSameLine` | | `formatter.bracketSpacing` | `bracketSpacing` | | `formatter.attributePosition` (`"multiline"`) | `singleAttributePerLine` (`true`) | Notes (both sources): - Fails if `.oxfmtrc.json` already exists. Delete it first if you want to re-run. - If no source config is found, creates a blank `.oxfmtrc.json` instead. - `overrides` cannot be auto-migrated for either source and must be converted manually. ## Step 2: Review Generated Config After migration, review the generated `.oxfmtrc.json` for these key differences: ### printWidth Prettier and Biome default is 80, oxfmt default is 100. The migration tool sets `printWidth: 80` if not specified in your source config. Decide whether to keep 80 or adopt 100. ### Unsupported Options (Prettier only) These Prettier options are skipped during migration: | Option | Status | | ------------------------------ | ------------------------------------------------ | | `endOfLine: "auto"` | Not supported. Use `"lf"` or `"crlf"` explicitly | | `experimentalTernaries` | Not supported in JS/TS files yet | | `experimentalOperatorPosition` | Not supported in JS/TS files yet | ### sortPackageJson (Prettier only) Enabled by default in oxfmt, but the migration tool disables it unl