Getting started
agent-harness-adapter keeps one agent setup in the places coding agents are standardising on, and makes every agent you use read it:
| What | Where you write it |
|---|---|
| Instructions | AGENTS.md |
| Skills | .agents/skills/<name>/SKILL.md |
| Hooks | .agents/hooks.json, in Claude Code’s format |
| MCP servers | .mcp.json |
| Subagents | .agents/agents/<name>.md, in Claude Code’s format |
An agent that already reads a file where it is gets nothing written; Claude
Code and Gemini CLI are pointed at it; every other agent gets a copy in its
own format. The command calls each agent a harness (--harness claude,codex).
How it works explains the details.
Set it up
Section titled “Set it up”-
Install the command:
Terminal window npm install -g @six5536/agent-harness-adapterTerminal window cargo install agent-harness-adapternpm installs a prebuilt binary for Linux and macOS (x64, arm64) and Windows (x64).
-
In your repository, run:
Terminal window agent-harness-adapter installIn a terminal it asks which agents you use (the ones on your
PATHare picked) and, when it finds a Claude Code setup, whether to move it into the standard places (see Coming from Claude Code). Then it writes the config,.agents/agent-harness-adapter.toml, and installs. In CI, or to skip the questions, say it up front (without a terminal nothing is migrated unless you add--migrate):Terminal window agent-harness-adapter install --harness claude,codex,cursor -
Do what
install’s notes ask. Some agents load new files only after a step of yours: trust the project and approve the hooks in Codex’s/hooks, trust the folder in Gemini CLI, Copilot, Pi and Devin; restart Codex, OpenCode, Kilo Code and Qwen Code, run/reloadin Pi, and start a new Devin session. Harnesses lists them. -
From now on, edit
AGENTS.mdand.agents/. Instructions, and hooks on events already in use, apply as soon as you save them. Runagent-harness-adapter installagain (from anywhere in the repository) after you add or change a skill, a subagent or an MCP server, or add a hook on a new event.
Keep it in sync
Section titled “Keep it in sync”agent-harness-adapter status # exit 1 when anything is not currentagent-harness-adapter install --harness gemini # add an agentagent-harness-adapter uninstall --harness cursor # take one outA file you changed by hand is reported edited and left alone;
install --force overwrites it. uninstall takes out what it wrote and never
touches AGENTS.md, .agents/ or the config.
In a team, and in CI
Section titled “In a team, and in CI”-
Commit
AGENTS.md,.agents/(with the config and the record,.agents/harness.toml) and the filesinstallwrote for each agent, so everyone gets the same setup without running anything. -
Everyone needs the command. Each agent’s hook entries run
agent-harness-adapter. On a machine without it, the hooks cannot start, and like any failing hook they allow: a guard in.agents/hooks.jsonis then not enforced there. Install it on every machine that runs an agent, or setadapterin the config to a path every machine has. -
Check in CI that nobody forgot to install after a change:
Terminal window agent-harness-adapter status # exit 1 when a copy is out of date or edited by hand
- How it works: sources, copies, the record and the hooks.
- Hooks: one script, every agent.
- Scopes, sharing and edits: your own setup in
~/.agents/. - For tool authors: ship your tool’s integration the same way.