From bpmn-plugin
Generate BPMN 2.0 compliant XML files from natural language process descriptions OR from structured markdown business process documents. Use this skill when a user wants to create a BPMN workflow, convert a business process to BPMN XML, model a workflow diagram, or generate process definitions. Triggers on requests like "create a BPMN", "generate workflow XML", "model this process", "convert to BPMN 2.0", "create process diagram", "build workflow", or "convert this markdown to BPMN".
How this skill is triggered — by the user, by Claude, or both
Slash command
/bpmn-plugin:bpmn-generatorThis 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 transforms process descriptions into fully compliant BPMN 2.0 XML files. It operates in two modes:
This skill transforms process descriptions into fully compliant BPMN 2.0 XML files. It operates in two modes:
| Mode | Trigger | Workflow |
|---|---|---|
| Interactive | Natural language description, no file provided | Structured Q&A to gather requirements |
| Document Parsing | Markdown file path provided | Parse document structure, extract elements |
The generated XML includes:
Determine the operating mode based on user input:
IF user provides a markdown file path (.md):
→ Document Parsing Mode
ELSE IF user provides a natural language description:
→ Interactive Mode
.mdBoth modes support an optional --preview flag:
When --preview is specified:
Preview: /bpmn-generator
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Process: Order Fulfillment
Source: Interactive mode
Structure Summary:
Pools: 1
Lanes: 3 (Sales, Operations, Shipping)
Tasks: 8 (5 user, 3 service)
Gateways: 2 (1 exclusive, 1 parallel)
Events: 2 (1 start, 1 end)
Validation: PASSED
Output file: order-fulfillment.bpmn
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Save this file? (y/n):
Use this mode when the user provides a natural language description without a structured document.
Initial process descriptions are rarely sufficient for optimal BPMN generation. This mode uses a structured clarification process to gather complete requirements before generating XML.
For EVERY clarifying question, use this EXACT format:
## Question [N]: [Topic Category]
[Clear, specific question about the process]
### Options:
**A) [Recommended]**: [Specific answer]
*Why*: [2-3 sentence reasoning explaining why this is the best choice]
**B)** [Alternative answer 1]
**C)** [Alternative answer 2]
**D)** Provide your own answer
**E)** Accept recommended answers for all remaining questions (auto-accept mode)
---
Your choice (A/B/C/D/E):
When the user selects option E:
AUTO_ACCEPT_MODE = true## Auto-Accepted Decisions Summary
| Question | Topic | Decision |
|----------|-------|----------|
| Q3 | Gateway Type | Exclusive Gateway (XOR) |
| Q4 | Error Handling | Boundary Error Event |
| ... | ... | ... |
Proceeding with XML generation using these decisions.
Process questions in this specific order:
Support these standard session commands during Interactive mode:
| Command | Aliases | Action |
|---|---|---|
help | ?, commands | Show available session commands |
status | progress | Show current phase and questions completed |
back | previous, prev | Return to previous question |
skip | next, pass | Skip current question (use recommended) |
quit | exit, stop | Exit without generating BPMN |
When user types help:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Session Commands
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
help Show this help message
status Show current phase and progress
back Return to previous question
skip Skip question (uses recommended answer)
quit Exit without generating BPMN
Press E at any question to accept recommended
answers for all remaining questions.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Implementation notes:
Skip questions that don't apply:
Use this mode when the user provides a markdown file containing a structured business process document.
Analyze the markdown document for structural elements that map to BPMN constructs. Key patterns: H1 = process name, H2/H3 "Phase/Step" = phase comments, numbered lists = tasks, role tables = lanes, conditional language = gateways, "begins when" = start events, "completes when" = end events. See ../references/markdown-parsing-guide.md for the complete document structure mapping table.
From the document, extract:
process_name: [from H1 or title]
process_id: [sanitized process_name, e.g., "SocialMediaCommunityManagement"]
description: [from executive summary or overview section]
version: [from document metadata if present]
roles: [list of all mentioned roles/actors]
phases: [ordered list of phase names from section headings]
Use the lane mapping configuration in ../templates/lane-mapping.yaml to assign colors. Read references/bpmn-elements.md for the complete role-to-lane color mapping table (Sales, Legal, Finance, IT, Implementation, Training, Customer Success, Support, Customer).
Match headings like "## Step 1:", "### Phase 2:", or "## 1.1 Section" using H2-H4 with step/phase/stage keywords or numbered sections. See ../references/markdown-parsing-guide.md for regex patterns.
Use the task type selection table in references/bpmn-elements.md to map markdown language to BPMN task types. Common shortcuts: "reviews/approves" = userTask, "system/API" = serviceTask, "sends/notifies" = sendTask, "waits for/receives" = receiveTask, "subprocess" = subProcess.
Critical: Every task MUST have a <bpmn:documentation> element. Extract from:
Combine multiple sources into comprehensive documentation:
<bpmn:userTask id="Activity_ReviewTriage" name="Review and Triage">
<bpmn:documentation>
Community Manager and Social Team Lead manually review inbound interactions
to assess and categorize them. Triage criteria includes: Topic/Intent,
Location Relevance, Urgency, Risk Level, and Sentiment. Categories include
location-specific issues, digital inquiries, brand questions, escalations,
spam, and general engagement.
</bpmn:documentation>
</bpmn:userTask>
Both modes use the same BPMN generation rules.
Read references/bpmn-elements.md (relative to this plugin's directory) for element type mappings and DI constants, including:
Always include phase comments to enable automatic phase detection for PowerPoint presentations:
<bpmn:process id="Process_Example" name="Example Process" isExecutable="true">
<!-- Phase 1: Intake and Validation -->
<bpmn:startEvent id="StartEvent_1" name="Request Received">
...
</bpmn:startEvent>
<!-- Phase 2: Processing -->
<bpmn:serviceTask id="Activity_Process" name="Process Request">
...
</bpmn:serviceTask>
<!-- Phase 3: Fulfillment -->
<bpmn:userTask id="Activity_Fulfill" name="Fulfill Request">
...
</bpmn:userTask>
</bpmn:process>
<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions
xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
xmlns:dc="http://www.omg.org/spec/DD/20100524/DC"
xmlns:di="http://www.omg.org/spec/DD/20100524/DI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
id="Definitions_[unique-id]"
targetNamespace="http://bpmn.io/schema/bpmn"
exporter="Claude BPMN Generator"
exporterVersion="2.0">
<!-- Process definition goes here -->
<!-- Diagram interchange goes here -->
</bpmn:definitions>
Read references/bpmn-elements.md for the complete ID pattern table (Process, StartEvent, EndEvent, Activity, Gateway, Lane, Flow patterns with examples).
<bpmn:sequenceFlow id="Flow_1" sourceRef="Gateway_1" targetRef="Task_2">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">
${condition == true}
</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:exclusiveGateway id="Gateway_1" default="Flow_default">
...
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="Flow_default" sourceRef="Gateway_1" targetRef="Task_3"/>
Read references/bpmn-elements.md for element dimension tables (width/height for events, tasks, gateways, subprocesses) and Draw.io-compatible layout constants (pool label width, lane offsets, element spacing).
Edges crossing lane boundaries MUST have parent="1" (root) with absolute mxPoint coordinates when targeting Draw.io conversion.
Before outputting XML, verify:
<bpmn:documentation> elementsDisplay a "Process Configuration Summary" with process name, ID, and a decisions table (# / Topic / Decision).
Show a brief narrative of the process flow with a flow summary line (Start -> Task -> Gateway -> End).
Write the complete XML to a file named [process-name].bpmn in the current directory.
Display source document, process name/ID, extracted structure counts (phases, roles/lanes, tasks by type, gateways, events), and any assumptions made during parsing.
Write complete XML to [process-name].bpmn
After generating XML, display validation results confirming: structural checks passed, flow validity passed, BPMN 2.0 compliance verified, diagram interchange complete, phase comments included, and the output filename.
| Process Complexity | Elements | Expected Duration | Notes |
|---|---|---|---|
| Simple (linear flow) | 5-10 | 1-3 minutes | Few gateways, single pool |
| Medium (branching) | 10-30 | 3-8 minutes | Multiple gateways, 2-4 lanes |
| Complex (collaboration) | 30-60 | 8-15 minutes | Multiple pools, message flows, subprocesses |
| Document parsing mode | varies | 2-5 minutes | Faster than interactive; no Q&A overhead |
Interactive mode duration is dominated by the Q&A clarification phases (user response time not included). XML generation and DI coordinate calculation add 10-30 seconds regardless of complexity. Document parsing mode is faster because it skips the interactive question framework and extracts structure directly from markdown.
For detailed specifications, see:
../references/bpmn-elements.md - Element type mappings, DI constants, ID patterns, and lane colors../references/bpmn-elements-reference.md - Complete element catalog../references/xml-namespaces.md - Namespace documentation../references/clarification-patterns.md - Question templates (Interactive mode)../references/markdown-parsing-guide.md - Document parsing patterns (Document mode)For templates, see:
../templates/bpmn-skeleton.xml - Base structure../templates/element-templates.xml - Element snippets../templates/lane-mapping.yaml - Role to lane color mappingFor examples, see:
../examples/ - Complete working examples for both modesnpx claudepluginhub davistroy/claude-marketplace --plugin bpmn-pluginCreates BPMN process diagrams using flowchart patterns, including activities, gateways, events, swimlanes, and decision points for workflow documentation.
Generates draw.io (.drawio) XML files for logical flow diagrams, abstract system architectures, BPMN processes, UML diagrams, DFDs, decision flowcharts, and system interactions.
Generates vertical process flowcharts as SVG and JPEG from user-described workflows, patterns, or activity history. Searches and analyzes instances to map steps.