dify-dsl-generator▌
wwwzhouhui/skills_collection · updated Jun 3, 2026
MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.
专业的 Dify 工作流 DSL/YML 文件自动生成工具,基于对 86+ 实际工作流案例的深度学习,能够根据用户的业务需求自动生成符合 Dify 规范的完整工作流配置文件。
Dify DSL 工作流生成器
专业的 Dify 工作流 DSL/YML 文件自动生成工具,基于对 86+ 实际工作流案例的深度学习,能够根据用户的业务需求自动生成符合 Dify 规范的完整工作流配置文件。
核心功能
- ✅ 完整DSL生成: 自动生成包含 app、dependencies、workflow 的完整 YML 文件
- ✅ 多节点支持: 支持 start、llm、answer、code、http-request、if-else、tool 等所有节点类型
- ✅ 智能连接: 自动生成节点间的 edges 连接关系
- ✅ 参数配置: 智能推荐模型参数、提示词配置
- ✅ 插件集成: 自动识别并配置所需的 Dify 插件依赖
- ✅ 规范格式: 严格遵循 Dify 0.3.0 版本的 DSL 规范
使用方法
基础用法
生成一个 Dify 工作流用于 [业务需求描述]
详细用法
帮我生成一个 Dify 工作流 DSL 文件:
- 功能: [工作流要实现的功能]
- 输入: [用户输入的内容]
- 处理步骤: [详细的处理逻辑]
- 输出: [期望的输出结果]
- 使用插件: [需要的插件,可选]
Dify DSL 文件结构
基于对 86+ 真实工作流案例的学习,Dify DSL YML 文件遵循以下结构:
1. App 配置
app:
description: '工作流描述'
icon: 🤖
icon_background: '#FFEAD5'
mode: advanced-chat # 或 workflow, agent-chat
name: 工作流名称
use_icon_as_answer_icon: false
模式说明:
advanced-chat: 高级对话模式(chatflow)workflow: 工作流模式agent-chat: AI Agent 模式
2. Dependencies 依赖
dependencies:
- current_identifier: null
type: marketplace
value:
marketplace_plugin_unique_identifier: 插件唯一标识符
常用插件:
langgenius/openai_api_compatible: OpenAI 兼容接口bowenliang123/md_exporter: Markdown 导出器- 其他市场插件根据需求添加
3. Workflow 工作流
kind: app
version: 0.3.0
workflow:
conversation_variables: []
environment_variables: []
features:
file_upload:
enabled: false
speech_to_text:
enabled: false
text_to_speech:
enabled: false
graph:
edges: []
nodes: []
节点类型详解
Start 开始节点
- data:
desc: ''
title: 开始
type: start
variables:
- label: 用户输入
max_length: 1000
options: []
required: true
type: paragraph # 或 text-input, select, file
variable: query
id: 'start'
position:
x: 100
y: 300
type: custom
width: 244
height: 90
变量类型:
paragraph: 段落文本(多行)text-input: 单行文本select: 下拉选择file: 文件上传number: 数字
LLM 大语言模型节点
- data:
context:
enabled: false
variable_selector: []
model:
completion_params:
temperature: 0.7
max_tokens: 2000
mode: chat
name: gpt-4
provider: openai
prompt_template:
- id: 唯一ID
role: system
text: 系统提示词
- id: 唯一ID
role: user
text: 用户提示词 {{#变量引用#}}
title: LLM节点
type: llm
vision:
enabled: false
id: '节点ID'
position:
x: 400
y: 300
type: custom
常用模型provider:
openai: OpenAIlanggenius/openai_api_compatible/openai_api_compatible: 兼容接口anthropic: Claudealibaba: 通义千问
变量引用格式:
{{#节点ID.输出变量#}}: 引用其他节点的输出{{#sys.query#}}: 引用系统变量(用户输入){{#节点ID.text#}}: 引用LLM输出文本
Code 代码执行节点
- data:
code: |
import json
def main(arg1: str, arg2: str) -> dict:
# 处理逻辑
result = process(arg1, arg2)
return {
"result": result,
"status": "success"
}
code_language: python3
outputs:
result:
type: string
status:
type: string
title: 代码执行
type: code
variables:
- value_selector:
- '前置节点ID'
- 输出变量
variable: arg1
id: '节点ID'
position:
x: 700
y: 300
type: custom
代码语言:
python3: Python 3javascript: JavaScript (部分版本支持)
输出类型:
string: 字符串number: 数字object: 对象array[string]: 字符串数组array[number]: 数字数组array[object]: 对象数组
HTTP Request 节点
- data:
authorization:
config: null
type: no-auth
body:
data: '{"key": "{{#变量#}}"}'
type: json
headers: ''
method: post
timeout:
max_connect_timeout: 0
max_read_timeout: 0
max_write_timeout: 0
title: HTTP请求
type: http-request
url: https://api.example.com/endpoint
id: '节点ID'
position:
x: 1000
y: 300
type: custom
HTTP方法:
get: GET 请求post: POST 请求put: PUT 请求patch: PATCH 请求delete: DELETE 请求
认证类型:
no-auth: 无认证api-key: API Keybearer: Bearer Token
If-Else 条件判断节点
- data:
cases:
- case_id: case1
conditions:
- comparison_operator: contains
id: 条件ID
value: 期望值
variable_selector:
- '节点ID'
- 变量名
id: case1
logical_operator: and
logical_operator: or
title: 条件判断
type: if-else
id: '节点ID'
how to use dify-dsl-generatorHow to use dify-dsl-generator on Cursor
AI-first code editor with Composer
1Prerequisites
Before installing skills in Cursor, ensure your development environment meets these requirements:
- ›Cursor installed and configured on your development machine
- ›Node.js version 16.0+ with npm package manager (verify with
node --version) - ›Active project directory or workspace where you want to add dify-dsl-generator
2Execute installation command
Execute the skills CLI command in your project's root directory to begin installation:
$npx skills add https://github.com/wwwzhouhui/skills_collection --skill dify-dsl-generatorThe skills CLI fetches dify-dsl-generator from GitHub repository wwwzhouhui/skills_collection and configures it for Cursor.
3Select Cursor when prompted
The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:
◆ Which agents do you want to install to?││ ── Universal (.agents/skills) ── always included ────│ • Amp│ • Antigravity│ • Cline│ • Codex│ ●Cursor(selected)│ • Cursor│ • Windsurf4Verify installation
Confirm successful installation by checking the skill directory location:
.cursor/skills/dify-dsl-generatorReload or restart Cursor to activate dify-dsl-generator. Access the skill through slash commands (e.g., /dify-dsl-generator) or your agent's skill management interface.
⚠Security & Verification Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.
Additional Resources
List & Monetize Your Skill
Submit your Claude Code skill and start earning
GET_STARTED →Use Cases▌
User Story & Requirements Generation
Create detailed user stories, acceptance criteria, and feature specs
Example
Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios
✓Reduce spec writing time by 50%, ensure comprehensive coverage
Competitive Analysis
Research competitors, compare features, identify gaps
Example
Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities
✓Complete competitive research in 2 hours instead of 2 days
Roadmap Prioritization
Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs
Example
Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale
✓Make data-driven prioritization decisions faster
Stakeholder Communication
Draft PRDs, status updates, and stakeholder presentations
Example
Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement
✓Save 3-5 hours/week on communication overhead
Implementation Guide▌
Prerequisites
- ›Claude Desktop or compatible AI client
- ›Access to product documentation and roadmap tools (Jira, Notion, etc.)
- ›Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
- ›Stakeholder contact information and communication channels
Time Estimate
30-60 minutes to see productivity improvements
Installation Steps
- 1.Install product management skill
- 2.Start with user story generation for known feature
- 3.Progress to competitive analysis: research 2-3 competitors
- 4.Use for roadmap prioritization: apply RICE/ICE scoring
- 5.Draft stakeholder communications and refine based on feedback
- 6.Build template library for recurring PM tasks
- 7.Share effective prompts with product team
Common Pitfalls
- ⚠Not validating competitive research—verify facts before sharing
- ⚠Accepting user stories without involving engineering team
- ⚠Over-relying on frameworks without qualitative judgment
- ⚠Not customizing outputs to company culture and communication style
- ⚠Skipping stakeholder validation of generated requirements
Best Practices▌
✓ Do
- +Validate research and competitive analysis with real data
- +Collaborate with engineering when generating technical requirements
- +Customize frameworks and templates to your company context
- +Use skill for first drafts, refine with stakeholder input
- +Document successful prompt patterns for PM tasks
- +Combine AI efficiency with human judgment and intuition
✗ Don't
- −Don't publish competitive analysis without fact-checking
- −Don't finalize user stories without engineering review
- −Don't make prioritization decisions solely on AI scoring
- −Don't skip customer validation of generated requirements
- −Don't ignore company-specific context and culture
💡 Pro Tips
- ★Provide context: company goals, constraints, customer feedback
- ★Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
- ★Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
- ★Use skill for 70% generation + 30% customization to company needs
When to Use This▌
✓ Use When
Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.
✗ Avoid When
Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.
Learning Path▌
- 1Basic: user stories, feature specs, status updates
- 2Intermediate: competitive analysis, prioritization frameworks, PRDs
- 3Advanced: product strategy, go-to-market planning, OKR setting
- 4Expert: product vision, market positioning, business model innovation
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
general reviewsRatings
4.6★★★★★73 reviews- ★★★★★Soo Wang· Dec 28, 2024
dify-dsl-generator is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- ★★★★★Ama Liu· Dec 28, 2024
I recommend dify-dsl-generator for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- ★★★★★Emma Kim· Dec 24, 2024
Keeps context tight: dify-dsl-generator is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Emma Brown· Dec 24, 2024
dify-dsl-generator reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Arya Khanna· Dec 16, 2024
We added dify-dsl-generator from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- ★★★★★Ganesh Mohane· Dec 8, 2024
dify-dsl-generator is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- ★★★★★Omar Ghosh· Dec 4, 2024
Solid pick for teams standardizing on skills: dify-dsl-generator is focused, and the summary matches what you get after install.
- ★★★★★Arjun Menon· Nov 23, 2024
dify-dsl-generator has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Arya Chawla· Nov 19, 2024
Keeps context tight: dify-dsl-generator is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Arjun Patel· Nov 15, 2024
I recommend dify-dsl-generator for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
showing 1-10 of 73
1 / 8