Skip to content

One agent setup.
Every coding agent.

Write your instructions, skills and hooks once, in AGENTS.md and .agents/. Claude Code, Codex, Gemini CLI, Copilot, Cursor, OpenCode and six more use them. Bring your Claude Code setup with one command. Use it from the command line, Rust, Node or Python.
# A repository set up for Claude Code
agent-harness-adapter install --migrate --harness claude,codex,opencode
Claude Code's setup to move into the standard places:
  instructions: CLAUDE.md -> AGENTS.md
  skill review: .claude/skills/review -> .agents/skills/review
  agent reviewer: .claude/agents/reviewer.md -> .agents/agents/reviewer.md
  1 hook group: .claude/settings.json -> .agents/hooks.json
  not migrated: .mcp.json (already a standard place)
wrote .agents/agent-harness-adapter.toml
migrated Claude Code's setup; edit AGENTS.md and .agents/ from now on
claude:
  updated CLAUDE.md (instructions)
  created .claude/skills (skills)
  created .claude/settings.json (hooks)
  shared  .mcp.json (mcp, in place)
  created .claude/agents (agents)
codex:
  shared  AGENTS.md (instructions, in place)
  shared  .agents/skills (skills, in place)
  created .codex/hooks.json (hooks)
  created .codex/config.toml (mcp)
  created .codex/agents (agents)
  note: Codex reads the project's .codex files only once you trust the project
  note: new hooks run only once approved in Codex's /hooks
  note: restart Codex to load the changes
opencode:
  shared  AGENTS.md (instructions, in place)
  shared  .agents/skills (skills, in place)
  created .opencode/plugins (hooks)
  created opencode.json (mcp)
  created .opencode/agents (agents)
  note: restart OpenCode to load the changes
warning: opencode may load the skills twice: .agents/skills, .claude/skills
# .agents/hooks.json runs scripts/guard.sh before Bash
# Each agent asks to run `rm -rf build`, in its own words
# Claude Code: {"tool_name":"Bash","tool_input":{"command":"rm -rf build"}}
agent-harness-adapter hook --hooks .agents/hooks.json claude pre-tool
guard: no rm -rf here
exit 2
# Codex: {"tool_name":"shell","tool_input":{"command":["bash","-lc","rm -rf build"]}}
agent-harness-adapter hook --hooks .agents/hooks.json codex pre-tool
{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"deny","permissionDecisionReason":"guard: no rm -rf here"}}
exit 0
# OpenCode: {"tool_name":"bash","tool_input":{"command":"rm -rf build"}}
agent-harness-adapter hook --hooks .agents/hooks.json opencode pre-tool
{"answer":"deny","reason":"guard: no rm -rf here"}
exit 0
agent-harness-adapter status
claude:
  current CLAUDE.md (instructions)
  current .claude/skills (skills)
  current .claude/settings.json (hooks)
  shared  .mcp.json (mcp, in place)
  current .claude/agents (agents)
codex:
  shared  AGENTS.md (instructions, in place)
  shared  .agents/skills (skills, in place)
  current .codex/hooks.json (hooks)
  current .codex/config.toml (mcp)
  current .codex/agents (agents)
opencode:
  shared  AGENTS.md (instructions, in place)
  shared  .agents/skills (skills, in place)
  current .opencode/plugins (hooks)
  current opencode.json (mcp)
  current .opencode/agents (agents)
warning: opencode may load the skills twice: .agents/skills, .claude/skills
exit 0
# Someone edits Codex's hooks by hand
agent-harness-adapter install
updating claude, codex, opencode
claude:
  current CLAUDE.md (instructions)
  current .claude/skills (skills)
  current .claude/settings.json (hooks)
  shared  .mcp.json (mcp, in place)
  current .claude/agents (agents)
codex:
  shared  AGENTS.md (instructions, in place)
  shared  .agents/skills (skills, in place)
  edited  .codex/hooks.json (hooks)
  current .codex/config.toml (mcp)
  current .codex/agents (agents)
opencode:
  shared  AGENTS.md (instructions, in place)
  shared  .agents/skills (skills, in place)
  current .opencode/plugins (hooks)
  current opencode.json (mcp)
  current .opencode/agents (agents)
warning: opencode may load the skills twice: .agents/skills, .claude/skills
note: parts marked edited were changed by hand and left alone; `agent-harness-adapter install --force` overwrites them
agent-harness-adapter status
claude:
  current CLAUDE.md (instructions)
  current .claude/skills (skills)
  current .claude/settings.json (hooks)
  shared  .mcp.json (mcp, in place)
  current .claude/agents (agents)
codex:
  shared  AGENTS.md (instructions, in place)
  shared  .agents/skills (skills, in place)
  edited  .codex/hooks.json (hooks)
  current .codex/config.toml (mcp)
  current .codex/agents (agents)
opencode:
  shared  AGENTS.md (instructions, in place)
  shared  .agents/skills (skills, in place)
  current .opencode/plugins (hooks)
  current opencode.json (mcp)
  current .opencode/agents (agents)
warning: opencode may load the skills twice: .agents/skills, .claude/skills
note: parts marked edited were changed by hand and left alone; `agent-harness-adapter install --force` overwrites them
exit 1
agent-harness-adapter uninstall
claude:
  removed CLAUDE.md (instructions)
  removed .claude/skills (skills)
  removed .claude/settings.json (hooks)
  shared  .mcp.json (mcp, in place)
  removed .claude/agents (agents)
codex:
  shared  AGENTS.md (instructions, in place)
  shared  .agents/skills (skills, in place)
  removed .codex/hooks.json (hooks)
  removed .codex/config.toml (mcp)
  removed .codex/agents (agents)
  note: restart Codex to load the changes
opencode:
  shared  AGENTS.md (instructions, in place)
  shared  .agents/skills (skills, in place)
  removed .opencode/plugins (hooks)
  removed opencode.json (mcp)
  removed .opencode/agents (agents)
  note: restart OpenCode to load the changes
# It took out only what it wrote: CLAUDE.md held just its @AGENTS.md line
# Your sources stay
ls -A . .agents
.:
.agents
AGENTS.md
.git
.mcp.json
scripts

.agents:
agent-harness-adapter.toml
agents
hooks.json
skills
  1. Install the command:

    Terminal window
    npm install -g @six5536/agent-harness-adapter # or: cargo install agent-harness-adapter
  2. Run agent-harness-adapter install in your repository. It asks which agents you use, offers to move your Claude Code setup into the standard places, and writes the config, .agents/agent-harness-adapter.toml.

  3. Edit AGENTS.md and .agents/ from now on.

  4. Run agent-harness-adapter install again after you add or change a skill, a subagent or an MCP server, or add a hook on a new event. Instructions, and hooks on events already in use, apply as soon as you save them.

Your edits are kept

A file you changed by hand is reported edited and left alone, unless you pass --force.

Uninstall is clean

It takes out what it wrote and nothing else. AGENTS.md, .agents/ and your own settings stay.

Hooks fail open

A hook that cannot start, crashes or times out allows. Your hook failing never blocks the agent.

All or nothing

An install that is refused writes nothing; every write is atomic and only on change.

  • Claude Code
  • OpenAI Codex
  • Gemini CLI
  • GitHub Copilot
  • Cursor
  • Factory Droid
  • Pi
  • OpenCode
  • Kilo Code
  • Qwen Code
  • Devin
  • any agent that reads AGENTS.md

See what each one gets.

A tool declares its instructions, skills and hooks once, as a manifest or in code; the adapter writes them into each agent’s files, and its hook answers in one format, Claude Code’s.

mytool.harness.toml
# mytool's integration as a manifest, for the agent-harness-adapter command.
version = 1
name = "mytool"
instructions = "Run `mytool check` before you finish.\n"
allow_commands = ["mytool"]
[[skills]]
name = "mytool"
description = "Check the project with mytool."
body = "Run `mytool check`; fix what it reports.\n"
[[hooks]]
event = "pre-tool"
tools = "shell"
run = "mytool hook" # bridged: mytool answers in Claude Code's protocol
Terminal window
agent-harness-adapter install --manifest mytool.harness.toml --harness claude,codex,gemini