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

fx reads AGENTS.md and runs lint in your shell

fx reads AGENTS.md from the folder you start it in and the folders above it, plus any nested AGENTS.md next to the files it works on. It has no post-edit hooks, so Ultracite’s rules are what get it to run ultracite fix through its shell tool.

fx by Vercel LabsChecked against fx 0.0.13

# Ultracite Code Standards

This project uses **Ultracite**, a zero-config preset that enforces strict code quality standards through automated formatting and linting.

## Quick Reference

- **Format code**: `npx ultracite fix`
- **Check for issues**: `npx ultracite check`
- **Diagnose setup**: `npx ultracite doctor`

Oxlint + Oxfmt (the underlying engine) provides robust linting and formatting. Most issues are automatically fixable.

…
Ultracite’s rules
Where fx looks for instructions
  1. 1~/.fx/AGENTS.mdYour instructions for every project.
  2. 2Parent folders’ AGENTS.mdRead up to, but not including, your home directory, for projects that live under it.
  3. 3AGENTS.mdUltraciteThe project’s instructions, from the folder where you start fx.
  4. 4apps/web/AGENTS.mdLoaded alongside the root file when fx works on a file in that folder. The closest file wins a conflict.

How fx reads the rules

fx looks only for files named AGENTS.md. It loads your personal one, the ones above your project, the project’s own, and a nested one when it works on a file below it; your prompts take priority over all of them.

One file name
fx doesn’t fall back to CLAUDE.md or any other name. Every instructions file it reads is an AGENTS.md.
Size
64 KiB per file and 128 KiB in total by default. Ultracite’s rules take about 5 KB.
Raise the limits
Set context_limits in ~/.fx/settings.json, or pass --context-limit for one run. Project .fx.json can’t change them.
Turn it off
"context": false in .fx.json or your profile stops fx loading every AGENTS.md, your personal one included.
Extra folders
Additional directories give fx access to their files but don’t load their AGENTS.md.
Check it
When a file is shortened or left out, press ctrl+o and Full detail shows the limit notice.

No hooks: the rules run the linter

fx runs ultracite fix because AGENTS.md tells it to. In the default auto mode, fx runs recognized project commands directly and sends other commands to a review model first; an allow rule in ~/.fx/settings.json lets the command through without a review.

{
  "permission": {
    "bash": {
      "npx ultracite *": "allow"
    }
  }
}
  1. 01fx changes a file with edit_file or write_file.
  2. 02Following AGENTS.md, it runs npx ultracite fix with its shell tool, using your shell startup files.
  3. 03In auto mode the command runs directly or goes to the review model first; a matching allow rule skips the review.
  4. 04fx reads the output and fixes what’s left. A long result is stored, and fx can search it with read_tool_result.

Worth knowing about fx

  • Your shell, loaded once

    fx loads your shell startup files once per process and reuses them for every command it runs, so commands behave as they do in your terminal. After you change those files, /shell reload refreshes them and clears remembered command approvals.

  • Auto mode reviews unfamiliar commands

    The default auto mode runs reads, edits and recognized project commands directly, and sends unrecognized shell commands to a review model that checks for prompt injection. Actions your rules allow or deny skip the review, which also saves the tokens it costs.

  • Long lint output stays searchable

    In saved conversations, fx stores large tool results separately and gives the model a preview and a handle. With read_tool_result, the agent can search a long lint report or read part of it later, even after you resume.

  • The Ultracite skill

    fx checks .fx/skills/, skills/, .agents/skills/, .claude/skills/ and other compatible folders from the workspace upward, so it finds the Ultracite skill init installs in .agents/skills/. Type $ultracite to add it to a prompt.

fx questions, answered

Does fx read AGENTS.md?
Yes. fx loads AGENTS.md from the folder you start it in, from parent folders up to your home directory, from ~/.fx/AGENTS.md, and from a nested folder when it works on a file there.
Does fx read CLAUDE.md?
No. fx looks only for files named AGENTS.md, so a project that keeps its rules in CLAUDE.md needs them in AGENTS.md for fx. ultracite init writes them there.
How do I let fx run Ultracite without asking?
Add a bash rule such as "npx ultracite *": "allow" under permission in ~/.fx/settings.json, globally or for one workspace. Project .fx.json files can’t define permission rules, so a repository can’t approve its own commands.
Why is fx ignoring my AGENTS.md?
Look for "context": false in .fx.json or your profile, a file over the 64 KiB per-file or 128 KiB combined limit, or a folder added as an additional directory, which never contributes instructions.
Does fx support hooks?
fx’s docs describe no hooks that run after an edit. Ultracite’s rules in AGENTS.md are what tell it to run ultracite fix.

Ship less slop

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