About oxfmt
A workflow skill for configuring and using Oxfmt, including formatting, sorting, migration, editor setup, and CI checks. It emphasizes checking the repository's existing conventions and verifying changes with Oxfmt.
Key features
- 01Inspect existing formatter configuration
- 02Configure Oxfmt and its CLI
- 03Sort imports and supported file content
- 04Guide Prettier or Biome migration
- 05Verify formatting in CI
Use cases
- 01Set up Oxfmt in a repository
- 02Migrate formatting from Prettier or Biome
- 03Add formatting checks for changed files
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ dobroslavradosavljevic/ skills --skill oxfmtAfter installing, type/oxfmtin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
agents/openai.yamlreferences/languages-sorting-ignores.mdprettier-migration-ci.mdsetup-cli-config.mdsource-map.mdusage-guide.mdDetails
From the project READMEOxfmt
Use this skill when work touches Oxfmt or Oxc formatting: install/config, day-to-day usage, Prettier/Biome migration, sorting extras, language support, editors, or CI --check gates.
Workflow
- Inspect the local Oxfmt surface before changing code:
- Package version for
oxfmt(still 0.x / beta until 1.0; 0.71 at last refresh). - Config: prefer
oxfmt.config.ts/.mtswithdefineConfig; also accept.oxfmtrc.json(c)(one type per directory); Vite+ may usefmtinvite.config.*instead (nested configs always off in Vite+ mode). - Remaining Prettier/Biome setup,
.prettierignore, scripts (format/format:check), editor default formatter.
- Package version for
- For setup, how-to, style choices, sorting, monorepos, pairing with Oxlint, or troubleshooting, follow the full guide first: usage-guide.md.
- Refresh current official docs when versions differ from the snapshot or the work touches language support, sorting, or migration. Start from source-map.md.
- Route deeper detail to the focused references:
- Install, CLI, config options, editorconfig: setup-cli-config.md.
- Languages, sorting (imports / Tailwind / package.json / JSDoc), ignores, inline comments: languages-sorting-ignores.md.
- Prettier/Biome migration, coexistence, CI, and
.vscodesettings: prettier-migration-ci.md.
- Preserve the project's print width, quote/semi style, and
experimentalOperatorPositionunless migrating or the user asks to change them. - Verify with
bunx oxfmt --check(CI) orbunx oxfmt(write) on the touched paths.
Core Judgment
- Oxfmt is Prettier-compatible for JS/TS (aim: match Prettier output; diffs vs recent Prettier are bugs). It is not 1.0 yet — pin lockfiles.
- Default mode is write. CI gate is
oxfmt --check(exit 1 on drift; exit 2 when no files matched). - No Prettier-style CLI style flags (
--no-semi, etc.) — style lives in the config file only. - Default
printWidthis 100, not Prettier's 80. SetprintWidth: 80when migrating to minimize diffs. - Prefer
oxfmt.config.ts+defineConfigfor new configs. Keep or use.oxfmtrc.jsononly when the project already has it.--init/--migratestill write JSON — convert to TS when adding a new config. - Prefer
ignorePatternsfor new projects;.prettierignorestill works during migration. Patterns cannot use..or match files outside the config directory. .gitignoreapplies to walk/dir targets, not explicitly named files. A gitignored directory passed as a path is still skipped.- Built-in sorting (
sortImports,sortTailwindcss,sortPackageJson,jsdoc) replaces Prettier plugins — Prettier plugins are unsupported. - Tailwind: enable
sortTailwindcss; setstylesheet(v4) orconfig(v3); list helpers infunctions(cn/clsx/…). Paths are relative to the Oxfmt config. sortPackageJsondefaults on — expectpackage.jsondiffs; disable if unwanted.experimentalOperatorPositionis supported ("start" | "end", default"end").experimentalTernariesis still unsupported.- YAML (
.yml/.yaml) is native. HTML/Vue/Svelte/Markdown/MDX/Handlebars/MJML remain backed by bundled Prettier 3.9.9 (Vue/Svelte<script>is native; native Markdown is in progress). - Editor: Oxfmt owns format + import/Tailwind sort. Set
editor.formatOnSaveModeto"file"(Oxfmt does not partial-format). Oxlint owns unused removal viasource.fixAll.oxc. Disable TSorganizeImports/removeUnusedImports. - Do not run Oxfmt alongside Prettier or Biome as formatters in the same pipeline.
- Oxfmt formats; it does not replace a linter. Drop
eslint-plugin-prettier; keepeslint-config-prettieronly if ESLint remains. - Astro and formats that need Prettier plugins may be blockers until Oxfmt supports them.
Verification
Prefer repository-owned commands. For meaningful Oxfmt work, cover the relevant subset:
bunx oxfmt --checkon changed paths or the whole repo for CI parity.bunx oxfmtlocally / lint-staged when applying format.- After Prettier migration: spot-check JS/TS diffs; confirm
printWidthandexperimentalOperatorPosition; remove Prettier scripts/deps when ready. - Sorting: confirm
sortImports/ Tailwind (stylesheetorconfig+functions) /package.jsonbehavior matches team expectations. - Editor format-on-save (
formatOnSaveMode: "file") +source.fixAll.oxcsmoke when changing Oxc extension settings; confirm TS organize-imports is off.
Report which checks ran, which did not, and any 0.x maturity or language-support assumptions that remain.
Comments
Markdown supported