shulkwisec
01 Articles/Tools//6 min read

I moved a 400-skill opencode setup to Claude Code in one command

In opencode with the oh-my-opencode-slim plugin, one of my agents lives in two places: an entry in a JSON file and a prompt file in another folder [S11]. Claude Code wants one markdown file per agent [S4]. I have 157 agents. That is the whole problem, multiplied by 157.

NOTE

Key point: moving between AI coding harnesses is mostly translation work, and the dangerous part is the silent loss. By the end you will know how to move a setup and get a written list of what did not move.

I run a bug-bounty workspace on opencode. Over time it grew into 400 skills, 157 specialist agents, 32 rule files, 11 MCP servers, a lead agent, two hooks and a permission block [S1]. I wanted the same workspace available in Claude Code, without rebuilding it by hand and without choosing one tool forever.

What the alternatives cost

I did not try the by-hand route. The arithmetic was enough.

  • Copy and rewrite by hand. Every agent is two edits: lift the entry out of the JSON, merge it with its prompt file, write one .md with the frontmatter Claude Code expects. Then 11 MCP entries, each in a different shape. Then the settings.
  • A one-off script. It works once, for one layout. The next plugin, or the next harness, means a new script.
  • A config-sync tool. rulesync, ruler and AgentSync exist and are built to author rules once and generate them for many tools; rulesync also has an import command [S12]. I did not run them on this workspace, so I cannot say how they treat the plugin’s agents.
  • Stay where you are. Fine, until you want the other tool.

Nothing here is hard. It is just a lot of places to get one field wrong, and no report when you do.

Where the two formats disagree

The skills were the easy part: both tools use a folder with a SKILL.md in it [S7][S10], so they copy over unchanged. Everything else differs.

Thing opencode Claude Code
Agent entry in oh-my-opencode-slim.json plus a separate prompt .md [S11] one .md per agent in .claude/agents/, YAML frontmatter plus body [S4]
Lead agent a mode file in my setup no mode file; the default agent is the agent key in settings.json [S5]
MCP server command is an array, variables as {env:NAME} [S9] command plus args, variables as ${NAME} [S6]
Permissions ordered allow, deny and ask rules [S9] a different model

An MCP entry makes the point. The opencode side:

"cloakbrowser": {
  "type": "local",
  "command": ["npx", "-y", "cloakbrowser-mcp@latest"],
  "enabled": true
}

And what Claude Code reads for the same server:

"cloakbrowser": {
  "command": "npx",
  "args": ["-y", "cloakbrowser-mcp@latest"]
}

Small. Eleven of them, plus 157 agents, is where the typos come from.

The run

I wrote importfrommyharness for this. Each harness is a TOML file that says where things live and what the fields are called, so the engine has no opencode or Claude Code logic in it. It shows a preview first and writes nothing until you say so.

uvx importfrommyharness

The preview on my workspace:

Preview (nothing written yet): 1708 files for claude
  converted: instruction x2, rule x32, skill x400, mode x1, setting x2, agent x157
  needs your review: permission x1, plugin x1, env x1, lsp x1, hook x2, ...
  loses detail: agent.skills, agent.model, agent.mcps ... (11 fields)

Terminal recording of the guided import of a 157-agent opencode workspace into Claude Code

The guided run on the real workspace, from the folder prompt to the written files.

A dry run on this workspace took 0.48 seconds [S2]. I answered y, and 1,708 files were written [S1].

What it converted

  • Skills. 400 folders copied as they were.
  • Agents. 157 agents plus the lead agent became 158 files under .claude/agents/. I parsed every one of them as YAML and each has a name and a description, the two fields Claude Code requires [S3][S4]. I did not start Claude Code against them, so I have not seen them run.
  • The lead agent. The mode file became an agent, and settings.json now points at it. The tool also wrote the agent-teams flag, because I had asked for it:
{
  "agent": "bb-huge",
  "env": {
    "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
  }
}
  • MCP. All 11 servers already existed in my .mcp.json, so the tool kept mine. It never overwrites an existing entry.

What it refused to guess

Nine items needed a human, and the tool says so instead of dropping them. They are saved under .importfrommyharness/unmapped/ and listed in the report: the two hooks, the coordinator files, the plugin list, the permission block, the env and LSP settings, and the slim plugin’s own config. (Hooks are the part of any setup that never converts. This is not new.)

I left the permission block out on purpose. It is ordered glob rules, and a converter that turns “allow everything” into a Claude Code permission mode on its own is a converter I would not run on a security workspace.

The report also counts what lost detail on the way. Every agent lost its model chain, its skill list and its MCP list (157 each), and 36 lost their permission setting. Claude Code has no field for those, and the report says that instead of pretending the agents are identical.

One agent’s prompt had frontmatter that did not parse as YAML. The tool kept the text as the prompt body and wrote a note about it, so I know which file to look at.

What I did not test

  • I have not run the imported agents. I checked that the files parse, not that they behave the same.
  • Only opencode to Claude Code is tested. The mappings for Claude Code to opencode exist and are untested.
  • CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 turns on agent teams, and the docs say teams cannot be nested [S8]. It is not a depth setting, so the tool drops my opencode depth value. The same page says that with teams on, named subagents launch differently, and I have not tested what that does to these 157 agents.
  • opencode’s docs describe a newer config layout (mcp.servers, disabled) than the one my config uses [S9]. The tool reads both. I tested the newer one on a small fixture only.
  • One workspace is one data point. A different layout may break something this one did not.

The method

If you have a large setup in one harness and want it in another, the useful part is not this tool. It is the order of operations: map every concept to its twin, convert only what has one, and keep a written list of everything that does not. Silent loss is the failure mode of every migration, and it is invisible until an agent behaves differently three weeks later.

To add a harness, drop one TOML file in src/importfrommyharness/harnesses/. The README has the format.

Try it

This takes under five minutes and writes nothing until you say yes:

uvx importfrommyharness

Point it at a project folder that has a .opencode/ directory. Read the preview. Answer n the first time and look at the “needs your review” line.

References