A skill for converting natural-language requirements into import-ready Dify 1.x DSL. Generates chatflows, workflows, completion apps, and agents with full coverage of LLM, RAG, tools, notifications, and external integrations.
Use this skill when the user wants to do any of the following inside Dify:
Read the user's request. Identify:
Before writing DSL, fill these gaps. Ask in one batch of 1–4 questions, never one at a time:
Skip questions the user already answered. Pick reasonable defaults and tell the user what you assumed.
Browse templates/ and pick the closest match:
| Scenario | Template |
|---|---|
| --- | --- |
| Single-turn Q&A or simple chat | chatflow-basic.yml |
| Branching / conditional / parallel | workflow-branching.yml |
| Document Q&A with RAG | rag-qa.yml |
| Agent with tools and reasoning | agent-with-tools.yml |
| Multi-channel notification fan-out | notification-multi.yml |
| Multi-agent routing by intent | multi-agent-router.yml |
| SQL / data analysis | data-analysis.yml |
| Content generation pipeline | content-generator.yml |
If no template fits exactly, compose by copying blocks from 2+ templates. See references/dsl-schema.md for the underlying node grammar.
references/dsl-schema.md to confirm node data shapesreferences/variable-syntax.md for {{sys.}} / {{conversation.}} / {{env.*}} / {{node_id.var}} referencesreferences/node-types.md for the 17 node kinds and their required fieldsOutput a single YAML file with:
app (metadata: name, mode, description, icon, icon_background)kind: app-kind (chatflow / workflow / agent / completion)version: 0.1.5 (or latest known to Dify 1.x)workflow.graph.nodes — array of node objectsworkflow.graph.edges — array of source→target connectionsworkflow.environment_variables — env vars (API keys, endpoints)workflow.conversation_variables — chatflow-only persistenceUse proper variable references everywhere, e.g. {{#sys.query#}} for the user input, {{#conversation.history#}} for chat history, {{#node_llm.text#}} for an LLM node's output.
Run the validator to catch common mistakes:
python scripts/validate_dsl.py <your-dsl>.yml
The script checks:
data fields are present for each node typeiteration and loop only){{env.X}} (not hardcoded keys)Fix any errors before continuing.
python scripts/render_flow.py <your-dsl>.yml
Prints an ASCII / Mermaid diagram of node connectivity. Show the user so they can verify the flow before importing.
Always produce all three:
references/deployment.md template; include model Key setup, knowledge base upload, external-service credentialsIf the user wants to see examples, point them at examples/.
# <App Name> — Dify App
## 1. Overview
<one-paragraph description of what this app does>
## 2. Flow Diagram
<ASCII or Mermaid diagram>
## 3. DSL (YAML)
<full DSL file in a ```yaml code block>
## 4. Variable Map
| Variable | Type | Source | Consumed by |
|---|---|---|---|
## 5. Deployment Steps
1. Start Dify (Docker)
2. Import DSL
3. Configure environment variables
4. Upload knowledge base documents (if any)
5. Add custom tool credentials
6. Test run
## 6. Test Cases
- Input: <sample user input>
Expected output: <expected response>
- Input: ...
{{env.YOUR_KEY}}#…# wrapper for upstream-node outputs, e.g. {{#node_1.text#}}. Use bare {{var}} only for sys / env / conversation.model block referencing a provider the user has configured. If you don't know which model the user has, ask.if-else nodes with cases array; each case has case_id, logical_operator, conditionsagent_strategy_providers — pick ReAct or Function Calling based on the user's needsPointers to bundled files:
references/dsl-schema.md — Full Dify 1.x DSL schemareferences/node-types.md — 17 node types with examplesreferences/variable-syntax.md — Variable reference grammarreferences/llm-providers.md — Provider configsreferences/knowledge-rag.md — RAG / knowledge base setupreferences/external-services.md — SMS, email, IM, webhook configsreferences/agent-tools.md — Function calling, ReAct, custom toolsreferences/deployment.md — Docker, env vars, import flowtemplates/*.yml — 8 ready-to-use templatesscripts/validate_dsl.py — DSL validatorscripts/render_flow.py — ASCII flow rendererexamples/* — End-to-end working examplesversion field in app block — Dify refuses to importprovider field — must match a configured provider{{node_id.text}} instead of {{#node_id.text#}} for upstream-node output referencesconversation_variables reset in chatflows — state carries across turnspython3 / javascript (Dify 1.x); not just pythoneconomic / high_quality / custom)共 1 个版本