/genesys-cloud-architect:architect-drawiofrom genesys-cloud-architect
Generates native draw.io XML diagrams that match the Genesys Cloud Architect editor's canvas, with movable action boxes, branch pills, dashed empty slots, and End of Flow footers. Use when a user wants an editable Architect-style diagram as a .drawio file.
Ships in genesys-cloud-architect. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Produce a native draw.io diagram where every action box, branch pill and empty slot is its own movable shape, drawn to match the Architect editor's canvas. The output is a .drawio file (plain mxGraphModel XML) and a link that opens it in app.diagrams.net.
flow_ir (chains, outputs, loops). When exact editor positions matter, run flow_diagram first: its result's boxes lists every action's badge, x, y, width, height, usable verbatim as draw.io geometry (same units, same 24 px margin). Pills, slots and bus lines still need placing with the rules below.y. Write every edge before any vertex in the file: draw.io paints cells in file order, so this keeps connectors underneath boxes and highlight tags, as in the editor.<name>.drawio in the scratchpad (or where the user asks).<, & or " inside a label is the usual cause of a blank canvas, and this catches it before the user sees it. Otherwise it saves the link beside the file as <name>.drawio.url.txt and opens it in the default browser. On Windows it opens the link through a .url shortcut, because cmd would cut the link at & and #. Add --no-open after the file name to skip opening, for example on a machine with no browser. Then tell the user where the .drawio file is. The link is a view, not storage: draw.io shows it as "Untitled Diagram" until they save it, so the file is the persistent copy. The draw.io desktop app, if installed, can also export PNG/SVG (see the drawio skill); it is not needed for the link.node -e '
const fs=require("fs"),os=require("os"),path=require("path"),zlib=require("zlib"),{spawn}=require("child_process");
const file=process.argv[1], noOpen=process.argv[2]==="--no-open";
const xml=fs.readFileSync(file,"utf8").replace(/^\uFEFF/,"");
const fail=(i,msg)=>{console.error(`${file}:${xml.slice(0,i).split("\n").length}: ${msg}`);process.exit(1);};
const badAmp=/&(?!(?:amp|lt|gt|quot|apos|#\d+|#x[0-9a-fA-F]+);)/;
const tag=/<(\/?)([A-Za-z_][\w:.-]*)((?:\s+[\w:.-]+\s*=\s*(?:"[^"]*"|\x27[^\x27]*\x27))*)\s*(\/?)>/y;
const stack=[];let i=xml.startsWith("<?xml")?xml.indexOf("?>")+2:0;
while(i<xml.length){
const lt=xml.indexOf("<",i), text=xml.slice(i,lt<0?xml.length:lt);
if(text.trim()) fail(i,"text outside any tag: "+JSON.stringify(text.trim().slice(0,40)));
if(lt<0) break;
if(xml.startsWith("<!--",lt)) fail(lt,"XML comments are not allowed in a .drawio file");
tag.lastIndex=lt;const m=tag.exec(xml);
if(!m) fail(lt,"malformed tag, usually an unescaped < or a stray quote inside a label: "+JSON.stringify(xml.slice(lt,lt+60)));
for(const v of m[3].matchAll(/=\s*(?:"([^"]*)"|\x27([^\x27]*)\x27)/g)){const val=v[1]??v[2];
if(val.includes("<")) fail(lt,"unescaped < in an attribute; write <");
if(badAmp.test(val)) fail(lt,"unescaped & in an attribute; write &");}
if(m[1]){const open=stack.pop();if(open!==m[2]) fail(lt,`</${m[2]}> closes <${open}>`);}
else if(!m[4]) stack.push(m[2]);
i=tag.lastIndex;}
if(stack.length) fail(xml.length,`unclosed <${stack.pop()}>`);
if(!/^\s*(<\?xml[^>]*\?>\s*)?<(mxGraphModel|mxfile)\b/.test(xml)) fail(0,"root element must be mxGraphModel or mxfile");
const url="https://app.diagrams.net/?grid=0&pv=0&border=10&edit=_blank#R"+encodeURIComponent(zlib.deflateRawSync(encodeURIComponent(xml)).toString("base64"));
fs.writeFileSync(file+".url.txt",url);
console.log("OK, link saved to "+file+".url.txt");
if(noOpen) process.exit(0);
if(process.platform==="win32"){const p=path.join(os.tmpdir(),"drawio-"+Date.now()+".url");fs.writeFileSync(p,"[InternetShortcut]\r\nURL="+url+"\r\n");spawn("explorer.exe",[p],{detached:true,stdio:"ignore"}).unref();}
else spawn(process.platform==="darwin"?"open":"xdg-open",[url],{detached:true,stdio:"ignore"}).unref();
' DIAGRAM.drawio
Say that red outlines and tags (if used) are additions the editor does not draw. For a large diagram, check that no bus came out crooked by reading back the edge waypoints: every point on one bus shares the same y, and each column drops at its own centre x. If the session happens to have a browser tool, such as a Playwright or Chrome DevTools MCP server, a screenshot of the link is a quicker check, but do not install one for this.
| Thing | Size | Placement rule |
|---|---|---|
| Action box | 262 × 87 | Centred on its column |
| Header (child of box) | 260 × 24 at (1, 1) | Badge + title |
| Footer (child of box) | 262 × 21 at (0, 66) | Only on Exit Bot Flow / End Flow / Disconnect ("End of Flow") and End Task ("End of Task") |
| Start pill, branch pill | 106 × 25.5 | Centred on its column |
| Empty slot | 106 × 32, dashed | Where an output has no actions |
| Vertical gap | 26 | Between every stacked thing: box→box, box→bus, bus→pill, pill→box, last box→rejoin bus, bus→next box |
| Column gap | 19.5 | Between sibling branch columns |
| Canvas margin | 24 | All sides |
Column rules:
y = branching box bottom + 26. Pills at bus + 26. Children at pill bottom + 26. Rejoin bus y = lowest column bottom + 26. Next box at rejoin + 26.Loop rules (the body is drawn inline, indented right, as the editor does):
(loopCx, loopBottom + 13), (bodyCx, loopBottom + 13).endArrow=open;endSize=6;exitX=0.5;exitY=1;entryX=1;entryY=0.5, waypoints (leafCx, bodyBottom + 13), (bodyRight + 10, bodyBottom + 13), (bodyRight + 10, loopCy). Exit Loop / Next Loop boxes rejoin the same way, solid.exitX=0.05 so it leaves the loop box at the left and runs down the gutter left of the body, waypoints (loopX + 13, bodyBottom + 13), (nextCx, bodyBottom + 13). Next box at bodyBottom + 26.Model skeleton. Keep the grey canvas; it is what makes it read as Architect:
<mxGraphModel adaptiveColors="auto" background="#ecedf5" pageVisible="0" grid="0">
<root><mxCell id="0"/><mxCell id="1" parent="0"/>
...cells...
</root>
</mxGraphModel>
Action box = body vertex + header child (+ footer child). The header must be a child cell, not a <div> in the label: draw.io shrink-wraps HTML labels to their text, so a div never spans the box. Children use coordinates relative to the parent and move with it, so dragging the box takes its header along.
<mxCell id="a1" value="<div style="font-size:9.5px;color:#505158;line-height:2">Hi, welcome!<br>How can I help?</div>"
style="rounded=1;arcSize=4;whiteSpace=wrap;html=1;align=left;verticalAlign=top;spacing=0;spacingTop=22;spacingLeft=7;spacingRight=4;strokeColor=#6b6d75;fillColor=#ffffff;fontSize=11;fontColor=#2a2a2e;overflow=hidden;"
vertex="1" parent="1"><mxGeometry x="86.75" y="75.5" width="262" height="87" as="geometry"/></mxCell>
<mxCell id="a1_h" value="<span style="background:#2a2a2e;color:#fff;border-radius:3px;padding:0 6px;margin-right:6px">1</span>Welcome"
style="shape=partialRectangle;top=0;left=0;right=0;bottom=1;html=1;align=left;verticalAlign=middle;spacingLeft=8;strokeColor=#6b6d75;fillColor=#ecedf5;fontSize=11;fontStyle=1;fontColor=#2a2a2e;movable=0;resizable=0;rotatable=0;deletable=0;connectable=0;"
vertex="1" parent="a1"><mxGeometry x="1" y="1" width="260" height="24" as="geometry"/></mxCell>
Footer (child of a terminating box):
<mxCell id="a4_f" value="End of Flow" style="rounded=1;arcSize=10;html=1;strokeColor=#1f3a7a;fillColor=#1f3a7a;fontColor=#ffffff;fontSize=9.5;fontStyle=1;movable=0;resizable=0;connectable=0;"
vertex="1" parent="a4"><mxGeometry x="0" y="66" width="262" height="21" as="geometry"/></mxCell>
Pills (Start, outputs). Tinted fill #d5def7 for Digital Menu choices, #ffffff otherwise:
<mxCell id="a2_yes" value="Yes" style="rounded=1;arcSize=20;whiteSpace=wrap;html=1;strokeColor=#6b6d75;fillColor=#ffffff;fontSize=9.5;fontStyle=1;fontColor=#2a2a2e;"
vertex="1" parent="1"><mxGeometry x="102" y="327.5" width="106" height="25.5" as="geometry"/></mxCell>
Empty slot:
<mxCell id="a2_no_slot" value="" style="rounded=1;arcSize=10;html=1;strokeColor=#6b6d75;dashed=1;fillColor=#ffffff;"
vertex="1" parent="1"><mxGeometry x="305.25" y="379" width="106" height="32" as="geometry"/></mxCell>
Edges. Always bottom-centre out, top-centre in, orthogonal. Two styles: ARROW for the connector that enters a box or slot, LINE (no arrowhead) for box→pill and for rejoins that merge into a bus. Bus lines are waypoints: box→pill passes (boxCx, busY) then (pillCx, busY); a rejoin passes (leafCx, rejoinY) then (nextCx, rejoinY). Give only the last rejoin into a box the arrowhead, otherwise several arrowheads pile up on one spot. A branch that leaves the sequence (Exit Bot Flow, End Task, Jump to Task) rejoins with dashed=1 and no arrowhead, which is how the editor shows "this path does not continue". Every edge needs the child mxGeometry or it does not render.
ARROW: edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeColor=#6b6d75;endArrow=blockThin;endFill=1;endSize=5;exitX=0.5;exitY=1;entryX=0.5;entryY=0;
LINE: edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeColor=#6b6d75;endArrow=none;exitX=0.5;exitY=1;entryX=0.5;entryY=0;
<mxCell id="e3" style="LINE" edge="1" parent="1" source="a2" target="a2_yes">
<mxGeometry relative="1" as="geometry"><Array as="points"><mxPoint x="217.75" y="301.5"/><mxPoint x="155" y="301.5"/></Array></mxGeometry>
</mxCell>
Highlight (optional, not an editor feature). The renderer leaves the box border grey and draws a separate red ring about 3 px outside it, with a small gap, then a red tag whose left edge lines up with the ring and which straddles the top of the box. Add both as children of the box so they move with it. Colouring the box border instead loses the gap and makes the tag look as if it overhangs the box. The tag covers the incoming arrow, which is intended and only works because edges come earlier in the file. Tag width is about 8 + 5.7 per character.
<mxCell id="a53_ring" value="" style="rounded=1;absoluteArcSize=1;arcSize=8;html=1;fillColor=none;strokeColor=#d0021b;strokeWidth=2;movable=0;resizable=0;rotatable=0;deletable=0;connectable=0;"
vertex="1" parent="a53"><mxGeometry x="-3" y="-3" width="268" height="93" as="geometry"/></mxCell>
<mxCell id="a53_tag" value="customers drop out here" style="rounded=1;absoluteArcSize=1;arcSize=6;html=1;align=left;verticalAlign=middle;spacingLeft=6;strokeColor=none;fillColor=#d0021b;fontColor=#ffffff;fontSize=9.5;fontStyle=1;movable=0;resizable=0;connectable=0;"
vertex="1" parent="a53"><mxGeometry x="-3" y="-11" width="140" height="16" as="geometry"/></mxCell>
Label text is HTML inside an XML attribute, so escape twice: first HTML-escape the text (& < > to entities), then XML-escape the whole attribute (& < > "). An expression such as Flow.Count > 0 therefore becomes Flow.Count &gt; 0 in the file. Never put XML comments in the file.
Start → Welcome → decision "Yes / No" where Yes has one box and No is empty → Exit Bot Flow. Columns: Yes 262 wide, No 106 wide, so the row is 387.5 wide and the main centre is 24 + 193.75 = 217.75. Yes centre 155, No centre 358.25.
| Cell | x | y |
|---|---|---|
| start | 164.75 | 24 |
| a1 Welcome | 86.75 | 75.5 |
| a2 Decision | 86.75 | 188.5 (bus 301.5) |
| pills | 102 / 305.25 | 327.5 |
| a3 (under Yes) | 24 | 379 |
| slot (under No) | 305.25 | 379 |
| rejoin bus | 492 | |
| a4 Exit Bot Flow | 86.75 | 518 |
Edges: start→a1 ARROW; a1→a2 ARROW; a2→each pill LINE via bus 301.5; pill→a3 and pill→slot ARROW; a3→a4 LINE via (155, 492),(217.75, 492); slot→a4 ARROW via (358.25, 492),(217.75, 492). A larger flow is the same rules applied recursively: lay out each branch as its own column, then stack columns under their parent.
flow_diagram PNG shows it because it copies the editor; leave it out of the draw.io version, since it is editor chrome with no meaning on a diagram.whiteSpace=wrap) where the editor clips it at the box edge; wrapping is kinder in an editable diagram, so keep lines short rather than fighting it.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
genesys-cloud, architect, drawio, ivr-diagram, contact-center, flow-diagram
npx claudepluginhub makingchatbots/genesys-cloud-plugins --plugin genesys-cloud-architect5 skills in this plugin
/architect-diagramDraw a deployed Genesys Cloud Architect flow task as an image that looks like the Architect editor's own canvas (numbered action boxes with icons, branch pills under a bus, dashed rejoins, inline loops, "End of Flow" footers), with optional red highlights and tags on the actions being discussed, using the flow_diagram tool. Use when the user asks for a picture, image, screenshot-like diagram or PNG/SVG of a flow or task "like Architect" / "as it looks in the editor", wants a diagram that points at where a flow is broken, wants to show stakeholders where customers drop out or which path a conversation took, or wants a static base image for an animation of customers moving through a flow. For a quick text diagram that renders in GitHub markdown, use the flow-diagram skill (Mermaid) instead./flow-diagramThis skill should be used when the user asks to create a diagram, flowchart, flow visualization, dependency tree, architecture map, state machine, or pipeline view — including when they ask for an interactive, explorable, or pan-and-zoom diagram (this skill produces static diagrams and sets that expectation). Common trigger phrases include "visualize", "diagram", "flowchart", "graph", "map out", "show the flow", "draw the dependencies", "create a diagram". Produces Mermaid text; when the user wants an image that looks like the Architect editor's own canvas (a PNG or screenshot-like picture of a deployed flow, with a box highlighted), use the architect-diagram skill and its flow_diagram tool instead./interpret-flow-irUse when interpreting the JSON returned by the flow_ir, flow_action, search_in_flow, find_flow_execution, flow_execution_data or flow_versions tools, or when the user asks about a deployed Genesys Cloud Architect flow, including one named only by flow name (resolve with find_flow first) or a queue named only by queue name (resolve with find_queue first). Covers structural questions ("analyse this flow", "trace the path", "find dead logic", "does it loop"), semantic questions ("what does this decision check", "what does pressing 2 do"), search questions ("which actions reference this queue", "which use Flow.DNIS"), prompt questions ("what does the caller hear here", "what does Prompt.Welcome say"; resolve with get_prompts), execution questions about a real conversation or test run ("what did this conversation do", "why did the customer loop", "did the flow error", "is it working"), and publish-history questions ("when was this flow last published", "which version was live at 09:30", "what changed on the 5th"; resolve with flow_versions). Use it to answer control-flow questions from the IR rather than the raw configuration JSON, to find the actions worth inspecting, to fetch per-action settings the IR omits, and to read one run's execution data against the IR./write-flowWrite and deploy Genesys Cloud Architect flows as TypeScript using the Architect Scripting SDK. Guides Claude to produce correct flow code that typechecks and deploys.Other plugins' skills for the same job