System Architecture
Superpowers is a modular system built around composable skills, hooks, plugins, commands, and agents that work together to provide a complete development workflow.Core Components
Skills
Reusable workflow modules that guide agents through specific tasks like TDD, debugging, and brainstorming.
Hooks
Lifecycle event handlers that inject context at specific points, like session start.
Plugins
Platform-specific packages that register Superpowers with different AI coding tools.
Commands
Slash commands that invoke skills directly (e.g.,
/brainstorm).Agents
Specialized subagents for specific tasks like code review.
Skills Core
Core library for skill discovery, resolution, and loading.
How Components Fit Together
Directory Structure
Superpowers follows a consistent structure across all platforms:Skills System
Skill Discovery
The skills system useslib/skills-core.js to discover and resolve skills from multiple sources:
Find SKILL.md Files
Recursively searches configured directories for
SKILL.md files (up to 3 levels deep):Extract Frontmatter
Each skill has YAML frontmatter with metadata:The
extractFrontmatter() function parses this to get the skill’s name and description.Skill Invocation Flow
Plugin Architecture
Platform Differences
Claude Code & Cursor (Marketplace)
Claude Code & Cursor (Marketplace)
These platforms have built-in plugin marketplaces and automatic installation:
- Registration: Via plugin marketplace commands
- Distribution: Git repository URLs
- Updates: Automatic via
/plugin update - Hooks: Automatically registered from
hooks.json - Skills: Automatically discovered from
skills/directory
OpenCode (Manual + Plugin)
OpenCode (Manual + Plugin)
OpenCode uses a hybrid approach with manual setup + plugin code:
- Registration: Manual symlink to
~/.config/opencode/plugins/superpowers.js - Distribution: Manual git clone
- Updates: Manual
git pull - Skills: Manual symlink to
~/.config/opencode/skills/superpowers - Bootstrap: Plugin injects context via system prompt transform
Codex (Manual Symlink)
Codex (Manual Symlink)
Codex uses native skill discovery without plugins:
- Registration: Symlink to
~/.agents/skills/superpowers - Distribution: Manual git clone
- Updates: Manual
git pull - Skills: Discovered automatically via symlink
- No hooks: Codex doesn’t support hooks system
Commands System
Commands are simple wrappers that invoke skills directly:- Convenience:
/brainstorminstead of manually invoking skill tool - Discoverability: Listed in platform command menus
- Consistency: Same interface across platforms
Agents System
Agents are specialized subagents with specific roles:- Isolated context: Fresh agent per invocation
- Specialized knowledge: Role-specific instructions
- Model inheritance: Uses same model as parent
- Structured output: Consistent review format
Hook System Integration
Hooks integrate with platform lifecycle events. See Hooks System for details.Key Design Principles
Modularity: Each component (skill, hook, command, agent) is independent and composable.
Platform Abstraction: Core skills work across all platforms; only installation differs.
User Override: Personal skills always shadow superpowers skills, enabling customization.
Automatic Triggering: Skills activate based on context, not explicit invocation.
Next Steps
Hooks System
Learn how hooks inject context at session start
Plugin System
Understand plugin manifests and distribution
Creating Skills
Write your own custom skills
Contributing
Contribute to Superpowers