Plugin System
Plugins are platform-specific packages that integrate Superpowers with different AI coding tools. Each platform has unique requirements for how plugins are structured, distributed, and installed.Plugin Manifest Formats
Superpowers includes manifests for four platforms, each with different capabilities and installation methods.Claude Code Plugin
Location:.claude-plugin/plugin.json
Field Descriptions
Field Descriptions
name: Unique plugin identifier (lowercase, no spaces)displayName: Human-readable name shown in UIdescription: Short description (under 100 chars)version: Semantic version (MAJOR.MINOR.PATCH)author: Author name and emailhomepage: Plugin website/documentation URLrepository: Source code repository URLlicense: SPDX license identifierkeywords: Searchable tags for marketplaceskills: Relative path to skills directoryagents: Relative path to agents directorycommands: Relative path to commands directoryhooks: Relative path to hooks configuration
Claude Code automatically registers all resources (skills, agents, commands, hooks) from the paths specified in
plugin.json.Cursor Plugin
Location:.cursor-plugin/plugin.json
OpenCode Plugin
Location:.opencode/plugins/superpowers.js
OpenCode uses a JavaScript plugin with code-based integration:
How OpenCode Plugin Works
How OpenCode Plugin Works
- Export named function:
SuperpowersPluginis the entry point - Receive context: Gets
{ client, directory }parameters - Read skill content: Loads the using-superpowers SKILL.md file
- Strip frontmatter: Removes YAML metadata
- Add tool mapping: Translates tool names for OpenCode
- Return hooks object: Registers system prompt transform
- Transform executes: Injects content at session start
OpenCode plugins use experimental hooks (
experimental.chat.system.transform) because OpenCode doesn’t have built-in hooks support.Codex (No Plugin)
Codex doesn’t have a plugin system - it uses direct symlink discovery: Installation:.codex/INSTALL.md
Distribution Methods
Marketplace (Claude Code, Cursor)
Register Marketplace
Users register your marketplace using the plugin marketplace add command with the repository path
Manual Installation (OpenCode, Codex)
Creating a Plugin for a New Platform
Step 1: Analyze Platform Capabilities
Plugin System
Does the platform support plugins? If yes, what format?
Skill Discovery
How does the platform discover skills? Automatic or manual?
Hooks Support
Does the platform support lifecycle hooks?
Commands
Can users register custom slash commands?
Step 2: Choose Integration Method
Full Plugin Support (Claude Code style)
Full Plugin Support (Claude Code style)
If the platform has:
- Plugin manifest format
- Automatic resource discovery
- Hooks support
- Marketplace distribution
.platform-name-plugin/plugin.json with paths:Hybrid Plugin (OpenCode style)
Hybrid Plugin (OpenCode style)
If the platform has:
- Plugin code execution
- System prompt hooks
- Manual symlink setup
.platform-name/plugins/superpowers.js with:- Bootstrap injection via system hooks
- Tool name mapping for platform
- Skills symlink instructions
Manual Symlink (Codex style)
Manual Symlink (Codex style)
If the platform has:
- Native skill discovery
- No plugin system
- No hooks
.platform-name/INSTALL.md with:- Git clone instructions
- Symlink setup to skills directory
- Manual loading instructions
Step 3: Create Platform-Specific Directory
Create a directory with the platform name and plugin suffixStep 4: Write Plugin Manifest or Code
For JSON manifests (Claude Code, Cursor):Step 5: Write Installation Instructions
Create a platform-specific INSTALL.md file with:Step 6: Test Installation
Step 7: Submit Pull Request
Contribute your platform support back to Superpowers:- Fork the repository
- Create branch:
git checkout -b platform/platform-name - Add platform directory and files
- Update main README.md with installation section
- Submit PR with:
- Platform name and link
- Installation instructions
- Known limitations
- Testing notes
Plugin Packaging Best Practices
Use Semantic Versioning: Follow SemVer (MAJOR.MINOR.PATCH) - MAJOR for breaking changes, MINOR for new features (backward compatible), PATCH for bug fixes. Keep Manifests Minimal: Only include necessary fields like name, description, version, author, and repository. Use Relative Paths: Always use relative paths with dot-slash prefix to ensure cross-platform compatibility. Test Cross-Platform: If hooks are supported, test on both Windows and Unix systems to ensure compatibility.Platform Comparison Matrix
| Feature | Claude Code | Cursor | OpenCode | Codex |
|---|---|---|---|---|
| Plugin Manifest | ✅ JSON | ✅ JSON | ✅ JavaScript | ❌ None |
| Marketplace | ✅ Yes | ✅ Yes | ❌ No | ❌ No |
| Auto-Discovery | ✅ Yes | ✅ Yes | ⚠️ Partial | ✅ Skills only |
| Hooks System | ✅ Yes | ✅ Yes | ⚠️ Experimental | ❌ No |
| Auto-Updates | ✅ Yes | ✅ Yes | ❌ Manual | ❌ Manual |
| Commands | ✅ Yes | ✅ Yes | ✅ Yes | ⚠️ Limited |
| Agents | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
| Installation | 🎯 Marketplace | 🎯 Marketplace | 🔧 Manual | 🔧 Manual |
Troubleshooting Plugin Issues
Plugin Not Loading
Check manifest syntax
Check manifest syntax
Validate JSON with jq to check for syntax errors like missing commas, trailing commas, or unescaped quotes.
Verify file paths
Verify file paths
Check that all referenced paths exist by listing them with ls -la for skills, agents, commands, and hooks directories.
Check platform logs
Check platform logs
- Claude Code:
/debug logs - Cursor: Developer Console
- OpenCode: Check terminal output
Skills Not Discovered
Verify symlinks
Verify symlinks
Check that the symlink points to the correct location in your config or agents directory.
Check SKILL.md format
Check SKILL.md format
Each skill needs valid frontmatter:
Hooks Not Running
Test hook directly
Test hook directly
Run the hook script directly and verify it outputs valid JSON.
Check hooks.json
Check hooks.json
Validate the hooks JSON file using jq to check syntax and verify matcher pattern and command path.
Verify hook permissions
Verify hook permissions
Ensure hook scripts have execute permissions using chmod +x on the hook files
Next Steps
Architecture
Understand overall system architecture
Hooks System
Learn how hooks work in detail
Creating Skills
Write skills that plugins distribute
Contributing
Contribute platform support