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

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.

…
Ultracite’s rules
read: AGENTS.md
lint-cmd: npx ultracite fix
Merged
Where Aider looks for instructions
  1. 1~/.aider.conf.ymlYour settings for every repo. Loaded first.
  2. 2.aider.conf.yml at the git rootThe repo’s settings. Loaded next, and wins over your home file.
  3. 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. 4AGENTS.mdUltraciteAdded to the chat as a read-only file because read lists 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-cmd and treats a non-zero exit as problems to fix.
One for every language
A lint-cmd without a language: 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, .json and .css are covered; .mts, .cts and .cjs skip 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 /ls lists 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
  1. 01Aider applies the edit and commits it.
  2. 02It runs npx ultracite fix <file> on each file it changed, then commits whatever the fix rewrote.
  3. 03If the command exits non-zero, Aider shows the output and asks “Attempt to fix lint errors?”.
  4. 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-verify by default, so a pre-commit hook that runs ultracite check never sees its commits. Set git-commit-verify: true in .aider.conf.yml if you want your git hooks to run on them too.

  • /lint cleans up files already changed

    /lint, or aider --lint from the shell, runs lint-cmd on 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-always to 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. /undo reverts the last commit, and only if Aider made it.

  • The Ultracite skill

    Aider doesn’t support skills. init still installs the Ultracite skill into .agents/skills/ for your other agents, but Aider gets the rules from AGENTS.md and the checks from lint-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 read in .aider.conf.yml, so ultracite init --agents aider adds AGENTS.md to read. 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, which init points at npx ultracite fix. Aider runs it on each file it edits (auto-lint is on by default; --no-auto-lint turns it off), and /lint runs it on demand.
Does Aider support hooks?
Not agent hooks. Aider’s post-edit checks are lint-cmd and test-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. init updates an older Ultracite command but leaves another linter’s lint-cmd alone, because a lint-cmd without a language prefix replaces Aider’s per-language linters.
Can Aider fix lint errors without asking?
Yes. With --yes-always (or yes-always: true in .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 init again. Earlier versions wrote the rules to an ultracite.md that nothing loaded; init takes Ultracite’s block out of it, deletes it if nothing else is left, and lists AGENTS.md under read instead.

Ship less slop

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