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.
…- 1
AGENTS.mdUltraciteIn the working directory. Loaded alongside the files below, not instead of them. - 2
CLAUDE.md, CRUSH.md, GEMINI.mdAlso loaded when present, as areCLAUDE.local.mdandCRUSH.local.md. - 3
.cursor/rules/, .cursorrules, .github/copilot-instructions.mdOther tools’ files, loaded too. A folder on the list loads every file in it. - 4
~/.config/crush/CRUSH.mdYour Crush-only instructions, added after the project’s files as personal preferences. - 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.mdfirst and treatsAgents.mdandagents.mdas the same entry, so keep the name in capitals. - Your own paths
option context-pathincrushrcadds a file or folder to the list. The defaults stay.- Global files
~/.config/crush/CRUSH.mdand~/.config/AGENTS.md.option global-context-pathsets your own.- Initialization
- When Crush initializes a project it writes
AGENTS.md, unlessoption initialize-asnames 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`- 01Crush changes a file with its
edit,multieditorwritetool. - 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.
- 03Following
AGENTS.md, it runsnpx ultracite fixorcheckthrough itsbashtool, which asks for permission unless you’ve allowed it. - 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 falseturns that off), andlsp addincrushrcadds 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 runultracite fixin a script or CI job without stopping. Use it only where that’s safe.Allow tools, not commands
permissions allowskips prompts for a whole tool, so allowingbashallows every command. To approve only some commands, Crush’s hook docs show aPreToolUsehook that checksCRUSH_TOOL_INPUT_COMMANDand 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 skillinitinstalls in.agents/skills/, and in.crush/skills/when the project has the.crushfolder Crush keeps its data in.
Crush questions, answered
- Does Crush read AGENTS.md?
- Yes.
AGENTS.mdis on Crush’s default list of context files, withCLAUDE.md,CRUSH.md,GEMINI.md,.cursorrulesand.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
--cwdwith the root’s path. - Does Crush support hooks?
- Only before a tool runs. Crush supports
PreToolUsehooks, 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 (
crushrcor the oldercrush.json), not.claude/settings.json, and the Claude Code hook runs onPostToolUse, an event Crush doesn’t have. - How do I make Crush run the linter?
AGENTS.mdtells it to runnpx ultracite fixandnpx ultracite check, and Crush runs them through itsbashtool. Approve the command when Crush asks, or usecrush run, which approves everything in its session.
Keep going
- AgentPiMinimal open-source terminal agent you extend with TypeScript extensions and skills.
- AgentAiderTerminal pair programmer that edits files in your git repo, lints each one and commits the change.
- AgentMistral VibeMistral AI’s open-source terminal coding agent, also usable in editors over ACP.
- 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.