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.
…- 1
~/.fx/AGENTS.mdYour instructions for every project. - 2
Parent folders’ AGENTS.mdRead up to, but not including, your home directory, for projects that live under it. - 3
AGENTS.mdUltraciteThe project’s instructions, from the folder where you start fx. - 4
apps/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.mdor any other name. Every instructions file it reads is anAGENTS.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_limitsin~/.fx/settings.json, or pass--context-limitfor one run. Project.fx.jsoncan’t change them. - Turn it off
"context": falsein.fx.jsonor your profile stops fx loading everyAGENTS.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+oand 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"
}
}
}- 01fx changes a file with
edit_fileorwrite_file. - 02Following
AGENTS.md, it runsnpx ultracite fixwith itsshelltool, using your shell startup files. - 03In
automode the command runs directly or goes to the review model first; a matching allow rule skips the review. - 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 reloadrefreshes them and clears remembered command approvals.Auto mode reviews unfamiliar commands
The default
automode 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 skillinitinstalls in.agents/skills/. Type$ultraciteto add it to a prompt.
fx questions, answered
- Does fx read AGENTS.md?
- Yes. fx loads
AGENTS.mdfrom 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 inCLAUDE.mdneeds them inAGENTS.mdfor fx.ultracite initwrites them there. - How do I let fx run Ultracite without asking?
- Add a
bashrule such as"npx ultracite *": "allow"underpermissionin~/.fx/settings.json, globally or for one workspace. Project.fx.jsonfiles can’t define permission rules, so a repository can’t approve its own commands. - Why is fx ignoring my AGENTS.md?
- Look for
"context": falsein.fx.jsonor 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.mdare what tell it to runultracite fix.
Keep going
- AgentPiMinimal open-source terminal agent you extend with TypeScript extensions and skills.
- AgentCrushCharm’s terminal coding agent that works with many model providers, with LSP context and MCP.
- AgentCodexOpenAI’s coding agent for the terminal, IDEs, the ChatGPT desktop app and cloud tasks.
- DocsAgent rulesWhat
initwrites for every agent, and how to keep it current.
Ship less slop
One command sets up your linter, formatter, editor and agents. Works with Oxlint, Biome and ESLint.