agentleFS
DobroslavRadosavljevicDobroslavRadosavljevic/cabrakan/.agents/skills/oxfmt/SKILL.md

oxfmt

Skill1 starsChanged 3 months agoMITView on GitHub

Build, review, debug, configure, migrate, teach, or plan Oxfmt JavaScript/TypeScript formatting with current Oxc docs and a full usage guide. Use for oxfmt how-to, oxfmt.config.ts, defineConfig, .oxfmtrc.json, Prettier migration, --check/--write, printWidth, sortImports, sortTailwindcss Tailwind class sorting (stylesheet/config/functions), sortPackageJson, ignorePatterns, oxfmt-ignore, language support, Biome migration, Vite+ fmt, VS Code/Cursor .vscode/settings.json format-on-save, auto sort imports, remove unused via Oxlint source.fixAll.oxc, editors, CI format gates, and day-to-day format workflows.

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 2 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use this skill when work touches Oxfmt or Oxc formatting: install/config, day-to-day usage, Prettier/Biome migration, sorting extras, …

    line 8
  2. Very specific:

    Verify with bunx oxfmt --check (CI) or bunx oxfmt (write) on the touched paths.

    line 23
  3. Very specific:

    Default mode is write. CI gate is oxfmt --check (exit 1 on drift).

    line 28
  4. Very specific:

    Default printWidth is 100, not Prettier's 80.

    line 30
  5. Very specific:

    Prefer oxfmt.config.ts + defineConfig for new configs.

    line 31
  6. Very specific:

    Prefer ignorePatterns for new projects.

    line 32
  7. Distinctive:

    Do not run Oxfmt alongside Prettier or Biome as formatters in the same pipeline.

    line 37
  8. Distinctive:

    Prefer repository-owned commands.

    line 43
  9. Very specific:

    After Prettier migration: spot-check JS/TS diffs.

    line 47

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Oxfmt

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

  1. Inspect the local Oxfmt surface before changing code:
    • Package version for oxfmt (still 0.x / beta until 1.0).
    • Config: prefer oxfmt.config.ts / .mts with defineConfig; also accept .oxfmtrc.json(c) (one type per directory); Vite+ may use fmt in vite.config.ts instead.
    • Remaining Prettier/Biome setup, .prettierignore, scripts (fmt / fmt:check), editor default formatter.
  2. For setup, how-to, style choices, sorting, monorepos, pairing with Oxlint, or troubleshooting, follow the full guide first: usage-guide.md.
  3. Refresh current official docs when versions differ from the snapshot or the work touches language support, sorting, or migration. Start from source-map.md.
  4. Route deeper detail to the focused references:
    • Install, CLI, config options, editorconfig: setup-cli-config.md.
    • Languages, sorting (including Tailwind sortTailwindcss), ignores, inline comments: languages-sorting-ignores.md.
    • Prettier/Biome migration, coexistence, CI, and .vscode settings (format / sort imports / remove unused): prettier-migration-ci.md.
  5. Preserve the project's print width and quote/semi style unless migrating or the user asks to change them.
  6. Verify with bunx oxfmt --check (CI) or bunx 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).
  • No Prettier-style CLI style flags (--no-semi, etc.) — style lives in the config file only.
  • Default printWidth is 100, not Prettier's 80. Set printWidth: 80 when migrating to minimize diffs.
  • Prefer oxfmt.config.ts + defineConfig for new configs. Keep or use .oxfmtrc.json only when the project already has it. --init / --migrate may still write JSON — convert to TS when adding a new config.
  • Prefer ignorePatterns for new projects; .prettierignore still works during migration.
  • Built-in sorting (sortImports, sortTailwindcss, sortPackageJson, jsdoc) replaces Prettier plugins — Prettier plugins are unsupported.
  • Tailwind: enable sortTailwindcss; set stylesheet (v4) or config (v3); list helpers in functions (cn/clsx/…). Paths are relative to the Oxfmt config.
  • sortPackageJson defaults on — expect package.json diffs; disable if unwanted.
  • Editor: Oxfmt owns format + import/Tailwind sort on save; Oxlint owns unused removal via source.fixAll.oxc. Disable TS organizeImports / removeUnusedImports to avoid fighting Oxc.
  • 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; keep eslint-config-prettier only 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 --check on changed paths or the whole repo for CI parity.
  • bunx oxfmt locally / lint-staged when applying format.
  • After Prettier migration: spot-check JS/TS diffs; confirm printWidth intent; remove Prettier scripts/deps when ready.
  • Sorting: confirm sortImports / Tailwind (stylesheet or config + functions) / package.json behavior matches team expectations.
  • Editor format-on-save + source.fixAll.oxc smoke when changing the 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.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.