Skip to content

Conversion Guide

This guide provides instructions for converting Claude Code (CC) definitions (skills, commands, agents) to OpenCode (OC) format for use in the Systematic plugin.

AspectClaude CodeOpenCode / Systematic
Skills directory.claude/skills/<name>/SKILL.md.opencode/skills/<name>/SKILL.md
Commands directory.claude/commands/<name>.md.opencode/commands/<name>.md
Agents directory.claude/agents/<name>.md.opencode/agents/<name>.md
Global skills~/.claude/skills/~/.config/opencode/skills/
Global commandsN/A~/.config/opencode/commands/
Global agentsN/A~/.config/opencode/agents/
Config file.claude/settings.jsonopencode.json or opencode.jsonc
Skill toolSkillskill (native) or systematic_skill (bundled)
Task/subagent toolTask@mention or task
Todo toolTodoWritetodowrite
Question toolAskUserQuestionquestion
Command prefix/compound-engineering:/systematic:
Plugin prefixcompound-engineering:systematic:

CC FieldOC FieldConversion Action
namenameKeep - lowercase, hyphens, max 64 chars
descriptiondescriptionKeep - critical for trigger matching
modelmodelNormalize - adds provider prefix (e.g., sonnetanthropic/sonnet), removes inherit
allowed-toolsPass through - stored but not enforced by OC
argument-hintargument-hintKeep (used for autocomplete hints)
disable-model-invocationhiddenMap - truehidden: true
user-invocablePass through - used by skills-as-commands
context: forksubtaskMap - forksubtask: true
agentagentPass through - routed through for skills-as-commands
licenselicenseKeep (optional)
compatibilitycompatibilityKeep (optional)
metadatametadataKeep (optional)

Map-and-preserve strategy: The converter uses a non-destructive approach — known CC fields are mapped to OC equivalents, and unknown fields pass through untouched. No fields are silently dropped.

Systematic compatibility note: Systematic reads skill frontmatter directly for its own tooling. CC fields are preserved for bundled skills to power systematic_skill and skills-as-commands behavior.

  • disable-model-invocation: maps to hidden: true (hides from skill tool list).
  • user-invocable: controls whether a skill is exposed as a command (skills-as-commands only).
  • context: fork: maps to subtask: true when a skill is exposed as a command.
  • agent / model: routed through when a skill is exposed as a command.
  • allowed-tools: stored but not enforced by OC runtime.

Before (Claude Code):

---
name: brainstorming
description: Collaborative design workflow for exploring ideas
model: sonnet
allowed-tools: Read, Grep, WebSearch
disable-model-invocation: false
---
# Brainstorming
When brainstorming, use the Task tool to spawn research agents...

After (OpenCode):

---
name: brainstorming
description: This skill should be used before implementing features, building components, or making changes. It guides exploring user intent, approaches, and design decisions before planning. Triggers on "let's brainstorm", "help me think through", "what should we build", "explore approaches", ambiguous feature requests, or when the user's request has multiple valid interpretations that need clarification.
---
# Brainstorming
When brainstorming, use task to spawn research agents...

Key changes:

  1. model normalized (adds provider prefix) or removed if inherit
  2. allowed-tools and disable-model-invocation passed through or mapped
  3. Enhanced description to include trigger conditions (critical for auto-invocation)
  4. Updated tool references in content
CC FieldOC FieldConversion Action
namenameKeep or derive from filename
descriptiondescriptionKeep
argument-hintREMOVE - use $ARGUMENTS in template
modelmodelKeep if provider-qualified (e.g., anthropic/claude-3-5-sonnet)
agentagentKeep - specifies which agent executes
subtasksubtaskKeep - forces subagent invocation
CC SyntaxOC SyntaxNotes
$ARGUMENTS$ARGUMENTSSame - all args as string
$0, $1, $2$1, $2, $3Shift by 1 - OC is 1-indexed
$ARGUMENTS[0]$1Use positional instead
!`command`!`command`Same - shell output injection
@filename@filenameSame - file content injection
CC FieldOC FieldConversion Action
namePass through (OC derives from filename but field is preserved)
descriptiondescriptionKeep - required
model: inheritRemove - OC inherits by default
model: sonnetmodel: anthropic/claude-3-5-sonnetNormalize - add provider prefix
model: opusmodel: anthropic/claude-3-opusNormalize
model: haikumodel: anthropic/claude-3-haikuNormalize
tools (array)tools (map)Map - ["Read", "Bash"]{ read: true, bash: true }
disallowedToolsmerged into toolsMerge - ["Write"] → adds { write: false } to tools map
maxSteps / maxTurnsstepsRename - takes min(maxTurns, maxSteps) if both present
permissionModepermissionMap - "full"{ edit: "allow", bash: "allow", webfetch: "allow" }
disable-model-invocationhiddenMap - truehidden: true
skillsPass through - skills load via tool calls at runtime
hooksPass through - hooks configured separately in OC
N/AmodeADD - primary, subagent, or all
N/AtemperatureADD - inferred from agent purpose
CC permissionModeOC permission
full{ edit: "allow", bash: "allow", webfetch: "allow" }
default{ edit: "ask", bash: "ask", webfetch: "ask" }
plan{ edit: "deny", bash: "deny", webfetch: "ask" }
bypassPermissions{ edit: "allow", bash: "allow", webfetch: "allow" }
(unknown){ edit: "ask", bash: "ask", webfetch: "ask" } (secure default)

The converter transforms CC tools arrays into OC tool permission maps:

# Before (Claude Code):
tools: Read, Grep, Glob, Bash
disallowedTools: Write, Edit
# After (OpenCode):
tools:
read: true
grep: true
glob: true
bash: true
write: false
edit: false

Tool names are canonicalized using TOOL_NAME_MAP (e.g., TodoWritetodowrite, Tasktask).

claude-* → anthropic/claude-*
gpt-* → openai/gpt-*
o1-* → openai/o1-*
o3-* → openai/o3-*
gemini-* → google/gemini-*
inherit → (remove field)
<other> → anthropic/<other>
Agent KeywordsTemperature
review, audit, security, sentinel, oracle, lint, verification, guardian0.1
plan, planning, architecture, strategist, analysis, research0.2
doc, readme, changelog, editor, writer0.3
brainstorm, creative, ideate, design, concept0.6
(default)0.3

Before (Claude Code):

---
name: code-simplicity-reviewer
description: Reviews code for unnecessary complexity and suggests simplifications
model: inherit
tools: Read, Grep, Glob
permissionMode: default
maxSteps: 20
---
You are a code simplicity expert...

After (OpenCode):

---
name: code-simplicity-reviewer
description: Reviews code for unnecessary complexity and suggests simplifications
tools:
read: true
grep: true
glob: true
permission:
edit: ask
bash: ask
webfetch: ask
steps: 20
mode: subagent
temperature: 0.1
---
You are a code simplicity expert...

Key changes:

  1. model: inherit removed (OC inherits by default)
  2. tools array mapped to tools map with canonicalized names
  3. permissionMode: default mapped to permission object
  4. maxSteps: 20 renamed to steps: 20
  5. mode and temperature added by converter

Update references in markdown content:

CC ToolOC ToolNotes
Tasktask / @mentionUse task for programmatic, @agent for inline
Skillskill (native) or systematic_skillSystematic bundled skills use systematic_skill
TodoWritetodowriteDirect mapping
AskUserQuestionquestionDirect mapping
ReadreadLowercase
WritewriteLowercase
EditeditLowercase
BashbashLowercase
GrepgrepLowercase
GlobglobLowercase
WebFetchwebfetchLowercase
WebSearchgoogle_searchDifferent name
CC PatternOC Pattern
/compound-engineering:/systematic:
/workflows:/workflows:
compound-engineering:systematic:

These CC-specific patterns are mapped or removed by the converter:

PatternAction
context: fork in frontmatterMapped to subtask: true
${CLAUDE_SESSION_ID}Remove - not available in OC
CLAUDE.md referencesConverted to AGENTS.md by body transformer
CC ReferenceOC Reference
.claude/skills/.opencode/skills/
.claude/commands/.opencode/commands/
.claude/agents/.opencode/agents/
~/.claude/~/.config/opencode/
CLAUDE.mdAGENTS.md

systematic/
├── skills/ # Bundled skills (SKILL.md format)
│ └── <skill-name>/
│ └── SKILL.md
├── agents/ # Bundled agents (Markdown format)
│ └── <agent-name>.md
└── commands/ # Bundled commands (Markdown format)
└── <command-name>.md
  1. Project skills: .opencode/skills/ in current project
  2. User skills: ~/.config/opencode/skills/
  3. Bundled skills: Provided by systematic plugin

Include this instruction in skills that reference tools:

**Tool Mapping for OpenCode:**
When skills reference tools you don't have, substitute OpenCode equivalents:
- `TodoWrite``todowrite`
- `Task` tool with subagents → Use OpenCode's subagent system (@mention)
- `Skill` tool → OpenCode's native `skill` tool
- `SystematicSkill` tool → `systematic_skill` (Systematic plugin skills)
- `Read`, `Write`, `Edit`, `Bash` → Your native tools
- `AskUserQuestion` tool → Use OpenCode's native `question` tool

The using-systematic skill is injected into the system prompt and teaches the agent:

  • How to discover available skills
  • When to use systematic_skill vs native skill tool
  • Skill invocation discipline (invoke BEFORE any response)

  • model normalized (provider prefix added) or removed if inherit
  • disable-model-invocation mapped to hidden: true
  • context: fork mapped to subtask: true
  • allowed-tools, user-invocable, agent — pass through (used by skills-as-commands)
  • Enhance description with trigger conditions (manual — requires understanding of skill purpose)
  • Tool references updated in content (Task → task, etc.)
  • Directory references updated (.claude → .opencode)
  • Convert dynamic injection syntax if present (manual)
  • Add tool mapping instruction if skill references CC tools (manual)
  • model normalized (provider prefix added) or removed if inherit
  • Shift positional argument indices ($0 → $1) (manual)
  • Convert bash injection syntax (manual)
  • Prefix updated from /compound-engineering: to /systematic:
  • model normalized (provider prefix) or removed if inherit
  • tools array mapped to tools permission map (canonicalized names)
  • disallowedTools merged into tools map as false entries
  • maxSteps/maxTurns renamed to steps
  • permissionMode mapped to permission object
  • disable-model-invocation mapped to hidden: true
  • mode field added (primary, subagent, or all)
  • temperature field inferred from agent purpose
  • Tool references updated in content
  • skills, hooks — pass through (not enforced by OC runtime)

These CC features have no direct OC equivalent and require manual handling:

CC FeatureStatus
Dynamic injection !`command`Not converted — pre-compute or use tool calls
${CLAUDE_SESSION_ID}Not available in OC — remove
user-invocable: falsePassed through but not enforced by OC — use naming conventions

These features were previously stripped but are now automatically mapped by the converter:

CC FeatureConverter Action
model in skill/agent/commandNormalized with provider prefix (or removed if inherit)
disable-model-invocationMapped to hidden: true
context: forkMapped to subtask: true
permissionMode in agentsMapped to permission object
tools array in agentsMapped to tools permission map
disallowedTools in agentsMerged into tools map as false entries
maxSteps/maxTurns in agentsRenamed to steps

When converting, consider using these OC-specific capabilities:

FeatureUsage
mode: all in agentsSingle definition for both primary and subagent use
temperature per agentFine-tune creativity (0.1 for review, 0.6 for brainstorm)
Per-agent model selectionCost optimization (cheap for tests, premium for architecture)
hidden: true in agentsInternal-only subagents
JSONC configAdd comments to configuration
Granular bash permissionsGlob patterns for command-level control

File: compound-engineering/skills/brainstorming/SKILL.md

---
name: brainstorming
description: Collaborative design workflow for exploring ideas
model: sonnet
allowed-tools: Read, Grep, WebSearch, Task
---
# Brainstorming
This skill provides a systematic approach to brainstorming.
## Usage
When invoked, use the Task tool to spawn research agents...
## Process
1. Understand requirements
2. Explore approaches
3. Document decisions
Reference `.claude/skills/` for related skills.

File: systematic/skills/brainstorming/SKILL.md

---
name: brainstorming
description: This skill should be used before implementing features, building components, or making changes. It guides exploring user intent, approaches, and design decisions before planning. Triggers on "let's brainstorm", "help me think through", "what should we build", "explore approaches", ambiguous feature requests, or when the user's request has multiple valid interpretations that need clarification.
---
# Brainstorming
This skill provides a systematic approach to brainstorming.
## Usage
When invoked, use task or @mention to spawn research agents...
## Process
1. Understand requirements
2. Explore approaches
3. Document decisions
Reference `.opencode/skills/` or use `systematic_skill` for bundled skills.

Changes made:

  1. model: sonnet normalized to model: anthropic/sonnet (or removed if inherit)
  2. allowed-tools passed through (not stripped)
  3. ✅ Enhanced description with trigger conditions (manual step)
  4. ✅ Changed Task tooltask or @mention
  5. ✅ Changed .claude/skills/.opencode/skills/ + systematic_skill reference

The Systematic plugin includes a converter at src/lib/converter.ts:

The converter uses a map-and-preserve strategy — known CC fields are transformed to OC equivalents, and unknown fields pass through untouched. No fields are silently dropped.

CapabilityDetails
Agent frontmatter transformationMaps tools→map, maxSteps→steps, permissionMode→permission, disable-model-invocation→hidden; normalizes model; infers temperature; adds mode
Skill frontmatter transformationNormalizes model, maps context:fork→subtask, maps disable-model-invocation→hidden; unknown fields preserved
Command frontmatter transformationNormalizes model (adds provider prefix), removes inherit models
Body content transformationTool name mappings, path replacements, prefix conversions
Model normalizationAdds provider prefix (claude-→ anthropic/claude-)
CachingAvoids redundant processing via file mtime + converter version key (CONVERTER_VERSION)
CC ToolOC ToolPattern
TasktaskContext-aware (avoids “Task tool” false positives)
TodoWritetodowriteDirect replacement
AskUserQuestionquestionDirect replacement
WebSearchgoogle_searchDirect replacement
WebFetchwebfetchDirect replacement
Read, Write, Edit, Bash, Grep, GloblowercaseContext-aware (requires “tool” or “to” context)
SkillskillOnly when followed by “tool”
CC PathOC Path
.claude/skills/.opencode/skills/
.claude/commands/.opencode/commands/
.claude/agents/.opencode/agents/
~/.claude/~/.config/opencode/
CLAUDE.mdAGENTS.md
/compound-engineering:/systematic:
compound-engineering:systematic:

Remaining Gaps (Manual Attention Required)

Section titled “Remaining Gaps (Manual Attention Required)”
GapWorkaround
${CLAUDE_SESSION_ID}Remove - not available in OC
Description enhancement with trigger conditionsManual - requires understanding of skill purpose
Complex tool contextsMay require manual review for false positives/negatives

The converter supports a skipBodyTransform option to disable body content transformations:

import { convertContent } from './lib/converter.js'
// Full transformation (default)
const converted = convertContent(content, 'skill')
// Skip body transformations (frontmatter only)
const convertedFrontmatterOnly = convertContent(content, 'skill', {
skipBodyTransform: true
})

To add new transformations, modify the constants and mapping functions in src/lib/converter.ts:

// Add new body tool mappings (regex pattern → replacement string)
const TOOL_MAPPINGS: ReadonlyArray<readonly [RegExp, string]> = [
[/\bNewTool\b/g, 'new_tool'],
// ...existing mappings
]
// Add new frontmatter tool name mappings (for tools arrays)
const TOOL_NAME_MAP: Record<string, string> = {
newtool: 'new_tool',
// ...existing mappings (must stay in sync with TOOL_MAPPINGS)
}
// Add new path replacements
const PATH_REPLACEMENTS: ReadonlyArray<readonly [RegExp, string]> = [
[/new-path/g, 'replacement-path'],
// ...existing replacements
]
// Add new permission mode mappings
const PERMISSION_MODE_MAP: Record<string, PermissionConfig> = {
newmode: { edit: 'ask', bash: 'deny', webfetch: 'ask' },
// ...existing mappings
}

Important: After changing mapping logic, bump CONVERTER_VERSION to invalidate cached conversions.


After converting, verify:

  1. Skill loads correctly: systematic_skill or skill tool returns content
  2. Frontmatter parses: No YAML errors
  3. Description triggers: Model auto-invokes skill when appropriate
  4. Tool references work: Referenced tools exist in environment
  5. Directory references valid: Paths point to correct locations
  6. Body transformations applied: Tool names and paths converted correctly
  7. Frontmatter fields mapped: tools→map, maxSteps→steps, permissionMode→permission
  8. Idempotency: Running the converter twice produces the same output

Run the converter tests to validate:

Terminal window
# Unit tests (86 tests including idempotency checks)
bun test tests/unit/converter.test.ts
# Integration tests (validates real bundled asset conversion)
bun test tests/integration/converter-validation.test.ts