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

Crush loads AGENTS.md from the folder you start in

Crush puts AGENTS.md in its system prompt along with every other instructions file it recognizes in the folder you start it in. It has no post-edit hook yet, so it runs ultracite fix and check when the rules say to, and any language server it’s running reports problems in each edit’s result.

Crush by CharmChecked against Crush 0.98.1

# 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 Crush looks for instructions
  1. 1AGENTS.mdUltraciteIn the working directory. Loaded alongside the files below, not instead of them.
  2. 2CLAUDE.md, CRUSH.md, GEMINI.mdAlso loaded when present, as are CLAUDE.local.md and CRUSH.local.md.
  3. 3.cursor/rules/, .cursorrules, .github/copilot-instructions.mdOther tools’ files, loaded too. A folder on the list loads every file in it.
  4. 4~/.config/crush/CRUSH.mdYour Crush-only instructions, added after the project’s files as personal preferences.
  5. 5~/.config/AGENTS.mdYour cross-tool instructions, added with the file above.

How Crush reads the rules

Crush doesn’t choose one file. It loads every instructions file on its list that exists in the working directory, AGENTS.md among them, plus two global files of yours.

Working directory
Crush looks for these files only in the folder it starts in (or --cwd), not in parent folders.
No precedence
Every file on the list that exists is loaded; none replaces another.
Case variants
Crush checks AGENTS.md first and treats Agents.md and agents.md as the same entry, so keep the name in capitals.
Your own paths
option context-path in crushrc adds a file or folder to the list. The defaults stay.
Global files
~/.config/crush/CRUSH.md and ~/.config/AGENTS.md. option global-context-path sets your own.
Initialization
When Crush initializes a project it writes AGENTS.md, unless option initialize-as names another file.

Diagnostics in every edit result

Crush’s hooks run only before a tool call, so nothing runs ultracite after an edit on its own, and Ultracite has nothing to hook into yet. What reaches the model is what Crush runs itself: the commands in AGENTS.md, and the diagnostics Crush adds to every edit result.

- **Format code**: `npx ultracite fix`
- **Check for issues**: `npx ultracite check`
- **Diagnose setup**: `npx ultracite doctor`
What the rules tell it to run
  1. 01Crush changes a file with its edit, multiedit or write tool.
  2. 02It tells the language servers it’s running about the change and adds their diagnostics to the tool’s result: the first 10 for that file and 10 for the rest of the project.
  3. 03Following AGENTS.md, it runs npx ultracite fix or check through its bash tool, which asks for permission unless you’ve allowed it.
  4. 04It reads the output and fixes what’s left.

Worth knowing about Crush

  • Language servers report on every edit

    Crush starts the language servers it knows for the files you touch when they’re on your PATH (option auto-lsp false turns that off), and lsp add in crushrc adds others. Whatever they report lands in the result of the next edit, with no extra command.

  • crush run approves everything

    crush run "…" runs one prompt without the interface and approves every permission request in that session, so it can run ultracite fix in a script or CI job without stopping. Use it only where that’s safe.

  • Allow tools, not commands

    permissions allow skips prompts for a whole tool, so allowing bash allows every command. To approve only some commands, Crush’s hook docs show a PreToolUse hook that checks CRUSH_TOOL_INPUT_COMMAND and prints {"decision":"allow"}.

  • The Ultracite skill

    Crush loads skills from .agents/skills/, .crush/skills/, .claude/skills/ and .cursor/skills/ in the working directory and at the git root. It finds the Ultracite skill init installs in .agents/skills/, and in .crush/skills/ when the project has the .crush folder Crush keeps its data in.

Crush questions, answered

Does Crush read AGENTS.md?
Yes. AGENTS.md is on Crush’s default list of context files, with CLAUDE.md, CRUSH.md, GEMINI.md, .cursorrules and .github/copilot-instructions.md. Every one that exists in the working directory is loaded, so Ultracite’s rules sit beside your other files rather than replacing them.
Why doesn’t Crush see my root AGENTS.md in a monorepo?
Crush reads context files from the directory you start it in, not from its parents. Start it at the repo root, or pass --cwd with the root’s path.
Does Crush support hooks?
Only before a tool runs. Crush supports PreToolUse hooks, which can block a call, rewrite its input or add context. There’s no event after an edit yet, so Ultracite doesn’t set up a hook for Crush.
Does Crush run the hook Ultracite sets up for Claude Code?
No. Crush reads hooks from its own config (crushrc or the older crush.json), not .claude/settings.json, and the Claude Code hook runs on PostToolUse, an event Crush doesn’t have.
How do I make Crush run the linter?
AGENTS.md tells it to run npx ultracite fix and npx ultracite check, and Crush runs them through its bash tool. Approve the command when Crush asks, or use crush run, which approves everything in its session.

Ship less slop

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