Package Structure
A publishable plugin should have this structure:package.json
Configure yourpackage.json for publishing:
Key Fields
Package name. Use the
@openclaw/ scope for official plugins:@openclaw/my-plugin(official)openclaw-plugin-my-plugin(community)@yourscope/openclaw-my-plugin(scoped)
Version number following semver:
1.0.0- Initial release1.1.0- New features (backward compatible)2.0.0- Breaking changes
Module type. Set to
"module" for ESM.Entry point. Use
index.ts or dist/index.js (if compiled).Keywords for npm search. Include
"openclaw" and "plugin".Runtime dependencies. Include only what your plugin needs at runtime.
Development dependencies. Include
openclaw for type imports.Specify compatible OpenClaw versions:
OpenClaw metadata:
Naming Conventions
Official Plugins
Official plugins use the@openclaw/ scope:
@openclaw/matrix@openclaw/msteams@openclaw/voice-call
Community Plugins
Community plugins should use descriptive names:openclaw-plugin-slack-advancedopenclaw-jira-integration@yourname/openclaw-custom-tool
Channel Plugins
Channel plugins should clearly indicate the platform:@openclaw/rocketchatopenclaw-plugin-zulip
Tool Plugins
Tool plugins should describe their capability:openclaw-plugin-githubopenclaw-tool-database@yourname/openclaw-crm
README
Include a comprehensive README:Configuration
Usage
Examples of how to use your plugin.License
MITDevelopment files
*.test.ts *.spec.ts tsconfig.json vitest.config.ts .eslintrc .prettierrcBuild artifacts
*.log .DS_Store node_modules/CI/CD
.github/ .gitlab-ci.ymlDocumentation
docs/ examples/3. Build your plugin (if needed)
If you compile TypeScript:4. Test the package
Verify what will be published:5. Publish
For scoped packages:Publishing Updates
To publish updates:-
Update version:
-
Publish:
-
Tag the release:
Distribution Tags
Use distribution tags for pre-releases:latest- Stable releases (default)beta- Beta releasesnext- Development releasescanary- Nightly builds
Plugin Registry
Official plugins are listed in OpenClaw’s plugin registry. To submit your plugin:- Publish to npm
- Open an issue at openclaw/openclaw
- Include:
- Plugin name and npm package
- Description
- Documentation link
- Example configuration
Best Practices
1. Documentation
Provide clear documentation:- Installation instructions
- Configuration examples
- Usage examples
- API reference
- Troubleshooting
2. Testing
Include tests:3. TypeScript Types
Include type definitions:4. Changelog
Maintain a CHANGELOG.md:5. License
Include a LICENSE file. Popular choices:- MIT (permissive)
- Apache 2.0 (permissive with patent grant)
- GPL (copyleft)
6. CI/CD
Automate testing and publishing:Example: Publishing a Tool Plugin
Next Steps
- Plugin SDK Reference - Complete API documentation
- Examples - Real-world plugin examples
- Built-in Extensions - Explore existing plugins

