with one click
opencode-migration
// Use when migrating AI assistant configurations from Claude Code, Cursor, and other tools to OpenCode/Kilo
// Use when migrating AI assistant configurations from Claude Code, Cursor, and other tools to OpenCode/Kilo
Three-layer bootstrap flow, dotbot patterns, and deployment order for Win dotfiles. Use when editing bootstrap.ps1, install.conf.yaml, or Setup-Dotfiles.ps1.
Use when working on PowerShell scripts, registry tweaks, or dotfile deployment in the Win repo. Covers conventions, Common.ps1 helpers, and path rules.
Use when validating changes in the Win repo. Per-change-type checks for PowerShell, dotbot, autounattend.xml, and guidance files.
Use to run the mandatory end-of-session workflow — file issues, run quality gates, push to remote, verify clean state, hand off context.
Use when orchestrating complex tasks across specialized agents with proper context handoff
Use when configuring or troubleshooting MCP servers for OpenCode/Kilo environments
| name | opencode-migration |
| description | Use when migrating AI assistant configurations from Claude Code, Cursor, and other tools to OpenCode/Kilo |
| compatibility | opencode |
Use this skill when migrating a project from Claude Code, Cursor, or another AI assistant tool to OpenCode or Kilo. Covers rules files, skill directories, MCP configs, agent definitions, and post-migration validation.
| Source Tool | Source File | OpenCode Target | Notes |
|---|---|---|---|
| Claude Code | CLAUDE.md | AGENTS.md (preferred) | Copy content; remove Claude-specific hooks |
| Claude Code | ~/.claude/CLAUDE.md | ~/.config/opencode/AGENTS.md | Global rules migration |
| Cursor | .cursorrules | AGENTS.md | Rename; flatten MDC rules if present |
| Cursor | .cursor/rules/*.md | .opencode/rules/*.md or AGENTS.md | Consolidate or reference via instructions |
| Generic | .github/copilot-instructions.md | Keep + reference in AGENTS.md | Copilot file can coexist; import via instructions |
AGENTS.md at project rootCLAUDE.md or .cursorrulescompatibility: opencode if frontmatter is used (optional)CLAUDE.md must remain, symlink it to AGENTS.md (not the reverse)opencode.json to reference additional instruction files if needed:{
"instructions": [
"AGENTS.md",
".cursor/rules/*.md"
]
}
Claude Code skills live in ~/.claude/skills/ as flat .md files or directories with SKILL.md.
| Source Path | OpenCode Target |
|---|---|
~/.claude/skills/*.md | ~/.config/opencode/skills/*/ (directory with SKILL.md) |
~/.claude/skills/my-skill/ | ~/.config/opencode/skills/my-skill/ |
Project-local .claude/skills/ | .opencode/skills/ or .kilo/skills/ |
Cursor does not have a native skill system. If skills were stored in .cursor/skills/, migrate the same way:
.opencode/skills/<name>/SKILL.mdname, description, compatibility)---
name: skill-name
description: "One-line description of what this skill does"
compatibility: opencode
---
Claude Code does not have a native mcp config block. If MCP servers were started manually or via shell scripts, translate them into opencode.json:
{
"mcp": {
"my-mcp": {
"type": "local",
"command": ["node", "./claude-mcp-server.js"],
"enabled": true
}
}
}
Cursor uses .cursor/mcp.json (non-standard). Migrate keys to opencode.json:
| Cursor Key | OpenCode Key | Notes |
|---|---|---|
command | command | Array format preferred |
args | merged into command | ["node", "...", "arg1"] |
env | shell env vars | Set before launch or inline in command |
url | url under type: remote | Add type: remote |
Example migration:
// .cursor/mcp.json
{
"mcpServers": {
"exa": {
"command": "node",
"args": ["exa-mcp/dist/index.js"],
"env": { "EXA_API_KEY": "..." }
}
}
}
Becomes:
// opencode.json
{
"mcp": {
"exa": {
"type": "local",
"command": ["node", "exa-mcp/dist/index.js"],
"enabled": true
}
}
}
Move the API key to an environment variable: $env:EXA_API_KEY = "..."
OpenCode/Kilo agents can be defined as markdown files with YAML frontmatter.
If agents were defined inline in CLAUDE.md or as separate prompt files:
.opencode/agents/<agent-name>.agent.md (or .kilo/agents/)name, description, model, toolsTemplate:
---
name: windows-system-agent
description: Windows optimization and registry specialist
model: anthropic/claude-sonnet-4-20250514
tools:
- bash
- registry
permissions:
read: true
write: true
bash: true
---
# Windows System Agent
You specialize in Windows registry tweaks, debloating, and gaming optimization...
Cursor agents are usually not file-based. If they exist in .cursor/agents/, migrate to .opencode/agents/ and add the frontmatter block above.
Agents can also be defined in opencode.json:
{
"agent": {
"powershell-expert": {
"model": "anthropic/claude-sonnet-4-20250514",
"instructions": [".kilo/agents/powershell-expert.agent.md"],
"permissions": {
"read": true,
"write": true,
"bash": true
}
}
}
}
AGENTS.md exists at project root and loads without YAML syntax errorsCLAUDE.md is either removed or symlinked to AGENTS.md (not duplicate content).cursorrules renamed or referenced in opencode.json instructionsSKILL.md fileSKILL.md has valid YAML frontmatter (name, description)opencode.json or AGENTS.md resolve correctlyopencode.json has a top-level mcp object (not mcpServers)command arrays are valid and binaries exist in PATHurl values are reachablefalse when using API keys.opencode/agents/ or .kilo/agents/name and description in frontmattertools: blocks remain; converted to permissions:opencode.json is valid JSON (run jsonlint or jq empty opencode.json)instructions, rules, skills)AGENTS.md content appears in the system contextAGENTS.md and CLAUDE.md with different content. OpenCode prefers AGENTS.md; CLAUDE.md is ignored if both exist..md files. OpenCode expects <skill>/SKILL.md directories.mcpServers vs mcp: Cursor uses mcpServers; OpenCode uses mcp.type: remote MCP servers must have "type": "remote".command: OpenCode requires command as an array, not a space-separated string.mcp-server-management — configuring and debugging migrated MCP serversagent-delegation — using migrated agents in multi-agent workflows