This page documents how the superpowers plugin bridges the gap between skills written for Claude Code and the OpenCode runtime. Skills in the library use Claude Code tool names (TodoWrite, Task, Skill, etc.) as their reference vocabulary. The tool mapping layer translates these into OpenCode-native equivalents at session bootstrap time, so the same skill files work across both platforms without modification.
For details on how bootstrap content is injected into the session, see Session Lifecycle and Bootstrap. For how skills are discovered on disk, see Skills Discovery and Resolution. For the full OpenCode integration architecture, see OpenCode Integration.
The superpowers skill library was originally authored with Claude Code tooling in mind. Skills reference specific tool names:
TodoWrite to track task checklistsTask to dispatch subagentsSkill to load other skillsOpenCode does not expose these same tool names. Without a translation layer, agents running on OpenCode would encounter tool references in skill content that do not correspond to anything in their environment, causing them to either ignore the instructions or fail silently.
The mapping is not a runtime shim or code-level alias. It is a natural language instruction block appended to the bootstrap content injected into every session's system prompt.
The mapping is constructed inside getBootstrapContent in .opencode/plugins/superpowers.js64-73:
TodoWrite → update_plan
Task (subagents) → @mention syntax
Skill tool → OpenCode's native skill tool
Read/Write/Edit/Bash → Native tools
This block is inserted after the using-superpowers skill content and before the closing </EXTREMELY_IMPORTANT> tag, so it is always present when the agent reads its operating instructions.
Sources: .opencode/plugins/superpowers.js56-83
| Claude Code Tool | OpenCode Equivalent | Purpose |
|---|---|---|
TodoWrite | update_plan | Track and update task checklists |
Task (subagent dispatch) | @mention syntax | Invoke subagents / parallel agents |
Skill | native skill tool | Load and list skills |
Read | native file read tool | Read file contents |
Write | native file write tool | Write file contents |
Edit | native file edit tool | Apply targeted edits |
Bash | native shell tool | Execute shell commands |
The file and shell tool mappings (Read, Write, Edit, Bash) are indicated by the phrase "Your native tools" in the bootstrap block — OpenCode's equivalents vary by model/session and the agent resolves them contextually.
Sources: .opencode/plugins/superpowers.js64-73 docs/README.opencode.md252-255 .opencode/INSTALL.md111-114
Diagram: Bootstrap Content Assembly — getBootstrapContent
Sources: .opencode/plugins/superpowers.js56-95
Diagram: Tool Mapping Code Entities
Sources: .opencode/plugins/superpowers.js1-95
toolMapping String in DetailThe toolMapping constant is assembled at .opencode/plugins/superpowers.js64-73 and reads as follows in the injected system prompt:
**Tool Mapping for OpenCode:**
When skills reference tools you don't have, substitute OpenCode equivalents:
- `TodoWrite` → `update_plan`
- `Task` tool with subagents → Use OpenCode's subagent system (@mention)
- `Skill` tool → OpenCode's native `skill` tool
- `Read`, `Write`, `Edit`, `Bash` → Your native tools
**Skills location:**
Superpowers skills are in `<configDir>/skills/superpowers/`
Use OpenCode's native `skill` tool to list and load skills.
The configDir is resolved at runtime from OPENCODE_CONFIG_DIR environment variable or falls back to ~/.config/opencode, via normalizePath at .opencode/plugins/superpowers.js37-47
Sources: .opencode/plugins/superpowers.js64-73 .opencode/plugins/superpowers.js37-53
Skills are Markdown files read by an LLM agent. There is no execution engine parsing tool calls out of skill content — the agent reads the skill text and decides which of its available tools to invoke. Because of this, the mapping only needs to be expressed as natural language instructions. The agent pattern-matches TodoWrite in skill text to update_plan in its tool list, guided by the mapping block it received at session start.
This design keeps skill files platform-agnostic. The same SKILL.md content that instructs a Claude Code agent to call TodoWrite also instructs an OpenCode agent to call update_plan, because the mapping instruction is already in the agent's context when it reads the skill.
Sources: docs/README.opencode.md247-255 .opencode/plugins/superpowers.js75-83
The tool mapping applies only to the OpenCode platform. On Claude Code, agents have native access to TodoWrite, Task, and Skill — no mapping is needed and none is injected. The mapping block is constructed inside getBootstrapContent, which is only called by the OpenCode plugin's experimental.chat.system.transform hook.
| Platform | Mapping Required | Delivery Mechanism |
|---|---|---|
| Claude Code | No — tools are native | N/A |
| OpenCode | Yes | getBootstrapContent → system.transform |
| Cursor | No — uses Claude backend | N/A |
| Codex | No — uses native skill discovery | N/A |
Sources: .opencode/plugins/superpowers.js86-94 docs/README.opencode.md240-255
Refresh this wiki
This wiki was recently refreshed. Please wait 3 days to refresh again.