Other coding agents
Many coding agents besides Claude Code and Codex can
follow an instruction from instruction.md, the same way: in your project's folder, one command writes the hooks the
tool runs and .instruction/follow.json, which says the instruction the project follows.
A session starts with the instruction, and when someone releases a new version, a session that is already running
gets it at your next prompt, or at the next moment the tool allows. Tools without such hooks read a file again as
they work, and the command line keeps that file current.
What you need: Node.js 18 or later. The commands on this page run the
instruction.mdpackage from npm (0.6.0 or later) withnpx; nothing else to install.
Setting a project up
In your project's folder, signed in (npx -y instruction.md login), run the command for your tool from the
sections below. It writes, keeping anything already there:
.instruction/follow.json: which instruction the project follows. Commit it, so everyone on the project follows the same one.- The tool's hooks, in the tool's own file.
.instruction/.gitignore, so the copy the hooks keep (.instruction/current.md) stays out of git.
{
"follow": "instruction://acme/support-agent@stable"
}
Without --write, the command prints the same files for you to add yourself. Either way, it also prints
how to add instruction.md's MCP server to the tool. The fields of follow.json are the same as in Claude Code,
and so is the rest: the hook never holds up a prompt, uses the last good copy when it is offline, and checks
signatures when you ask it to (offline, slow or signed out).
At a glance
| Tool | How it follows | A new version arrives | Set up |
|---|---|---|---|
| Gemini CLI | hooks | at your next prompt | one command |
| Antigravity | hooks | before the next model call | one command |
| GitHub Copilot CLI | hooks | after the next tool call | one command |
| Cursor | hooks, and a rule | after the next tool call | one command, and watch |
| OpenCode | a file it reads again | before the next model request | watch, and its settings |
| Kilo Code | a file it reads again | as a session runs | watch, and its settings |
| Qwen Code | hooks | at your next prompt | one command |
| Factory Droid | hooks | at your next prompt | one command |
| Devin | hooks | at your next prompt | one command |
| Kiro | hooks | at your next prompt | by hand |
| Cline | hooks | at your next prompt | one command |
| JetBrains Junie | a hook, and its AGENTS.md | after the next tool call | by hand |
| Crush | a hook, and its context files | after the next tool call | one command |
| Goose | a file it reads again | with every message | watch, and a setting |
| Aider | a file it reads again | with every message | watch, and a setting |
| pi | its own package | at your next prompt | pi install |
| Amp | a plugin | at your next prompt | a file to copy |
| Zed, JetBrains and other ACP clients | a go-between before the agent | at your next prompt | the agent's command |
Gemini CLI and Antigravity
# Gemini CLI (.gemini/settings.json)
npx -y instruction.md connect --host gemini-cli instruction://acme/support-agent@stable --with-hooks --write
# Antigravity (.agents/hooks.json)
npx -y instruction.md connect --host antigravity instruction://acme/support-agent@stable --with-hooks --write Gemini CLI gets the instruction when a session starts, and a new version at your next prompt. It asks you to trust the project's hooks, and again when one changes.
Antigravity runs its hook before every model call, so a new version arrives even in the middle of a task, as a message from the system. The shape of the answer Antigravity takes comes from its documentation and is not yet verified in Antigravity itself.
Both read ~/.gemini/GEMINI.md when a session starts. For your own instructions in every project, keep it current:
npx -y instruction.md watch instruction://acme/support-agent@stable --out ~/.gemini/GEMINI.md --block GitHub Copilot CLI
npx -y instruction.md connect --host copilot instruction://acme/support-agent@stable --with-hooks --write
It writes .github/hooks/instruction-md.json. Commit it: Copilot CLI and the Copilot cloud agent both run
a repository's hooks. A session starts with the instruction, and a new version arrives after the next tool call.
Copilot's documentation and its changelog disagree on whether what a hook adds to your prompt reaches the model, so a
new version at your next prompt is not yet verified.
Cursor
npx -y instruction.md connect --host cursor instruction://acme/support-agent@stable --with-hooks --write
It writes .cursor/hooks.json, which Cursor runs in a trusted workspace: the instruction when a session
starts, and a new version after the next tool call. Whether Cursor passes on what a hook adds when a session starts is
not yet verified (some builds are reported to drop it), so also keep the instruction as a rule every chat applies.
Leave this running, and git-ignore the file:
npx -y instruction.md watch --out .cursor/rules/instruction-md.mdc --rule The MCP server in Cursor and VS Code
Cursor and VS Code speak an earlier version of MCP than instruction.md's server, so their agents reach it through the
command line's own MCP server, signed in once with npx -y instruction.md login. In .cursor/mcp.json:
{
"mcpServers": {
"instruction-md": {
"command": "npx",
"args": [
"-y",
"instruction.md",
"mcp",
"--follow",
"instruction://acme/support-agent@stable",
"--url",
"https://instruction.md/mcp"
]
}
}
}
VS Code takes the same entry under servers in .vscode/mcp.json, with "type": "stdio"; the
command npx -y instruction.md connect --host vscode and the instruction's address print it.
OpenCode and Kilo Code
OpenCode reads the files listed under instructions again before every request to the model, and tells
the model when one changed. So the command line keeps .instruction/current.md current (git-ignore it),
and OpenCode lists it:
npx -y instruction.md watch instruction://acme/support-agent@stable --out .instruction/current.md --url https://instruction.md/mcp {
"instructions": [
".instruction/current.md"
],
"mcp": {
"servers": {
"instruction-md": {
"type": "remote",
"url": "https://instruction.md/mcp",
"protocol": "2026-07-28"
}
}
}
}
OpenCode signs you in to instruction.md's server when it asks. OpenCode 1.x and Kilo Code take the same instructions entry
and reach the server through the command line's own MCP server; npx -y instruction.md connect --host opencode (or --host kilo) and the
instruction's address print their settings. Kilo Code is built on OpenCode; whether it reads the file again before
each request, as OpenCode does, is not yet verified.
Qwen Code, Factory Droid and Devin
# Qwen Code (.qwen/settings.json)
npx -y instruction.md connect --host qwen-code instruction://acme/support-agent@stable --with-hooks --write
# Factory Droid (.factory/hooks.json)
npx -y instruction.md connect --host droid instruction://acme/support-agent@stable --with-hooks --write
# Devin (.devin/hooks.v1.json)
npx -y instruction.md connect --host devin instruction://acme/support-agent@stable --with-hooks --write
These three run hooks the way Claude Code does: the instruction when a session starts, and a new version at your
next prompt. Qwen Code runs a project's hooks once you approve them or trust the folder, and Droid in a trusted
folder. Devin also runs the hooks in .claude/settings.json, so a project already set up for Claude Code
needs nothing more.
Kiro, Cline, JetBrains Junie and Crush
# Cline (.clinerules/hooks/)
npx -y instruction.md connect --host cline instruction://acme/support-agent@stable --with-hooks --write
# Crush (.crushrc)
npx -y instruction.md connect --host crush instruction://acme/support-agent@stable --with-hooks --write Cline runs the hooks with Settings → Enable Hooks on (macOS and Linux): the instruction when a task starts, and a new version at your next prompt.
Crush takes what a hook adds only after a tool call, so that is when a new version arrives. For the
start of a session, add ".instruction/current.md" to context_paths in crush.json.
Kiro and Junie are set up by hand, because their hook files aren't documented well
enough for the command to write them. The same command with --host kiro or --host junie writes follow.json and
says what to add:
Kiro: add two hooks (Agent hooks → +, or a file in .kiro/hooks/) whose action runs a command:
on Agent Spawn / SessionStart: npx -y instruction.md hook kiro --event SessionStart
on Prompt Submit: npx -y instruction.md hook kiro --event PromptSubmit
Kiro adds what the command prints to the agent's context. Without hooks, a steering file it always includes:
npx -y instruction.md watch --out .kiro/steering/instruction-md.md (git-ignore it) Junie CLI: add a PostToolUse hook (~/.junie/config.json, or the instruction.md plugin as a Junie extension) running:
npx -y instruction.md hook junie
Junie ignores context at SessionStart; for the start of a task: npx -y instruction.md watch --out ~/.junie/AGENTS.md --block
Kiro then gets the instruction when a session starts and a new version at your next prompt. Junie takes a hook's text
only after a tool call, and reads ~/.junie/AGENTS.md when it starts a task.
Goose and Aider
Neither takes text from a hook, but both read a file again with every message you send. The command line keeps the file current while it runs, and you point the tool at it:
# Goose re-reads GOOSE_MOIM_MESSAGE_FILE with every message: instruction.md keeps .instruction/current.md current
npx -y instruction.md watch instruction://acme/support-agent@stable --out .instruction/current.md --url https://instruction.md/mcp &
export GOOSE_MOIM_MESSAGE_FILE="$PWD/.instruction/current.md" # Aider re-reads its read-only files with every message: instruction.md keeps .instruction/current.md current
npx -y instruction.md watch instruction://acme/support-agent@stable --out .instruction/current.md --url https://instruction.md/mcp &
# .aider.conf.yml (Aider takes no MCP server)
read: [.instruction/current.md]
Start Goose from the same terminal, so it sees the variable. npx -y instruction.md connect --host goose and
the instruction's address also print instruction.md's MCP server for Goose's settings.
pi
pi install npm:instruction.md
This installs instruction.md's extension for pi (pi -e npm:instruction.md loads it for one run only).
Before every run it puts the project's instruction into a section of pi's own system prompt. When a new version is
out, pi replaces only that section, so the new version reaches a running session at your next prompt, as part of its
system prompt, and pi shows you a line saying so.
The extension reads the project's .instruction/follow.json: write it yourself, as above. To follow one
instruction in every project that has no such file, set INSTRUCTION_MD_FOLLOW to its address.
Amp
instruction.md's plugin for Amp is one file, plugins/amp/instruction-md.ts in the repository.
Copy it into .amp/plugins/ in your project, or into ~/.config/amp/plugins/ for every project
on your computer, then run plugins: reload from Amp's command palette, or restart Amp.
Each thread then gets the project's instruction (from .instruction/follow.json) at its first turn, and a
new version at your next prompt after a release, and Amp tells you when one arrives. The plugin is checked against
Amp's plugin interface, but not yet run inside Amp itself.
Zed, JetBrains and other ACP clients
Zed, JetBrains IDEs and other editors run many coding agents through the Agent Client Protocol (ACP). In the
editor's settings for an agent, run this in place of the agent's own command, with that command after the --:
npx -y instruction.md acp -- <agent command…>
The command line then sits between the editor and the agent. A session starts with the project's instruction in its
system prompt where the agent accepts one, or before your first prompt where it doesn't; a new version comes before
your next prompt; and the agent gets instruction.md's MCP server too. It follows the .instruction/follow.json of the
folder the session works in, or the instruction you name with --follow.
Plans and live updates
The hooks, pi's extension, Amp's plugin and the ACP go-between read the instruction; they don't hold
a live connection. Reading is never limited, on any plan. instruction watch, which keeps a file current
for OpenCode, Kilo Code, Goose, Aider, Cursor's rule and your own GEMINI.md, keeps a live connection
while it runs: on the Community plan, one agent or app has one at a time (live updates and reading).