Aider runs Ultracite on every file it edits
Aider doesn’t look for an instructions file, so init lists AGENTS.md under read in .aider.conf.yml and sets lint-cmd to ultracite fix. After each edit Aider commits, lints every file it changed, and offers to send what’s left back to the model.
Aider by Aider-AIChecked against Aider 0.86.2
# 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.
…read: AGENTS.md
lint-cmd: npx ultracite fix- 1
~/.aider.conf.ymlYour settings for every repo. Loaded first. - 2
.aider.conf.yml at the git rootThe repo’s settings. Loaded next, and wins over your home file. - 3
.aider.conf.yml in the current directoryLoaded last, so it wins when you start Aider below the root.--config <file>loads one file instead of all three. - 4
AGENTS.mdUltraciteAdded to the chat as a read-only file becausereadlists it. Nothing else is loaded as instructions.
How Aider reads the rules
Aider has no instructions file of its own. It loads whatever read lists in .aider.conf.yml as read-only chat files, so with AGENTS.md there, Ultracite’s rules are in context from the first message.
- Loaded as
- A read-only file: reference material the model reads but that Aider won’t edit.
- Lint command
- Aider appends the edited file’s path to
lint-cmdand treats a non-zero exit as problems to fix. - One for every language
- A
lint-cmdwithout alanguage:prefix runs for every file and replaces Aider’s built-in linters, Python’s included. - File types
- Aider lints only files it maps to a language by extension.
.ts,.tsx,.js,.jsx,.jsonand.cssare covered;.mts,.ctsand.cjsskip the linter. - Retries
- Lint, test and edit-format retries share a limit of three per message. After that Aider stops with “Only 3 reflections allowed”.
- Check it
- Aider prints “Added AGENTS.md to the chat (read-only).” at launch, and
/lslists it under read-only files.
Commit, lint, then fix what’s left
Aider runs lint-cmd itself, so it doesn’t depend on the model remembering to. When the command exits non-zero, Aider treats its output as errors, offers to hand it back, and lints again after the fix. auto-test and test-cmd do the same for your tests.
# Run your tests after every edit, too
auto-test: true
test-cmd: npm test- 01Aider applies the edit and commits it.
- 02It runs
npx ultracite fix <file>on each file it changed, then commits whatever the fix rewrote. - 03If the command exits non-zero, Aider shows the output and asks “Attempt to fix lint errors?”.
- 04On yes, the model gets the output under “# Fix any errors below, if possible.”, with the code around the reported lines.
Worth knowing about Aider
Its commits skip your git hooks
Aider commits with
--no-verifyby default, so a pre-commit hook that runsultracite checknever sees its commits. Setgit-commit-verify: truein.aider.conf.ymlif you want your git hooks to run on them too./lint cleans up files already changed
/lint, oraider --lintfrom the shell, runslint-cmdon the files in the chat, or on every dirty file when there are none, and has the model fix each file with problems in a fresh context. Add--yes-alwaysto run it without prompts.Every step is a commit
The model’s edit and the linter’s fixes land as separate commits, so the history shows what Ultracite changed.
/undoreverts the last commit, and only if Aider made it.The Ultracite skill
Aider doesn’t support skills.
initstill installs the Ultracite skill into.agents/skills/for your other agents, but Aider gets the rules fromAGENTS.mdand the checks fromlint-cmd.
Aider questions, answered
- Does Aider read AGENTS.md?
- Not on its own. Aider only loads files you add to the chat or list under
readin.aider.conf.yml, soultracite init --agents aideraddsAGENTS.mdtoread. From then on it loads as a read-only file in every session in that repo. - How do I make Aider run the linter?
- Set
lint-cmd, whichinitpoints atnpx ultracite fix. Aider runs it on each file it edits (auto-lint is on by default;--no-auto-lintturns it off), and/lintruns it on demand. - Does Aider support hooks?
- Not agent hooks. Aider’s post-edit checks are
lint-cmdandtest-cmd, which it runs itself after every edit, so the model can’t skip them. The only hooks it deals with are your git hooks, and it skips those by default. - I already have a lint-cmd. Will init replace it?
- Only if it already runs Ultracite.
initupdates an older Ultracite command but leaves another linter’slint-cmdalone, because alint-cmdwithout a language prefix replaces Aider’s per-language linters. - Can Aider fix lint errors without asking?
- Yes. With
--yes-always(oryes-always: truein.aider.conf.yml), Aider answers yes to “Attempt to fix lint errors?” and its other prompts, so the lint, fix and commit cycle runs unattended. - I set Ultracite up for Aider before. Do I need to do anything?
- Run
initagain. Earlier versions wrote the rules to anultracite.mdthat nothing loaded;inittakes Ultracite’s block out of it, deletes it if nothing else is left, and listsAGENTS.mdunderreadinstead.
Keep going
- AgentCodexOpenAI’s coding agent for the terminal, IDEs, the ChatGPT desktop app and cloud tasks.
- AgentCrushCharm’s terminal coding agent that works with many model providers, with LSP context and MCP.
- AgentPiMinimal open-source terminal agent you extend with TypeScript extensions and skills.
- 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.