Converts Claude Code skill folders (SKILL.md + scripts/ + references/ + assets/) into Dify-importable workflow DSL (YAML files). Analyzes the entire skill directory structure to map scripts to code nodes, references to LLM prompts, and assets to templates. Also generates a React Artifact for visual preview before export. Triggers on phrases like "convert this skill to Dify", "visualize this skill as a workflow", "show this skill in Dify", or when a user pastes SKILL.md content and asks for understanding or visualization.
How this skill is triggered — by the user, by Claude, or both
Slash command
/skills-to-dify-workflow:skills-to-dify-workflowThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Converts a Claude Code skill (the entire folder) into a Dify-importable workflow YAML.
Converts a Claude Code skill (the entire folder) into a Dify-importable workflow YAML.
.yml file that can be directly loaded via Dify's "Import DSL File"Copy this checklist to track progress:
Conversion progress:
- [ ] Step 1: Receive the skill folder and read all files
- [ ] Step 1.5: Security review
- [ ] Step 2: Analyze the processing flow and determine the Dify mode (workflow / advanced-chat)
- [ ] Step 2.5: Confirm the user's Dify environment (model name and provider)
- [ ] Step 3: Assemble the Dify DSL YAML
- [ ] Step 4: Present the preview via Artifact and await review
- [ ] Step 5: If approved, write out the YAML file
Receive the skill's folder path (or skill name). If unclear, ask for confirmation.
Scan and read all files in the folder:
| Path | Role |
|---|---|
SKILL.md | Main processing flow definition. Becomes the skeleton of the entire workflow |
scripts/*.py, scripts/*.js, etc. | Execution scripts. Each maps to a code node |
references/*.md, etc. | Reference documents. Incorporated as context in llm node prompt_templates |
assets/* | Templates and config files. Used in code or template-transform nodes |
Understand the complete list of skill files before proceeding to Step 1.5.
Before converting, review the source skill for security risks. The generated YAML will be imported into Dify and may execute code or call external services.
Scripts (scripts/) — These are embedded directly into Dify code nodes and will execute in the Dify environment. Review for:
os.system, subprocess, eval, exec)References (references/) — These are embedded into LLM prompt_template fields. Review for:
Sensitive data — Review all files for:
Action required: Present a summary of findings to the user:
Do not silently proceed if risks are found. Do not skip this step.
Determine whether to use workflow or advanced-chat (Chatflow) based on the skill's nature:
| Criteria | workflow | advanced-chat (Chatflow) |
|---|---|---|
| User interaction | Not needed (single-shot: input → process → output) | Needed (questions, confirmations, iterative refinement) |
| Processing flow | Runs automatically to completion once input is provided | Pauses midway for user judgment/input |
| Output node | end (returns variables) | answer (streaming output at middle/end) |
| LLM memory | Not needed | References conversation history (sys.query) |
| Example | slack-gif-creator (explain → generate script) | skill-creator (interview → iterative refinement) |
Key determination factors:
The determination result is reflected in app.mode in Step 3. For Chatflow:
app.mode: advanced-chatanswer nodes for output (multiple can be placed, supports streaming)memory field to LLM nodes to enable conversation history referenceend nodesUse the SKILL.md processing steps as the main axis, mapping which files are used and how at each step.
scripts/ script calls → code nodes (embed the script content in the code field)references/ references → incorporated as context in llm node prompt_templatesassets/ templates → used in template-transform or code nodesFocus on the order, branching, and iteration between steps, not summaries.
Refer to the "Skill → Dify Node Mapping Table" in references/dify-node-types.md for which skill patterns map to which Dify node types. Target 6–15 nodes.
Before assembling the YAML, confirm the following with the user:
langgenius/anthropic/anthropic with claude-sonnet-4-5models/<provider>/ to get the list of available modelscompletion_params (especially response_format) vary by provider, so check the relevant plugin's models/llm/<model>.yaml for parameter_rulesThis information is applied to all LLM nodes in Step 3.
Read references/dify-node-types.md and build the YAML following the exact structure.
Required overall structure (use the mode determined in Step 2a):
app:
description: 'Skill overview'
icon: 🤖
icon_background: '#FFEAD5'
mode: workflow # workflow | advanced-chat (determined in Step 2a)
name: Skill Name
use_icon_as_answer_icon: false
dependencies: []
kind: app
version: 0.5.0
workflow:
conversation_variables: []
environment_variables: []
features: { ... }
graph:
edges: [ ... ]
nodes: [ ... ]
viewport: { x: 0, y: 0, zoom: 0.8 }
rag_pipeline_variables: []
Refer to references/dify-node-types.md for detailed node and edge structures.
'1730000000001')Post-assembly validation:
version: 0.5.0 and kind: app existapp.mode matches the Step 2a determination (workflow uses end, advanced-chat uses answer)start node existsworkflow mode: at least one end exists / advanced-chat mode: at least one answer existsllm prompt_template is not emptystart variable types are valid (text-input / paragraph / number / select; text is invalid)iteration error_handle_mode is valid (terminated / continue-on-error / remove-abnormal-output)llm completion_params are valid for the target provider (especially response_format)llm model.name matches the model name confirmed in Step 2.5http-request nodes pointing to unexpected external URLs not present in the source skillVisually render the assembled YAML's node and edge information as a React Artifact.
Embed the node and edge information as the following JSON within the Artifact:
{
"skill_summary": "One-sentence overview",
"nodes": [
{ "id": "n1", "type": "start", "label": "Short label", "description": "Description" }
],
"edges": [
{ "from": "n1", "to": "n2" },
{ "from": "n3", "to": "n4", "label": "Condition label" }
]
}
Display categories for the Artifact (grouping Dify types):
| Display type | Background | Border | Corresponding Dify type |
|---|---|---|---|
start | #F3F4F6 | #9CA3AF | start |
end | #F3F4F6 | #9CA3AF | end, answer |
llm | #EDE9FE | #7C3AED | llm |
tool | #DBEAFE | #2563EB | tool, code, http-request |
condition | #FEF3C7 | #D97706 | if-else, question-classifier |
loop | #FFEDD5 | #EA580C | iteration, loop |
template | #D1FAE5 | #059669 | template-transform, variable-aggregator, assigner |
Layout: BFS for depth determination. Row spacing 120px, column spacing 160px. Rounded rectangles (140×56px, start/end are 100×40px). SVG arrows for edges. Click a node to show its description panel.
After presenting the Artifact, ask "Does this flow look OK?" If changes are requested, update the YAML and re-preview.
Once the user approves, write the YAML as {skill-name}.yml.
Example output message:
"Converted [skill name] to a Dify workflow YAML. Import {filename} via Dify's Import DSL File. Node count: N, types used: ..."
npx claudepluginhub r-hashi01/skills-to-dify-workflow --plugin skills-to-dify-workflowGenerates Dify workflow DSL files (YAML/JSON) from natural language descriptions, with correct node schemas, edges, and layout for direct import.
Guides creation and debugging of Claude Code skills: anatomy, frontmatter, progressive disclosure, bundled resources, trigger tuning, and iteration.
Guides creation of effective Claude Code skills with principles on conciseness, degrees of freedom, anatomy, and bundling resources for workflows/tools.