Plugin Types Overview
- •
Tool - Add capabilities: API calls, logic operations, file processing
- •Usage: Add capability to workflow/agent
- •Reference: tool-plugin.md
- •Example:
tools/wikipedia,tools/github
- •
Trigger - Start workflows from webhooks
- •Usage: Start workflow when webhook received
- •Reference: trigger-plugin.md
- •Example:
triggers/github_trigger
- •
Extension - Custom HTTP endpoints
- •Usage: Expose HTTP endpoint (OAuth, webhook)
- •Reference: extension-plugin.md
- •Example:
extensions/slack_bot
- •
Model - Add AI model providers
- •Usage: Add AI model to workflow/agent
- •Reference: model-plugin.md
- •Example:
models/openai,models/anthropic
- •
Datasource - Connect external storage
- •Usage: Import docs from cloud storage
- •Reference: datasource-plugin.md
- •Example:
datasources/github
- •
Agent Strategy - Custom agent reasoning
- •Usage: Customize agent reasoning
- •Reference: agent-strategy-plugin.md
- •Example:
agent-strategies/cot_agent
Development SOP
Phase 1: Understand Requirements
If there's not a proper plan for implementing the plugin and the plugin is not implemented yet, you should follow plan-for-plugin.md to prepare a plan before starting.
Phase 2: Initialize Project
If the development environment is not set up yet or the project is not initialized yet, you should refer to init-development-environement.md
Phase 3: Implement
If the plugin is not fully implemented yet, you should refer to implement-plugin.md
Phase 4: Test & Debug
For testing plugin locally, refer to testing.md For debugging plugin remotely, refer to remote-debug-plugin.md
Phase 5: Package & Deploy
# Package the plugin dify plugin package <path/to/plugin> # Install to Dify instance (uses .credential from get_debug_key.py) uv run python scripts/install_plugin.py dist/*.difypkg
The install_plugin.py script uploads and installs plugins via Dify API. It reuses the .credential file created by get_debug_key.py.
When the plugin is ready, you may ask user to try it.
Phase 6: Iterate & Release
Dev Branch (Testing):
- •Update version in
manifest.yamlwith dev suffix (e.g.,0.1.0-dev.1) - •Package plugin:
dify plugin package <path/to/plugin> - •Create GitHub pre-release with
.difypkgfile
Main Branch (Production):
- •Update version in
manifest.yamlwith release number (e.g.,0.1.0) - •Package plugin:
dify plugin package <path/to/plugin> - •Create GitHub release with
.difypkgfile
Troubleshooting
Please refer to common-issues-and-check.md for a detailed troubleshooting guide.
Plugin Structure Overview (tool Plugin for Example)
my-plugin/
├── manifest.yaml # Plugin metadata
├── main.py # Plugin Entry
├── pyproject.toml # Dependencies
├── provider/
│ ├── provider.yaml # Credentials + config
│ └── provider.py # Validation logic
├── tools/ # Tool plugins
│ ├── tool.yaml
│ └── tool.py
└── _assets/
└── icon.svg
References
Run tree on the root of the skill to see the structure.