Set Up in Two Commands
1. Install the compiler
You need the Rust toolchain and a C compiler
(cc; on macOS run xcode-select --install, on Debian or Ubuntu
apt install build-essential). Then:
git clone https://github.com/miri-lang/miri.git
cd miri
make install
make install builds the compiler and puts a miri link in ~/.local/bin. If that
directory is not on your PATH yet, the command prints the line to add. Keep the clone where it is: the
link points into it. To install somewhere else, pass BINDIR, for example
make install BINDIR=/usr/local/bin.
2. Give your agent the skill packs
In the project your agent works on, run:
$ miri skill install
wrote ./.claude/skills/miri-lang/SKILL.md
wrote ./.claude/skills/miri-gpu/SKILL.md
wrote ./.claude/skills/miri-testing/SKILL.md
exit status 0
That is all for Claude Code: it finds skills in .claude/skills and opens the
miri-lang pack whenever it works on .mi files. Other agents read a different folder, so
name yours with --agent:
| Your agent | Command | Writes to |
|---|---|---|
| Claude Code | miri skill install | .claude/skills/ |
| Cursor, Codex, OpenCode, Windsurf, Gemini CLI | miri skill install --agent agents | .agents/skills/ |
| Anything else | miri skill install --agent generic | skills/ |
$ miri skill install --agent agents
wrote ./.agents/skills/miri-lang/SKILL.md
wrote ./.agents/skills/miri-gpu/SKILL.md
wrote ./.agents/skills/miri-testing/SKILL.md
exit status 0
To see which packs this compiler carries:
$ miri skill list
miri-lang Writing Miri source files — syntax, type system, and iteration workflow
miri-gpu GPU kernels, forall loops, gpu fn, residency, and gpu frame blocks
miri-testing Writing Miri tests — miri test runner, test attributes, and assertion functions
exit status 0
3. Check it works
Ask your agent for something small, like “write a Miri program that prints the sum of a list”. A set-up agent
writes the file, runs miri check on it, and fixes what the compiler reports, without being told how.
Agent without skills support? Add one line to the instructions file it reads
(AGENTS.md, CLAUDE.md, a rules file): “This project is written in Miri. Read
skills/miri-lang/SKILL.md before editing .mi files, and run
miri check FILE --format json after every edit.” Then install with --agent generic.
Updating
Pull, rebuild and refresh the packs:
cd miri && git pull && make install
cd your-project && miri skill install
Each installed pack records which compiler wrote it and a fingerprint of its text. A pack nobody has edited is
updated in place. A pack you edited is left alone and reported (code MER_BLD_014); add
--force to replace it anyway.
Without the compiler on hand
The packs are plain Markdown files in the compiler repository, so you can also copy one directly:
mkdir -p .claude/skills/miri-lang
curl -o .claude/skills/miri-lang/SKILL.md \
https://raw.githubusercontent.com/miri-lang/miri/main/skills/miri-lang/SKILL.md
The agent still needs miri on its PATH to run the loop.