From dapr-skills
Creates a Dapr workflow application from a workflow diagram image (PNG, JPG, GIF, WebP) or BPMN 2.0 XML file, generating code in Go, Python, C#, Java, or JavaScript.
How this skill is triggered — by the user, by Claude, or both
Slash command
/dapr-skills:create-workflow-from-diagramopusThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill converts a workflow diagram into a runnable Dapr workflow project. Two input paths are supported:
REFERENCE.mdexamples/order-process.bpmnexamples/order-process.ir.jsonlexamples/pizza-order.pngexamples/user-order.pngprompts/bpmn-to-ir.mdprompts/code-quality-judge.mdprompts/final-turn-prettifier.mdprompts/guardrails.mdprompts/ir-schema.mdprompts/languages/csharp.mdprompts/languages/go.mdprompts/languages/java.mdprompts/languages/javascript.mdprompts/languages/python.mdprompts/system-prompt.mdThis skill converts a workflow diagram into a runnable Dapr workflow project. Two input paths are supported:
.bpmn, .bpmn20.xml) — parses the XML deterministicallyBoth paths produce the same intermediate representation (IR, JSON Lines), which is then rendered into code for the target language.
You MUST follow these phases in strict order:
prompts/ir-schema.md.prompts/ir-schema.md acceptance rules.prompts/languages/<lang>.md.## Show final message. No extra text.You need three things. Ask at most three clarifying questions, interview-style, only for items not already provided:
.bpmn / .bpmn20.xml file. If the user pasted the image directly into the chat, use that.go, python, csharp, javascript, java. Default: python.<bpmn:process @id> or image filename.The following must be installed by the user before running the generated project:
Plus the language toolchain for the chosen target. See the matching shared/prereq-check-*.md for the full list.
The skill does not auto-install anything. The generated project's README tells the user what to install and run.
Decide the path:
.png, .jpg, .jpeg, .gif, .webp, or pasted image → image path.bpmn, .bpmn20.xml, or XML file containing http://www.omg.org/spec/BPMN/20100524/MODEL namespace → BPMN pathprompts/guardrails.md — these apply to all output.prompts/system-prompt.md — this is the persona + directives.prompts/ir-schema.md — this is the full IR grammar, step-by-step extraction procedure (Step 0 content check → Step N emit records), and field definitions.ambiguous_or_undiagrammable_workflow record (per schema Step 0) and stop.prompts/guardrails.md.prompts/bpmn-to-ir.md — deterministic BPMN-element → IR-record mapping.prompts/ir-schema.md for the IR grammar..bpmn XML. Emit IR as JSON Lines following the mapping table.bpmn-to-ir.md) → emit unrecognized_item records; do not silently drop.Write the IR to <ProjectRoot>/.workflow.ir.jsonl for reference.
Light structural checks before code generation:
start and one end record.edge.from / edge.to references an existing element id (activity, gateway, start, or end).If any check fails: report the specific issue to the user, abort (do not continue to Phase 3). Rerun Phase 1 with an adjusted diagram or ask the user for clarification.
prompts/languages/<lang>.md — this defines the target-language Dapr Workflow patterns, file layout, and code conventions. Language slugs: go | python | csharp | javascript | java.prompts/code-quality-judge.md for a self-critique pass after initial generation.prompts/final-turn-prettifier.md for final cleanup.prompts/languages/<lang>.md.TODO, no placeholder bodies.Use the conventions defined in prompts/languages/<lang>.md. Typical shape:
<ProjectRoot>/
├── .gitignore
├── dapr.yaml
├── resources/
│ └── statestore.yaml
├── <ProjectName>/
│ ├── workflow.(py|go|cs|ts|java)
│ ├── activities.(py|go|cs|ts|java)
│ └── models.(py|go|cs|ts|java)
├── README.md
└── .workflow.ir.jsonl # persisted IR from Phase 1
Python-specific layout matches create-workflow-python (pyproject.toml, runtime.py, main.py); see that skill's SKILL.md and REFERENCE.md if you want deeper structure parity. This skill focuses on the diagram → IR → code transform, not on language-specific project scaffolding — keep the generated code minimal and runnable.
Create a README.md in <ProjectRoot> containing:
workflow record).dapr run -f dapr.yaml.See shared/running-locally-dapr.md and shared/running-with-catalyst.md in this repo for snippets to include.
IMPORTANT: This is the LAST step. After Create README.md, your final output MUST be ONLY the message below — no preamble, no summary, no additional commentary. Replace <ProjectRoot> with the actual value:
The workflow application is created from the diagram. Open the README.md file in the folder for a summary and instructions for running locally. The extracted IR is stored at <ProjectRoot>/.workflow.ir.jsonl for reference.
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub diagrid-labs/dapr-skills --plugin dapr-skills