136 lines
2.9 KiB
Markdown
136 lines
2.9 KiB
Markdown
# Installing Superpowers for OpenCode
|
|
|
|
## Prerequisites
|
|
|
|
- [OpenCode.ai](https://opencode.ai) installed
|
|
- Node.js installed
|
|
- Git installed
|
|
|
|
## Installation Steps
|
|
|
|
### 1. Install Superpowers
|
|
|
|
```bash
|
|
mkdir -p ~/.config/opencode/superpowers
|
|
git clone https://github.com/obra/superpowers.git ~/.config/opencode/superpowers
|
|
```
|
|
|
|
### 2. Register the Plugin
|
|
|
|
Create a symlink so OpenCode discovers the plugin:
|
|
|
|
```bash
|
|
mkdir -p ~/.config/opencode/plugin
|
|
ln -sf ~/.config/opencode/superpowers/.opencode/plugin/superpowers.js ~/.config/opencode/plugin/superpowers.js
|
|
```
|
|
|
|
### 3. Restart OpenCode
|
|
|
|
Restart OpenCode. The plugin will automatically inject superpowers context via the chat.message hook.
|
|
|
|
You should see superpowers is active when you ask "do you have superpowers?"
|
|
|
|
## Usage
|
|
|
|
### Finding Skills
|
|
|
|
Use the `find_skills` tool to list all available skills:
|
|
|
|
```
|
|
use find_skills tool
|
|
```
|
|
|
|
### Loading a Skill
|
|
|
|
Use the `use_skill` tool to load a specific skill:
|
|
|
|
```
|
|
use use_skill tool with skill_name: "superpowers:brainstorming"
|
|
```
|
|
|
|
### Personal Skills
|
|
|
|
Create your own skills in `~/.config/opencode/skills/`:
|
|
|
|
```bash
|
|
mkdir -p ~/.config/opencode/skills/my-skill
|
|
```
|
|
|
|
Create `~/.config/opencode/skills/my-skill/SKILL.md`:
|
|
|
|
```markdown
|
|
---
|
|
name: my-skill
|
|
description: Use when [condition] - [what it does]
|
|
---
|
|
|
|
# My Skill
|
|
|
|
[Your skill content here]
|
|
```
|
|
|
|
Personal skills override superpowers skills with the same name.
|
|
|
|
### Project Skills
|
|
|
|
Create project-specific skills in your OpenCode project:
|
|
|
|
```bash
|
|
# In your OpenCode project
|
|
mkdir -p .opencode/skills/my-project-skill
|
|
```
|
|
|
|
Create `.opencode/skills/my-project-skill/SKILL.md`:
|
|
|
|
```markdown
|
|
---
|
|
name: my-project-skill
|
|
description: Use when [condition] - [what it does]
|
|
---
|
|
|
|
# My Project Skill
|
|
|
|
[Your skill content here]
|
|
```
|
|
|
|
**Skill Priority:** Project skills override personal skills, which override superpowers skills.
|
|
|
|
**Skill Naming:**
|
|
- `project:skill-name` - Force project skill lookup
|
|
- `skill-name` - Searches project → personal → superpowers
|
|
- `superpowers:skill-name` - Force superpowers skill lookup
|
|
|
|
## Updating
|
|
|
|
```bash
|
|
cd ~/.config/opencode/superpowers
|
|
git pull
|
|
```
|
|
|
|
## Troubleshooting
|
|
|
|
### Plugin not loading
|
|
|
|
1. Check plugin file exists: `ls ~/.config/opencode/superpowers/.opencode/plugin/superpowers.js`
|
|
2. Check OpenCode logs for errors
|
|
3. Verify Node.js is installed: `node --version`
|
|
|
|
### Skills not found
|
|
|
|
1. Verify skills directory exists: `ls ~/.config/opencode/superpowers/skills`
|
|
2. Use `find_skills` tool to see what's discovered
|
|
3. Check file structure: each skill should have a `SKILL.md` file
|
|
|
|
### Tool mapping issues
|
|
|
|
When a skill references a Claude Code tool you don't have:
|
|
- `TodoWrite` → use `update_plan`
|
|
- `Task` with subagents → use `@mention` syntax to invoke OpenCode subagents
|
|
- `Skill` → use `use_skill` tool
|
|
- File operations → use your native tools
|
|
|
|
## Getting Help
|
|
|
|
- Report issues: https://github.com/obra/superpowers/issues
|
|
- Documentation: https://github.com/obra/superpowers
|