Skip to main content

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
  • name: Unique plugin identifier (lowercase, no spaces)
  • displayName: Human-readable name shown in UI
  • description: Short description (under 100 chars)
  • version: Semantic version (MAJOR.MINOR.PATCH)
  • author: Author name and email
  • homepage: Plugin website/documentation URL
  • repository: Source code repository URL
  • license: SPDX license identifier
  • keywords: Searchable tags for marketplace
  • skills: Relative path to skills directory
  • agents: Relative path to agents directory
  • commands: Relative path to commands directory
  • hooks: 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
Cursor’s plugin format is simpler than Claude Code’s - it doesn’t support explicit path declarations for skills/agents/commands/hooks. Cursor uses convention-based discovery.

OpenCode Plugin

Location: .opencode/plugins/superpowers.js OpenCode uses a JavaScript plugin with code-based integration:
  1. Export named function: SuperpowersPlugin is the entry point
  2. Receive context: Gets { client, directory } parameters
  3. Read skill content: Loads the using-superpowers SKILL.md file
  4. Strip frontmatter: Removes YAML metadata
  5. Add tool mapping: Translates tool names for OpenCode
  6. Return hooks object: Registers system prompt transform
  7. 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
Codex has no hooks support - cannot inject context at session start. Users must manually load the using-superpowers skill in each session.

Distribution Methods

Marketplace (Claude Code, Cursor)

1

Create Marketplace Repository

Create a Git repository with marketplace.json:
2

Register Marketplace

Users register your marketplace using the plugin marketplace add command with the repository path
3

Install Plugin

Users install from marketplace using the plugin install command
4

Automatic Updates

Platforms automatically check for updates using the plugin update command

Manual Installation (OpenCode, Codex)

1

Clone Repository

Clone the repository to the appropriate config directory for your platform
2

Create Symlinks

Create symlinks for plugins and skills directories in the platform config location
3

Restart Platform

Restart the AI coding tool to discover new resources.
4

Manual Updates

Navigate to the installation directory and run git pull to update

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

If the platform has:
  • Plugin manifest format
  • Automatic resource discovery
  • Hooks support
  • Marketplace distribution
Create: .platform-name-plugin/plugin.json with paths:
If the platform has:
  • Plugin code execution
  • System prompt hooks
  • Manual symlink setup
Create: .platform-name/plugins/superpowers.js with:
  • Bootstrap injection via system hooks
  • Tool name mapping for platform
  • Skills symlink instructions

Step 3: Create Platform-Specific Directory

Create a directory with the platform name and plugin suffix

Step 4: Write Plugin Manifest or Code

For JSON manifests (Claude Code, Cursor):
For code plugins (OpenCode):

Step 5: Write Installation Instructions

Create a platform-specific INSTALL.md file with:

Step 6: Test Installation

1

Test Clean Install

On a fresh system, follow your installation instructions exactly.
2

Test Skill Loading

Verify skills are discovered and loadable.
3

Test Hook Execution

If hooks supported, verify SessionStart hook injects context.
4

Test Updates

Modify a skill, run update command, verify changes appear.

Step 7: Submit Pull Request

Contribute your platform support back to Superpowers:
  1. Fork the repository
  2. Create branch: git checkout -b platform/platform-name
  3. Add platform directory and files
  4. Update main README.md with installation section
  5. 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

Troubleshooting Plugin Issues

Plugin Not Loading

Validate JSON with jq to check for syntax errors like missing commas, trailing commas, or unescaped quotes.
Check that all referenced paths exist by listing them with ls -la for skills, agents, commands, and hooks directories.
  • Claude Code: /debug logs
  • Cursor: Developer Console
  • OpenCode: Check terminal output

Skills Not Discovered

Each skill needs valid frontmatter:

Hooks Not Running

Run the hook script directly and verify it outputs valid JSON.
Validate the hooks JSON file using jq to check syntax and verify matcher pattern and command path.
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