with one click
plugin-name
Dify 工作流和插件开发的完整技能体系 - 模块化、渐进式、实用导向
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Dify 工作流和插件开发的完整技能体系 - 模块化、渐进式、实用导向
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
| skill_name | dify-master |
| version | 1.0.0 |
| author | Dify SKILL Team |
| description | Dify 工作流和插件开发的完整技能体系 - 模块化、渐进式、实用导向 |
| category | development |
| tags | ["dify","workflow","plugin","ai","llm","rag","agent"] |
| dependencies | [] |
| last_updated | "2026-03-05T00:00:00.000Z" |
| triggers | ["dify","工作流","workflow","插件","plugin","性能","performance","安全","security","集成","integration","api","mcp","参考","reference","dsl","sdk","cli"] |
| on_demand | {"conditions":[{"when":"用户提到具体节点类型(如 LLM、Agent、HTTP Request)","load":"01-workflow/SKILL.md"},{"when":"用户提到插件开发、工具、Provider","load":"02-plugin/SKILL.md"},{"when":"用户提到性能优化、缓存、并行","load":"03-performance/SKILL.md"},{"when":"用户提到安全、部署、Docker","load":"04-security/SKILL.md"},{"when":"用户提到 API、Webhook、MCP、数据库集成","load":"05-integration/SKILL.md"},{"when":"用户查找语法参考、API 文档、SDK","load":"06-reference/SKILL.md"}]} |
一个模块化、渐进式披露的 Dify 开发技能体系
Dify 是一个开源的 LLMOps 平台,提供可视化的工作流编排和强大的插件系统,帮助开发者快速构建和部署 AI 应用。
Dify Master SKILL 采用模块化设计,包含 6 个核心子 SKILL,覆盖从开发到部署的完整流程。
dify-master (总入口)
├── 01-workflow # 工作流设计
├── 02-plugin # 插件开发
├── 03-performance # 性能优化
├── 04-security # 安全和部署
├── 05-integration # 集成和扩展
└── 06-reference # 参考资料
# 简单问答工作流
workflow:
graph:
nodes:
- data:
type: start
variables: []
id: start
- data:
type: llm
model:
provider: openai
name: gpt-4
prompt_template:
- role: system
text: "你是一个助手"
- role: user
text: "{{#sys.query#}}"
id: llm
- data:
type: answer
answer: "{{#llm.text#}}"
id: answer
edges:
- source: start
target: llm
- source: llm
target: answer
下一步: 学习 01-workflow SKILL 了解更多节点类型和设计模式
# 简单工具插件
from typing import Any, Generator
from dify_plugin.entities.tool import ToolInvokeMessage
from dify_plugin import Tool
class MyTool(Tool):
def _invoke(
self,
tool_parameters: dict[str, Any]
) -> Generator[ToolInvokeMessage, None, None]:
# 获取参数
input_text = tool_parameters.get("text", "")
# 处理逻辑
result = input_text.upper()
# 返回结果
yield self.create_text_message(result)
下一步: 学习 02-plugin SKILL 了解完整的插件开发流程
# 使用并行分支提升性能
- data:
type: parallel
branches:
- nodes: [tool1, process1]
- nodes: [tool2, process2]
- nodes: [tool3, process3]
id: parallel_execution
下一步: 学习 03-performance SKILL 了解更多优化技术
适用场景: 设计和开发 Dify 工作流
触发关键词: 节点, LLM, Agent, 工作流, 变量, 知识检索, HTTP Request, Code, If-Else, Iteration, 模板, DSL, YAML
核心内容:
快速访问: 01-workflow/SKILL.md
推荐给: 工作流设计者、AI 应用开发者、产品经理
适用场景: 开发自定义工具、模型、数据源插件
触发关键词: 插件, plugin, Tool, Provider, 开发, manifest, OAuth, 数据源, 模型, 扩展
核心内容:
快速访问: 02-plugin/SKILL.md
推荐给: 插件开发者、后端工程师、工具集成者
适用场景: 优化工作流和插件的执行性能
触发关键词: 性能, performance, 优化, 缓存, 并行, 延迟, 吞吐量, 监控, benchmark
核心内容:
快速访问: 03-performance/SKILL.md
推荐给: 性能工程师、架构师、运维人员
适用场景: 生产环境部署和安全加固
触发关键词: 安全, security, 部署, deploy, Docker, Kubernetes, SSL, 认证, 授权, 沙箱, SSRF
核心内容:
快速访问: 04-security/SKILL.md
推荐给: DevOps 工程师、安全工程师、系统管理员
适用场景: 与外部系统和服务集成
触发关键词: 集成, integration, API, Webhook, MCP, Server, Client, 数据库, Redis, 消息队列, RabbitMQ, Kafka, S3
核心内容:
快速访问: 05-integration/SKILL.md
推荐给: 集成工程师、全栈开发者、架构师
适用场景: 查找语法、API、CLI 等参考信息
触发关键词: 参考, reference, API, SDK, CLI, DSL, YAML, 命令, 文档, 语法
核心内容:
快速访问: 06-reference/SKILL.md
推荐给: 所有 Dify 开发者
# 系统变量
{{#sys.query#}} # 用户查询
{{#sys.files#}} # 上传的文件
{{#sys.conversation_id#}} # 会话 ID
# 节点输出
{{#节点ID.输出字段#}} # 引用节点输出
{{#llm.text#}} # LLM 文本输出
{{#knowledge.result#}} # 知识检索结果
# 会话变量
{{#conversation.变量名#}} # 会话级变量
# 迭代变量
{{#item#}} # 当前迭代项
{{#index#}} # 当前索引
# LLM 节点
- data:
type: llm
model:
provider: openai
name: gpt-4
completion_params:
temperature: 0.7
max_tokens: 2000
prompt_template:
- role: system
text: "系统提示"
- role: user
text: "{{#sys.query#}}"
context:
enabled: true
variable_selector: ["knowledge", "result"]
# Agent 节点
- data:
type: agent
agent_parameters:
instruction:
value: "根据用户需求调用工具"
model:
value:
provider: openai
model: gpt-4
query:
value: "{{#sys.query#}}"
tools:
value:
- enabled: true
provider_name: time
tool_name: current_time
type: builtin
agent_strategy_name: function_calling
# 知识检索节点
- data:
type: knowledge-retrieval
dataset_ids: ["dataset-id"]
query_variable_selector: ["start", "sys.query"]
retrieval_mode: single
single_retrieval_config:
model:
provider: openai
name: text-embedding-3-small
top_k: 3
score_threshold: 0.7
# manifest.yaml
version: 0.0.1
type: plugin
author: your-name
name: plugin-name
label:
en_US: Plugin Name
zh_Hans: 插件名称
description:
en_US: Plugin description
zh_Hans: 插件描述
icon: icon.svg
resource:
memory: 268435456 # 256MB
plugins:
tools:
- provider/provider.yaml
meta:
version: 0.0.1
arch: [amd64, arm64]
runner:
language: python
version: "3.12"
entrypoint: main
tags:
- utilities
# 插件开发
dify plugin init # 初始化插件项目
dify plugin run # 本地调试插件
dify plugin package # 打包插件
dify plugin publish # 发布插件
# 工作流管理
dify workflow export <id> # 导出工作流
dify workflow import <file> # 导入工作流
dify workflow validate <file> # 验证工作流
# 环境管理
dify env list # 列出环境变量
dify env set <key> <value> # 设置环境变量
dify env get <key> # 获取环境变量
本 SKILL 基于 MIT 许可证开源,欢迎使用、修改和分发。
开始你的 Dify 开发之旅吧!选择一个子 SKILL 深入学习,或直接使用模板快速开始。