Quick start
Plugin manifest
The manifest file at.factory-plugin/plugin.json defines your plugin’s metadata:
Required fields
| Field | Description |
|---|---|
name | Unique identifier. Lowercase letters, digits, hyphens. |
description | Short description shown in plugin manager. |
version | Semantic version (e.g., 1.0.0). |
Optional fields
| Field | Description |
|---|---|
author | Object with name and optional email. |
homepage | URL for plugin documentation. |
repository | Git repository URL. |
license | License identifier (e.g., MIT, Apache-2.0). |
Adding skills
Skills are model-invoked capabilities. Create them in theskills/ directory:
Skill format
Skill frontmatter
| Field | Required | Description |
|---|---|---|
name | Yes | Unique identifier for the skill |
description | Yes | When to use this skill (helps model decide when to invoke) |
disable-model-invocation | No | Set true to make it user-only |
allowed-tools | No | Restrict which tools the skill can use |
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
| Variable | Description |
|---|---|
${DROID_PLUGIN_ROOT} | Absolute path to your plugin directory |
${CLAUDE_PLUGIN_ROOT} | Alias for ${DROID_PLUGIN_ROOT} (Claude Code compatibility) |
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:
| Field | Required | Description |
|---|---|---|
name | Yes | Marketplace identifier |
description | No | Shown when browsing marketplaces |
owner | No | Contact information |
plugins[].name | Yes | Plugin identifier |
plugins[].source | Yes | Relative path to plugin directory |
plugins[].description | No | Shown in plugin browser |
plugins[].category | No | For organizing plugins |
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:
