Skip to content
Ultracite
Esc
↑↓navigate↵open⌘Jpreview

Trae, where AGENTS.md is a switch you turn on

ultracite init --editors trae writes .vscode/settings.json, so Trae’s IDE window formats on save and applies safe fixes through the Oxc, Biome or ESLint extension. Trae’s agent reads AGENTS.md only after you switch it on, and its Auto Fix Lints setting has it fix the code style issues it finds.

Trae by ByteDanceChecked against Trae 3.6.2

{
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "editor.formatOnPaste": true,
  "editor.formatOnSave": true,Format on save
  "emmet.showExpandedAbbreviation": "never",
  "js/ts.tsdk.path": "node_modules/typescript/lib",The project’s TypeScript
  "js/ts.tsdk.promptToUseWorkspaceVersion": true,
  "[astro]": {
    "editor.defaultFormatter": "astro-build.astro-vscode"
  },
  "[css]": {
    "editor.defaultFormatter": "oxc.oxc-vscode"
  },
  "[graphql]": {
    "editor.defaultFormatter": "oxc.oxc-vscode"
  },
  "[handlebars]": {
    "editor.defaultFormatter": "oxc.oxc-vscode"
  },
  "[html]": {
    "editor.defaultFormatter": "oxc.oxc-vscode"
  },
  "[javascript]": {
    "editor.defaultFormatter": "oxc.oxc-vscode"
  },
  "[javascriptreact]": {
    "editor.defaultFormatter": "oxc.oxc-vscode"
  },
  "[json]": {
    "editor.defaultFormatter": "oxc.oxc-vscode"
  },
  "[jsonc]": {
    "editor.defaultFormatter": "oxc.oxc-vscode"
  },
  "[less]": {
    "editor.defaultFormatter": "oxc.oxc-vscode"
  },
  "[markdown]": {
    "editor.defaultFormatter": "oxc.oxc-vscode"
  },
  "[scss]": {
    "editor.defaultFormatter": "oxc.oxc-vscode"
  },
  "[typescript]": {Oxfmt formats it
    "editor.defaultFormatter": "oxc.oxc-vscode"
  },
  "[typescriptreact]": {
    "editor.defaultFormatter": "oxc.oxc-vscode"
  },
  "[vue-html]": {
    "editor.defaultFormatter": "oxc.oxc-vscode"
  },
  "[vue]": {
    "editor.defaultFormatter": "oxc.oxc-vscode"
  },
  "[yaml]": {
    "editor.defaultFormatter": "oxc.oxc-vscode"
  },
  "editor.codeActionsOnSave": {
    "source.fixAll.oxc": "explicit"Oxlint’s safe fixes
  },
  "typescript.enablePromptUseWorkspaceTsdk": true,
  "typescript.tsdk": "node_modules/typescript/lib"
}
Oxlint + Oxfmt
What init does in Trae
  1. 1Writes .vscode/settings.jsonA new file, or merged into yours setting by setting, with your comments and other settings kept.
  2. 2Installs oxc.oxc-vscodeWith trae --install-extension, when it creates the settings file.
Then, in Trae
  1. 3If init couldn’t run trae, install oxc.oxc-vscode from the Extensions view in Trae’s IDE window, or Biome’s if you picked Biome. If the store doesn’t list it, install its .vsix with ··· → Install from VSIX.
  2. 4If you also ran --agents, turn on “Include AGENTS.md in the context” under Settings → Rules & Memories → Import Settings.
  3. 5Save a file: Oxfmt formats it and Oxlint’s safe fixes apply.

Three toolchains, one settings.json

init writes the settings for the toolchain you pick, so Trae formats with the same tool as ultracite fix and applies its fixes when you save.

  • Oxlint + OxfmtDefault

    Extension
    oxc.oxc-vscode
    Formats with
    oxc.oxc-vscode
    On save
    source.fixAll.oxc

    --linter oxlint

  • Biome

    Extension
    biomejs.biome
    Formats with
    biomejs.biome
    On save
    source.fixAll.biomesource.organizeImports.biome

    --linter biome

  • ESLint + Prettier + Stylelint

    Extensions
    dbaeumer.vscode-eslintesbenp.prettier-vscode
    Formats with
    esbenp.prettier-vscode
    On save
    source.fixAll.eslintsource.organizeImports

    --linter eslint

Extensions, launcher and the agent sandbox

Trae is a VS Code build with its own extension store, and its IDE window applies the .vscode/settings.json that init writes. Its agent’s sandbox, on in Manual and Automatic Approval modes, keeps .vscode read-only.

Extension store
Trae’s own store, in the IDE window’s Extensions view. If an extension isn’t listed, Trae’s docs show downloading its .vsix from the VS Code Marketplace and dragging it into the store.
Launcher
Trae ships a trae command, built from VS Code’s command-line tool, and init installs the extension with trae --install-extension.
VS Code base
Trae 3.6.2 is built on VS Code 1.107.1. That predates js/ts.tsdk.path, so for Trae init also writes typescript.tsdk. The Oxc, Biome, ESLint and Prettier extensions all support that version.
Agent sandbox
In Manual Approval and Automatic Approval modes, agent commands run in a sandbox that can’t write to .vscode, .trae or .git. Run npx ultracite init in your own terminal.
Two windows
Since 3.6.0, Trae has an Agent window for tasks across projects next to the IDE window. Rules, skills and settings sync between them; VS Code extensions run in the IDE window.
Import from VS Code
Settings → General → Import Configuration copies extensions, settings, snippets and shortcuts from VS Code or Cursor. It overwrites Trae’s own and can’t be undone.

Two switches decide what Trae’s agent sees

Trae’s built-in Agent reads project rules from .trae/rules/, and AGENTS.md only once you turn on “Include AGENTS.md in the context”. With Auto Fix Lints on (SOLO mode always has it on), it fixes code style issues it finds during a chat, and #Problems hands it everything in the Problems panel. Ultracite writes no hook for Trae, so nothing runs ultracite fix after an edit unless the agent does.

Where the agent looks for instructions
  1. 1~/.trae/user_rulesYour global rules for every project, created under Settings → Rules & Memories.
  2. 2.trae/rules/Project rules in Markdown, each set to Always Apply, Apply to Specific Files, Apply Intelligently or Apply Manually. Subfolders are read up to three levels deep.
  3. 3AGENTS.mdUltraciteRead from the project root once “Include AGENTS.md in the context” is on. Where init writes Ultracite’s rules.
  4. 4CLAUDE.md, CLAUDE.local.mdRead from the project root once “Include CLAUDE.md in context” is on.
  5. 5web/AGENTS.md, web/.trae/rules/Rules in a subfolder apply only when the agent reads, or you mention, files in that folder.
  1. 01The Agent writes an edit to a file in your project.
  2. 02The Oxc, Biome or ESLint extension lints the file and lists what it finds in the Problems panel, as it does for your own edits.
  3. 03With Auto Fix Lints on, the Agent fixes the code style issues it finds during the chat.
  4. 04To hand it everything at once, add #Problems to your message. No ultracite fix --hook runs, because init writes no Trae hook.

Worth knowing about Trae

  • The Ultracite skill needs a switch too

    Trae loads skills from .trae/skills/, and from .agents/skills/, where init installs the Ultracite skill, only after you turn on “Enable .agents Skills Directory” under Settings → Skills & Commands. A skill with the same name in .trae/skills/ wins.

  • Its own hooks, which you set up

    Trae runs hooks from .trae/hooks.json and ~/.trae/hooks.json. A PostToolUse hook can match tool names such as Write and Edit, and exit code 2 passes its stderr to the model. Trae can also import Claude Code’s hooks. Ultracite doesn’t write Trae hooks.

  • Agent edits land before review

    Trae writes the agent’s code to disk before you review it. Code Review in Settings → Conversation sets what you review: every change, only the latest message’s, or nothing, which keeps them all.

Trae questions, answered

Does Ultracite work with Trae?
Yes. npx ultracite init --editors trae writes .vscode/settings.json for Oxlint and Oxfmt, Biome, or ESLint and Prettier. It installs the matching extension with Trae’s trae command, then saving a file formats it and applies the linter’s safe fixes.
Does Trae read AGENTS.md?
Yes, from the project root, once you turn on “Include AGENTS.md in the context” under Settings → Rules & Memories → Import Settings. An AGENTS.md in a subfolder applies when the agent reads or you mention files in that folder.
Why didn’t init install the Oxc extension in Trae?
init installs it with trae --install-extension only when it creates .vscode/settings.json, and only if trae is on your PATH. Otherwise, install it from the Extensions view in the IDE window, or bring it over from VS Code or Cursor with Import Configuration.
Can Trae’s agent run ultracite init for me?
Run it in your own terminal instead. In Manual Approval and Automatic Approval modes, the agent’s commands run in a sandbox that can’t write to .vscode, .trae or .git, so it can’t create .vscode/settings.json.
Does Trae’s agent see Oxlint or ESLint errors?
Through two features. Add #Problems to a message and the agent gets every issue in the Problems panel; turn on Auto Fix Lints and it fixes the code style issues it finds during a chat.
Does Ultracite add a hook for Trae’s agent?
Not from Ultracite. Trae runs hooks from .trae/hooks.json, including PostToolUse after a tool call, but init --hooks doesn’t support Trae.

Ship less slop

One command sets up your linter, formatter, editor and agents. Works with Oxlint, Biome and ESLint.