Quick start
1
Create the plugin directory
2
Create the manifest
Create
my-plugin/.factory-plugin/plugin.json:3
Add a command
Create
my-plugin/commands/hello.md:4
Test your plugin
Install from local directory to test:Then run
/hello to test.Plugin manifest
The manifest file at.factory-plugin/plugin.json defines your plugin’s metadata:
Required fields
Optional fields
Adding skills
Skills are model-invoked capabilities. Create them in theskills/ directory:
Skill format
Skill frontmatter
Adding commands
Commands are user-invoked via slash syntax. Create them in thecommands/ directory:
Command format
commands/review-pr.md becomes /review-pr.
Command arguments
Use$ARGUMENTS to capture user input:
/greet Alice
Adding agents
Define specialized subagents in thedroids/ directory:
Agent format
Adding hooks
Define lifecycle hooks inhooks/hooks.json:
Hook configuration
Environment variables
Plugin hooks cannot be imported via
/hooks import. They only function within installed plugins where the plugin root path can be resolved.Adding MCP servers
Configure MCP servers inmcp.json at the plugin root:
Testing plugins
Local testing
Install from a local directory to test during development:Validation checklist
Before sharing your plugin:- Manifest has required fields (
name,description,version) - All skills have
nameanddescriptionin frontmatter - Commands work with and without arguments
- No hardcoded paths or machine-specific config
- README documents all commands and features
Distributing plugins
Creating a marketplace
A marketplace is a Git repository with a manifest listing available plugins:Marketplace manifest
Create.factory-plugin/marketplace.json:
Version management
Use semantic versioning in your plugin manifest for documentation purposes:- Major (1.0.0 → 2.0.0): Breaking changes
- Minor (1.0.0 → 1.1.0): New features, backward compatible
- Patch (1.0.0 → 1.0.1): Bug fixes
Droid tracks plugin versions by Git commit hash, not semantic version. When users update a plugin, they always get the latest commit from the marketplace. Version pinning is not currently supported.
Claude Code compatibility
Droid is fully compatible with Claude Code plugins. If you find a Claude Code plugin, you can install it directly and Droid will automatically translate the format.Best practices
Keep plugins focused
Keep plugins focused
Design plugins around a single purpose or workflow. Prefer several small plugins over one monolithic plugin that does everything.
Document thoroughly
Document thoroughly
Include a README with:
- What the plugin does
- Installation instructions
- All available commands and their usage
- Configuration options
- Examples
Use semantic versioning
Use semantic versioning
Follow semver conventions so users know when updates might break their workflows.
Test across environments
Test across environments
Ensure your plugin works on macOS, Linux, and Windows if applicable. Use portable shell commands and avoid platform-specific paths.
Handle errors gracefully
Handle errors gracefully
Scripts should fail gracefully without blocking the user. Log errors but don’t crash sessions.
Respect user privacy
Respect user privacy
Don’t collect telemetry or send data without explicit consent. Document any network requests your plugin makes.
Example: Complete plugin
Here’s a complete example of a code review plugin:.factory-plugin/plugin.json:
commands/review.md:
skills/review-patterns/SKILL.md:
droids/reviewer.md:
Next steps
Plugins overview
Learn about installing and managing plugins.
Skills
Deep dive into creating powerful skills.
Custom commands
Create user-invoked slash commands.
Custom Droids
Create specialized subagents for your plugins.
