Superpower is an OpenCode plugin that dynamically loads agents, skills, and commands from the superpowers repository. It extends OpenCode with custom agents and capabilities without requiring code changes.
Startup → Clone superpowers repo → Load agents → Register skills → Register commands → Ready
- Dynamic Agent Loading: Loads agent definitions from
~/.superpowers/agents/ - Skill Registry: Registers skills from
~/.superpowers/skills/ - Command Templates: Registers command templates from
~/.superpowers/commands/
On first load, Superpower clones the superpowers repository to ~/.superpowers/. It then:
- Scans
~/.superpowers/agents/*.mdand registers agents with OpenCode - Scans
~/.superpowers/skills/*/SKILL.mdand registers them as skills - Scans
~/.superpowers/commands/*.mdand registers them as commands
The superpowers repo is cloned once and reused on subsequent runs.
In .opencode/opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"plugin": [
"./plugins/superpower/index.ts"
]
}Use any agent defined in the superpowers repository:
@<agent-name> Your task description here
For example, if the superpowers repo contains a reviewer agent:
@reviewer Review the authentication module
Skills are registered with the superpowers/ prefix:
@superpowers/reviewer Review the authentication module
Commands are available directly:
/<command-name> argument1 argument2
Agents are defined in Markdown files with YAML frontmatter in ~/.superpowers/agents/:
---
name: reviewer
description: Code reviewer agent that provides constructive feedback
mode: subagent
---
You are an experienced code reviewer. Your role is to:
1. Understand the code changes
2. Identify potential issues
3. Provide constructive feedback
4. Suggest improvements| Field | Type | Required | Description |
|---|---|---|---|
name |
string |
No | Agent name (defaults to filename without .md) |
description |
string |
No | Agent description shown in OpenCode |
mode |
string |
No | Agent mode: subagent, primary, or all (default: subagent) |
Skills are directories in ~/.superpowers/skills/ containing a SKILL.md file:
~/.superpowers/skills/
└── reviewer/
└── SKILL.md
SKILL.md uses YAML frontmatter:
---
description: Review code changes and provide feedback
---
# Code Review Skill
You are an expert code reviewer. When invoked:
1. Read the diff or changed files
2. Analyze for bugs, security issues, performance problems
3. Check for code style consistency
4. Provide actionable feedbackCommands are Markdown files in ~/.superpowers/commands/:
---
name: review
description: Review code changes
---
Review the following code changes:
$ARGUMENTSThe $ARGUMENTS placeholder is replaced with user input.
No configuration required! Superpower automatically clones and loads from ~/.superpowers/.
If you want to use a different superpowers location, you can set the environment variable:
export SUPERPOWERS_DIR=/path/to/your/superpowers.opencode/
├── opencode.json # Plugin registration
└── plugins/
└── superpower/
└── index.ts # Plugin entry point
- Check that
~/.superpowers/exists - Verify the directory contains
agents/,skills/, andcommands/subdirectories - Check that Markdown files have proper frontmatter
- Verify agent files are in
~/.superpowers/agents/*.md - Check that frontmatter has valid
modefield - Ensure the Markdown body is not empty
- Verify skill directories contain
SKILL.md - Check command files have proper frontmatter
- Ensure
$ARGUMENTSplaceholder is used for commands that need user input