Complete guide for using Superpowers-BD with OpenCode.ai.
Tell OpenCode:
Clone https://github.com/schlenks/superpowers-bd to ~/.config/opencode/superpowers-bd, run npm install in ~/.config/opencode/superpowers-bd/.opencode, then create directory ~/.config/opencode/plugins, then symlink ~/.config/opencode/superpowers-bd/.opencode/plugins/superpowers-bd.js to ~/.config/opencode/plugins/superpowers-bd.js, then restart opencode.
- OpenCode.ai installed
- Node.js installed
- Git installed
mkdir -p ~/.config/opencode/superpowers-bd
git clone https://github.com/schlenks/superpowers-bd.git ~/.config/opencode/superpowers-bd
cd ~/.config/opencode/superpowers-bd/.opencode
npm installOpenCode discovers plugins from ~/.config/opencode/plugins/. Create a symlink:
mkdir -p ~/.config/opencode/plugins
ln -sf ~/.config/opencode/superpowers-bd/.opencode/plugins/superpowers-bd.js ~/.config/opencode/plugins/superpowers-bd.jsAlternatively, for project-local installation:
# In your OpenCode project
mkdir -p .opencode/plugins
ln -sf ~/.config/opencode/superpowers-bd/.opencode/plugins/superpowers-bd.js .opencode/plugins/superpowers-bd.jsRestart OpenCode to load the plugin. Superpowers-BD will automatically activate.
Use the find_skills tool to list all available skills:
use find_skills tool
Use the use_skill tool to load a specific skill:
use use_skill tool with skill_name: "superpowers-bd:brainstorming"
Skills are automatically inserted into the conversation and persist across context compaction.
Create your own skills in ~/.config/opencode/skills/:
mkdir -p ~/.config/opencode/skills/my-skillCreate ~/.config/opencode/skills/my-skill/SKILL.md:
---
name: my-skill
description: Use when [condition] - [what it does]
---
# My Skill
[Your skill content here]Create project-specific skills in your OpenCode project:
# In your OpenCode project
mkdir -p .opencode/skills/my-project-skillCreate .opencode/skills/my-project-skill/SKILL.md:
---
name: my-project-skill
description: Use when [condition] - [what it does]
---
# My Project Skill
[Your skill content here]Skills are resolved with this priority order:
- Project skills (
.opencode/skills/) - Highest priority - Personal skills (
~/.config/opencode/skills/) - Superpowers-BD skills (
~/.config/opencode/superpowers-bd/skills/)
You can force resolution to a specific level:
project:skill-name- Force project skillskill-name- Search project → personal → Superpowers-BDsuperpowers-bd:skill-name- Force Superpowers-BD skill
The plugin automatically injects Superpowers-BD context when OpenCode emits session.created. No manual configuration needed.
When you load a skill with use_skill, it's inserted as a user message with noReply: true. This ensures skills persist throughout long conversations, even when OpenCode compacts context.
The plugin listens for session.compacted events and automatically re-injects the core Superpowers-BD bootstrap to maintain functionality after context compaction.
Skills written for Claude Code are automatically adapted for OpenCode. The plugin provides mapping instructions:
TaskCreate,TaskUpdate,TaskList,TaskGet→update_planTodoWrite(legacy) →update_planTaskwith subagents → OpenCode's@mentionsystemSkilltool →use_skillcustom tool- File operations → Native OpenCode tools
Location: ~/.config/opencode/superpowers-bd/.opencode/plugins/superpowers-bd.js
Components:
- Two custom tools:
use_skill,find_skills session.createdevent handler for initial context injection- event handler for session.compacted re-injection
- Uses shared
lib/skills-core.jsmodule (also used by Codex)
Location: ~/.config/opencode/superpowers-bd/lib/skills-core.js
Functions:
extractFrontmatter()- Parse skill metadatastripFrontmatter()- Remove metadata from contentfindSkillsInDir()- Recursive skill discoveryresolveSkillPath()- Skill resolution with shadowingcheckForUpdates()- Git update detection
This module is shared between OpenCode and Codex implementations for code reuse.
cd ~/.config/opencode/superpowers-bd
git pullRestart OpenCode to load the updates.
- Check plugin file exists:
ls ~/.config/opencode/superpowers-bd/.opencode/plugins/superpowers-bd.js - Check symlink:
ls -l ~/.config/opencode/plugins/superpowers-bd.js - Check OpenCode logs:
opencode run "test" --print-logs --log-level DEBUG - Look for:
service=plugin path=file:///.../superpowers-bd.js loading plugin
- Verify skills directory:
ls ~/.config/opencode/superpowers-bd/skills - Use
find_skillstool to see what's discovered - Check skill structure: each skill needs a
SKILL.mdfile
- Verify plugin loaded: Check OpenCode logs for plugin loading message
- Check Node.js version: The plugin requires Node.js for ES modules
- Test plugin manually:
node --input-type=module -e "import('file://~/.config/opencode/plugins/superpowers-bd.js').then(m => console.log(Object.keys(m)))"
- Check whether
session.createdevents are reaching the plugin - Verify using-superpowers skill exists
- Check OpenCode version (requires recent version with plugin support)
- Report issues: https://github.com/schlenks/superpowers-bd/issues
- Main documentation: https://github.com/schlenks/superpowers-bd
- OpenCode docs: https://opencode.ai/docs/
The implementation includes an automated test suite at tests/opencode/:
# Run all tests
./tests/opencode/run-tests.sh --integration --verbose
# Run specific test
./tests/opencode/run-tests.sh --test test-tools.shTests verify:
- Plugin loading
- Skills-core library functionality
- Tool execution (use_skill, find_skills)
- Skill priority resolution
- Proper isolation with temp HOME