What Are Plugins?
A plugin is a directory structure that can contain:- Skills: Specialized knowledge and workflows
- Hooks: Event handlers for tool lifecycle
- MCP Config: External tool server configurations
- Agents: Specialized agent definitions
- Commands: Slash commands
The plugin format is compatible with the Claude Code plugin structure, enabling ecosystem interoperability.
Plugins vs Skills
Understanding the difference helps you choose the right approach:Skills
Single-purpose knowledge packages
- One skill = one specific capability
- Just a SKILL.md file (+ optional resources)
- Lightweight and focused
- Easy to create and share
- Adding single capabilities
- Simple workflows
- Domain-specific knowledge
- Quick solutions
Plugins
Multi-component bundles
- Multiple skills + hooks + config
- Complete feature ecosystems
- Coordinated components
- Professional distribution
- Complete feature sets
- Tool integrations
- Team standards
- Commercial distributions
Comparison Table
| Aspect | Skills | Plugins |
|---|---|---|
| Complexity | Simple | Comprehensive |
| Components | Knowledge only | Skills + hooks + MCP + commands |
| Use Case | Single capability | Complete feature set |
| Creation | Few minutes | Planned development |
| Distribution | Copy directory | Structured package |
| Maintenance | Individual files | Coordinated bundle |
When to Use Each
Use a Skill when you need:- A single reusable prompt or workflow
- Domain-specific knowledge
- Simple automation
- Quick solutions
- Multiple related skills working together
- Event handlers (hooks) for tool actions
- External tool integrations (MCP)
- Complete platform integrations
- Team or organizational standards
Plugin Structure
A complete plugin follows this directory structure:Required Components
Only one file is required:plugin-name/.plugin/plugin.json: Plugin metadata
Plugin Metadata
Theplugin.json file defines your plugin:
Plugin Components Explained
Skills
Skills
Skills in plugins work identically to standalone skills. Each skill has its own directory with a SKILL.md file:See Skills Documentation for skill creation details.
Hooks
Hooks
Hooks are event handlers that run during tool lifecycle events:Common use cases:
- Run linters after file edits
- Validate tool inputs
- Log tool usage
- Trigger dependent actions
PreToolUse: Before tool executionPostToolUse: After tool executionOnError: When tool fails
MCP Configuration
MCP Configuration
MCP (Model Context Protocol) servers provide external tools and resources:Use cases:
- Connect to external APIs
- Add specialized tools
- Integrate third-party services
Agents
Agents
Specialized agent definitions for specific tasks:Agents in plugins can use the plugin’s skills and hooks automatically.
Commands
Commands
Custom slash commands for plugin functionality:Commands provide quick access to plugin features.
Using Plugins
How you use plugins depends on your platform:- CLI
- SDK
- Local GUI
- OpenHands Cloud
Via configuration file:Create Via command line:Plugins are loaded when OpenHands starts.
~/.openhands/config.toml:Installing Plugins
From a Local Directory
-
Verify plugin structure:
- Use the plugin path in your configuration or command line
From GitHub
Plugins can be loaded directly from GitHub repositories:Plugin Sources
Official Registry
github.com/OpenHands/extensionsCommunity-maintained plugins
Custom Repositories
Your own GitHub repositoriesOrganization or private plugins
Creating Plugins
To create your own plugin:1. Plan Your Components
Determine what your plugin needs:- Which skills?
- What hooks for automation?
- Any MCP integrations?
- Custom commands?
2. Create Directory Structure
3. Create Plugin Metadata
Createmy-plugin/.plugin/plugin.json:
4. Add Components
Add skills, hooks, and other components as needed:5. Test Locally
Load your plugin and verify all components work:6. Distribute
Options for distribution:- GitHub repository: Push to GitHub and share URL
- File sharing: Zip and share directory
- Package registry: Submit to official registry
Plugin Examples
Code Quality Plugin
Contains:
- Python linting skill
- JavaScript linting skill
- Post-edit hooks for auto-linting
- Pre-commit setup
DevOps Plugin
Contains:
- Kubernetes deployment skill
- Docker build skill
- CI/CD workflow skill
- kubectl MCP server
API Integration Plugin
Contains:
- REST API client skill
- Authentication skill
- Rate limiting hooks
- API MCP server
Testing Plugin
Contains:
- Unit testing skill
- Integration testing skill
- Post-code hooks for test runs
- Coverage commands
Plugin Development Best Practices
Start with Skills
Begin by creating the core skills your plugin needs. Test them individually before bundling.
Add Automation with Hooks
Identify repetitive tasks and automate them with hooks. Example: run linters after file edits.
Integrate External Tools
Add MCP servers for external tool integration. This provides your skills with additional capabilities.
Document Thoroughly
Include a comprehensive README explaining:
- What the plugin does
- How to install it
- Configuration options
- Example usage
Troubleshooting
Plugin Not Loading
Plugin Not Loading
Check:
.plugin/plugin.jsonexists and is valid JSON- Plugin path is correct
- All referenced files exist
Skills Not Triggering
Skills Not Triggering
Check:
- Skills have valid SKILL.md files
- Frontmatter includes
triggers - Trigger keywords match your prompts
Hooks Not Running
Hooks Not Running
Check:
hooks/hooks.jsonsyntax is valid- Hook matchers target the right tools
- Commands are executable
Next Steps
- Learn about Skills - Understand the core component of plugins
- Explore MCP - Add external tool integrations
- SDK Plugins Guide - Programmatic plugin usage
- Browse Examples - See complete plugin structures
Further Reading
For SDK developers:- SDK Plugins Documentation - Detailed SDK integration
- Hooks Guide - Event handler details
- MCP Integration - External tool servers

