Dify Workflow logo

Dify Workflow

Community
jspi-fu
dify-workflow

设计、生成并部署 Dify 应用 DSL (workflow/advanced-chat)。当用户要求构建 Dify 工作流、生成/更新 DSL 文件或通过 Admin API 部署到 Dify 实例时使用。

Overview

Publisherjspi-fu
RepositoryAeson-skills
Skill namedify-workflow
Stars
45
Forks
2
Bundled files
26
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 26 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by jspi-fu on GitHub. Read the source before you install it.

Installation

Install the Dify Workflow AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/jspi-fu/Aeson-skills/tree/master/Skills/dify-workflow
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/jspi-fu/Aeson-skills.git /tmp/Aeson-skills
mkdir -p .claude/skills
cp -r /tmp/Aeson-skills/Skills/dify-workflow .claude/skills/dify-workflow
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Dify Workflow in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Dify Workflow on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Dify Workflow is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Dify Workflow DSL 生成器

交互原则与凭证隔离

  • 需求澄清:若用户描述不足以确定节点或输入/输出流程,优先澄清输入输出变量与核心节点,确认后开始生成。
  • 凭证隔离:严格隔离敏感凭证。最终回复与导出产物中仅包含 App ID、DSL 文件路径、节点统计与部署状态,禁止泄露 ADMIN_API_KEY。
  • 关联 Skill 约定:涉及 Console Admin API 操作时,先读取并遵守 dify-deploy。

版本锚定 (Version Anchoring)

每次生成前按顺序执行:

  1. 读取 references/config.yml,获取 dsl_version 与 reference_dsl。
  2. 若 reference_dsl 非空,读取 references/user-reference/<文件名> 作为基准 schema。
  3. 读取 references/version-deltas.md 查找版本差异。
  4. 约束:输出 YAML 的 version 必须匹配 dsl_version,且仅使用目标版本支持的节点与字段。

节点路由表

节点类型标识用途关键参数Schema 路径
Startstart入口节点;定义输入变量variablesreferences/nodes/start.md
EndendWorkflow 模式终端;声明输出outputsreferences/nodes/end.md
AnsweranswerChatflow 模式流式输出answer, variablesreferences/nodes/answer.md
LLMllm调用大语言模型model, prompt_template, context, visionreferences/nodes/llm.md
Knowledge Retrievalknowledge-retrieval知识库文档检索query_variable_selector, dataset_ids, retrieval_modereferences/nodes/knowledge-retrieval.md
Codecode执行 Python3/JS/JSONcode_language, code, variables, outputsreferences/nodes/code.md
HTTP Requesthttp-requestHTTP API 调用method, url, headers, body, authorizationreferences/nodes/http-request.md
If/Elseif-else条件分支 (IF/ELIF/ELSE)casesreferences/nodes/if-else.md
Variable Aggregatorvariable-aggregator合并多分支变量output_type, variablesreferences/nodes/variable-aggregator.md
Iterationiteration数组循环遍历iterator_selector, iterator_input_type, output_selectorreferences/nodes/iteration.md
Document Extractordocument-extractor文件文本提取 (PDF/DOCX)variable_selector, is_array_filereferences/nodes/document-extractor.md
Template Transformtemplate-transformJinja2 模板渲染template, variablesreferences/nodes/template-transform.md
Question Classifierquestion-classifierLLM 意图分类query_variable_selector, model, classesreferences/nodes/question-classifier.md
Parameter Extractorparameter-extractorLLM 结构化参数提取query, model, parameters, reasoning_modereferences/nodes/parameter-extractor.md
Tooltool调用外部工具provider_id, provider_type, tool_name, tool_parametersreferences/nodes/tool.md

任务执行路径与校验关卡

执行路径

  1. 解析与模式确定:批处理用 workflow 模式(Start -> End);对话交互用 advanced-chat 模式(Start -> Answer)。
  2. 节点选择与模板匹配:优先匹配 ## 模板匹配 中的预设模板;无匹配时依据路由表 schema 逐个组装。
  3. 构图与边连接:
    • 节点 ID 格式:13 位时间戳字符串(如 "1711536487001")。
    • 坐标规划:起始点 {x: 80, y: 282},X 轴增量 +300px,分支 Y 轴增量 +200px。
    • 边 ID 格式:{sourceId}-{sourceHandle}-{targetId}-{targetHandle},targetHandle 统一为 "target"。分支 sourceHandle 分别为 "true"/case_id/"false" 或类别 ID。
  4. 部署与更新(如适用):覆盖更新前先导出原 DSL 保存为备份文件。API 异常卡住时报告排查建议,未获明确授权禁止直连数据库。

校验关卡 (Validation Gate)

交付产物前必须完成以下 4 项校验:

  • 语法与命名:默认输出为当前目录的 <kebab-case-name>.dify.yml(按需输出 .dify.json)。所有字符串节点 ID 显式加引号。
  • 拓扑完整性:所有 Edge 的 source 和 target ID 在 Graph Nodes 中真实存在,边 type 为 "custom"。
  • 变量引用合法性:节点变量引用为 {{#nodeId.variableName#}},系统变量为 sys 前缀(workflow 模式严禁引用 sys.query)。
  • Provider 正确性:model.provider 遵循 "langgenius/<provider>/<provider>" 格式,且使用真实模型标识(如 gpt-4o-mini、deepseek-chat)。

DSL 结构快速参考

yaml
version: "<dsl_version from config.yml>"
kind: app
app:
  name: "工作流名称"
  mode: "advanced-chat"           # 或 "workflow"
  description: "..."
  icon: "\U0001F916"
  icon_background: "#FFEAD5"
  icon_type: emoji
  use_icon_as_answer_icon: false
dependencies: []
workflow:
  environment_variables: []
  conversation_variables: []
  features:
    file_upload:
      enabled: false
    opening_statement: ""         # 仅 chatflow
    retriever_resource:
      enabled: false
    sensitive_word_avoidance:
      enabled: false
    speech_to_text:
      enabled: false
    suggested_questions: []       # 仅 chatflow
    suggested_questions_after_answer:
      enabled: false
    text_to_speech:
      enabled: false
  graph:
    nodes: []                     # 节点对象数组
    edges: []                     # 边对象数组
    viewport:
      x: 0
      y: 0
      zoom: 0.7

完整字段级规范参照 references/dsl-format.md。

常见 Schema 陷阱

  1. 变量形状差异:
    • code / llm / template-transform / parameter-extractor:[{ variable: "arg", value_selector: ["node_id", "field"], value_type: "string" }]
    • variable-aggregator:裸嵌套列表 [["node1_id", "output"], ["node2_id", "output"]]
    • document-extractor:扁平列表 variable_selector: ["upstream_id", "field"]
  2. Memory 作用域:memory 块仅存在于 advanced-chat 模式的 LLM 节点,workflow 模式及迭代内部节点必须省略。
  3. 迭代节点约束:内层节点须包含 parentId: <iteration_id>、data.isInIteration: true、zIndex: 1002,坐标为相对坐标(初始约 {x: 24, y: 68})。iterator_input_type 必须与真实元素匹配(如 "array[file]")。
  4. 特定节点输出形状:End 节点 outputs 为列表;Code 节点 outputs 为字典。
  5. Edge Data 字段:包含 sourceType、targetType、isInIteration、isInLoop。迭代内边补充 iteration_id 与 zIndex: 1002。

模板与参考示例

与已知模式高度匹配时优先使用预设模板,按需调整字段:

模板路径匹配条件
Chatbotreferences/templates/chatbot.yml简单对话:Start -> LLM -> Answer
RAGreferences/templates/rag.yml知识库问答:Start -> Knowledge Retrieval -> LLM -> Answer
Agentreferences/templates/agent.yml带分类/参数提取的工具 Agent
Translationreferences/templates/translation.yml文本转换/翻译

完整示例文件指针 (Progressive Disclosure)

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Dify Workflow AI skill do?

设计、生成并部署 Dify 应用 DSL (workflow/advanced-chat)。当用户要求构建 Dify 工作流、生成/更新 DSL 文件或通过 Admin API 部署到 Dify 实例时使用。

Why use Dify Workflow on TypingMind?

Because you install it once and use it with any model. Dify Workflow is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Dify Workflow in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/jspi-fu/Aeson-skills/tree/master/Skills/dify-workflow. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Dify Workflow?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Dify Workflow?

As many as you like. As long as a model supports skills, you can use Dify Workflow with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Dify Workflow AI skill free?

Yes. It is published on GitHub by jspi-fu under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇