<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: CodeCow</title>
    <description>The latest articles on DEV Community by CodeCow (@codecow).</description>
    <link>https://dev.to/codecow</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4048092%2F90d7dabb-989f-4527-bb36-c98e492fcdc9.png</url>
      <title>DEV Community: CodeCow</title>
      <link>https://dev.to/codecow</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/codecow"/>
    <language>en</language>
    <item>
      <title>A Codex Skill That Generates Editable Draw.io Diagrams Instead of Screenshots</title>
      <dc:creator>CodeCow</dc:creator>
      <pubDate>Sun, 26 Jul 2026 15:37:49 +0000</pubDate>
      <link>https://dev.to/codecow/a-codex-skill-that-generates-editable-drawio-diagrams-instead-of-screenshots-41oa</link>
      <guid>https://dev.to/codecow/a-codex-skill-that-generates-editable-drawio-diagrams-instead-of-screenshots-41oa</guid>
      <description>&lt;p&gt;Most AI diagram workflows end with a PNG or a screenshot. It may look fine, but the moment the architecture changes, you have to redraw it or regenerate the whole image.&lt;/p&gt;

&lt;p&gt;I wanted a different workflow: describe a system in natural language, receive a real Draw.io file, and keep editing every node, label, connector, group, and icon.&lt;/p&gt;

&lt;p&gt;That is why I built &lt;strong&gt;drawio-mxgraph&lt;/strong&gt;, an open-source Codex Skill that turns architecture and process descriptions into validated, editable &lt;code&gt;.drawio&lt;/code&gt; files.&lt;/p&gt;

&lt;p&gt;Repository: &lt;a href="https://github.com/clawcode3-bit/drawio-mxgraph-skill" rel="noopener noreferrer"&gt;https://github.com/clawcode3-bit/drawio-mxgraph-skill&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What the Skill does
&lt;/h2&gt;

&lt;p&gt;The Skill generates mxGraph XML that opens directly in Draw.io/diagrams.net. It is designed for architecture diagrams, business processes, agent workflows, and integration maps.&lt;/p&gt;

&lt;p&gt;Key capabilities include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Natural-language descriptions to editable &lt;code&gt;.drawio&lt;/code&gt; XML&lt;/li&gt;
&lt;li&gt;Stable node IDs for reliable incremental updates&lt;/li&gt;
&lt;li&gt;Add, remove, move, resize, rename, and regroup operations&lt;/li&gt;
&lt;li&gt;Layout direction switching: left-to-right, right-to-left, top-to-bottom, or bottom-to-top&lt;/li&gt;
&lt;li&gt;Orthogonal connector routing with explicit entry and exit points&lt;/li&gt;
&lt;li&gt;Portable embedded SVG icons, including cloud and enterprise-style icon sets&lt;/li&gt;
&lt;li&gt;XML structure and reference validation before delivery&lt;/li&gt;
&lt;li&gt;Example diagrams that can be opened and modified immediately&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why stable IDs matter
&lt;/h2&gt;

&lt;p&gt;A common failure mode in generated diagrams is treating every edit as a full redraw. That makes small requests surprisingly destructive.&lt;/p&gt;

&lt;p&gt;With stable IDs, a request such as:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Move the ticketing system below the CRM, add an observability group, and change the layout to left-to-right.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;can update only the affected cells. Existing labels, styles, icons, connections, and manually adjusted positions can remain intact.&lt;/p&gt;

&lt;p&gt;This makes the diagram behave more like source code than a disposable image.&lt;/p&gt;

&lt;h2&gt;
  
  
  Example: an AgentBuilder customer-service architecture
&lt;/h2&gt;

&lt;p&gt;The repository includes an editable example for an intelligent customer-service system built with AgentBuilder. It connects:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Web, mobile, messaging, and voice channels&lt;/li&gt;
&lt;li&gt;An intent-routing and orchestration layer&lt;/li&gt;
&lt;li&gt;LLM and knowledge retrieval services&lt;/li&gt;
&lt;li&gt;CRM customer context&lt;/li&gt;
&lt;li&gt;ERP order, inventory, and finance data&lt;/li&gt;
&lt;li&gt;Ticketing and human-agent handoff&lt;/li&gt;
&lt;li&gt;Guardrails, security, observability, and audit services&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The same file can be revised incrementally. For example, you can ask the Skill to add a fraud-check service, move ERP into an enterprise-systems group, switch the diagram to a vertical layout, or replace generic blocks with AWS-style icons.&lt;/p&gt;

&lt;h2&gt;
  
  
  Validation before delivery
&lt;/h2&gt;

&lt;p&gt;Generating XML is easy. Generating XML that remains useful after several edits is harder.&lt;/p&gt;

&lt;p&gt;The included validator checks for issues such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Missing mxGraph roots&lt;/li&gt;
&lt;li&gt;Duplicate IDs&lt;/li&gt;
&lt;li&gt;Broken edge references&lt;/li&gt;
&lt;li&gt;Invalid parent relationships&lt;/li&gt;
&lt;li&gt;Missing geometry&lt;/li&gt;
&lt;li&gt;Unsupported layout values&lt;/li&gt;
&lt;li&gt;References to nodes that no longer exist&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This catches many problems before the file reaches Draw.io.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick start
&lt;/h2&gt;

&lt;p&gt;Clone the repository into your Codex skills directory, then ask Codex for a diagram in plain language.&lt;/p&gt;

&lt;p&gt;Example prompt:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Create an editable Draw.io architecture for an AI customer-service platform.
Use AgentBuilder, connect CRM, ERP, and ticketing systems, group external systems,
use a left-to-right layout, and select suitable enterprise icons automatically.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can then continue with incremental instructions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Move the ticketing system below CRM, add an observability group,
and change the layout to top-to-bottom without recreating unrelated nodes.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What I would like feedback on
&lt;/h2&gt;

&lt;p&gt;This is the first public release, and I would especially value feedback on:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Connector routing in dense enterprise diagrams&lt;/li&gt;
&lt;li&gt;Which AWS, Azure, GCP, or Visio-style icon libraries should be supported next&lt;/li&gt;
&lt;li&gt;Useful templates for agent systems, SaaS platforms, and business processes&lt;/li&gt;
&lt;li&gt;Edge cases that should be added to the XML validator&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If editable AI-generated diagrams are useful to you, please try the examples, open an issue, or star the repository so I know which direction to prioritize.&lt;/p&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/clawcode3-bit/drawio-mxgraph-skill" rel="noopener noreferrer"&gt;https://github.com/clawcode3-bit/drawio-mxgraph-skill&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Release v1.0.0: &lt;a href="https://github.com/clawcode3-bit/drawio-mxgraph-skill/releases/tag/v1.0.0" rel="noopener noreferrer"&gt;https://github.com/clawcode3-bit/drawio-mxgraph-skill/releases/tag/v1.0.0&lt;/a&gt;&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>ai</category>
      <category>architecture</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
