Agent skill that turns natural language, code, Terraform/K8s, SQL, OpenAPI, AsyncAPI, Protobuf and GraphQL sources into editable, tested draw.io architecture diagrams: incremental sync, multi-view projection, drift diff, CI architecture tests, whiteboard derasterize, interactive HTML/PPTX/Mermaid exports.
Python agent-skillsarchitecturearchitecture-diagramasyncapibpmnc4-modelclaude-codediagramdiagrams-as-codedrawioflowchartgithub-actionsgraphqlimage-to-diagramkubernetesmcp-serverprotobufsysmlterraformuml
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Checkout failure walkthrough</title><style>
body{font:16px system-ui;margin:0;background:#f7f8fa;color:#17202a}header,main{max-width:1200px;margin:auto;padding:18px}.toolbar{display:flex;gap:8px;align-items:center}button{padding:8px 14px}svg{background:white;border:1px solid #ccd2da;width:100%;height:auto}.node rect{fill:#dae8fc;stroke:#6c8ebf;stroke-width:2}.node.failed rect{fill:#f8cecc;stroke:#b85450}.node.impacted rect{fill:#ffe6cc;stroke:#d79b00}.node.active rect{stroke:#005fcc;stroke-width:5}.edge{stroke:#65717e;stroke-width:2}svg text{font:13px system-ui;fill:#17202a}#narration{padding:12px;background:#fff;border-left:4px solid #005fcc;margin:12px 0}.sr-only{position:absolute;left:-10000px}@media(prefers-reduced-motion:no-preference){.node{transition:opacity .2s}}</style></head><body>
<header><h1>Checkout failure walkthrough</h1><p>Resilient checkout: 6 components (1 actor, 1 database, 1 external, 1 gateway, 2 service) and 5 relationships.</p><div class="toolbar"><button id="prev">Previous</button><button id="next">Next</button><button id="reset">Overview</button><label id="langWrap" hidden>Language <select id="language"><option value="">Default</option></select></label><span id="counter" aria-live="polite"></span></div><div id="narration" aria-live="polite">Use Next to walk through the architecture.</div></header><main><svg viewBox="0 0 840 400" role="img" aria-labelledby="diagram-title diagram-desc"><title id="diagram-title">Checkout failure walkthrough</title><desc id="diagram-desc">Resilient checkout: 6 components (1 actor, 1 database, 1 external, 1 gateway, 2 service) and 5 relationships.</desc><defs><marker id="arrow" markerWidth="10" markerHeight="10" refX="8" refY="3" orient="auto"><path d="M0,0 L0,6 L9,3 z" fill="#65717e"/></marker></defs><line class="edge" data-source="shopper" data-target="gateway" x1="175" y1="115" x2="415" y2="115" marker-end="url(#arrow)"/><text x="295.0" y="108.0">HTTPS</text><line class="edge" data-source="gateway" data-target="orders" x1="415" y1="115" x2="655" y2="115" marker-end="url(#arrow)"/><text x="535.0" y="108.0">mTLS</text><line class="edge" data-source="orders" data-target="inventory" x1="655" y1="115" x2="175" y2="265" marker-end="url(#arrow)"/><text x="415.0" y="183.0">gRPC</text><line class="edge" data-source="orders" data-target="orders-db" x1="655" y1="115" x2="415" y2="265" marker-end="url(#arrow)"/><text x="535.0" y="183.0">PostgreSQL/TLS</text><line class="edge" data-source="orders" data-target="stripe" x1="655" y1="115" x2="655" y2="265" marker-end="url(#arrow)"/><text x="655.0" y="183.0">HTTPS</text><g class="node " id="node-shopper" data-id="shopper" tabindex="0" role="button" aria-label="Shopper, actor"><rect x="100" y="90" width="150" height="55" rx="10"/><text x="175" y="123" text-anchor="middle">Shopper</text></g><g class="node " id="node-gateway" data-id="gateway" tabindex="0" role="button" aria-label="API Gateway, gateway"><rect x="340" y="90" width="150" height="55" rx="10"/><text x="415" y="123" text-anchor="middle">API Gateway</text></g><g class="node failed" id="node-orders" data-id="orders" tabindex="0" role="button" aria-label="Order Service, service"><rect x="580" y="90" width="150" height="55" rx="10"/><text x="655" y="123" text-anchor="middle">Order Service</text></g><g class="node " id="node-inventory" data-id="inventory" tabindex="0" role="button" aria-label="Inventory Service, service"><rect x="100" y="240" width="150" height="55" rx="10"/><text x="175" y="273" text-anchor="middle">Inventory Service</text></g><g class="node impacted" id="node-orders-db" data-id="orders-db" tabindex="0" role="button" aria-label="Orders DB, database"><rect x="340" y="240" width="150" height="55" rx="10"/><text x="415" y="273" text-anchor="middle">Orders DB</text></g><g class="node impacted" id="node-stripe" data-id="stripe" tabindex="0" role="button" aria-label="Stripe, external"><rect x="580" y="240" width="150" height="55" rx="10"/><text x="655" y="273" text-anchor="middle">Stripe</text></g></svg><details><summary>Text alternative</summary><ol><li>Shopper — actor · boundary: public · source: examples/architecture-studio/checkout.ir.json</li><li>API Gateway — gateway · owner: platform · boundary: public · source: examples/architecture-studio/checkout.ir.json</li><li>Order Service — service · owner: checkout · boundary: private · source: services/orders.py:12</li><li>Inventory Service — service · owner: catalog · boundary: private · source: examples/architecture-studio/checkout.ir.json</li><li>Orders DB — database · owner: checkout · boundary: data · source: examples/architecture-studio/checkout.ir.json</li><li>Stripe — external · owner: payments · boundary: external · source: examples/architecture-studio/checkout.ir.json</li></ol></details></main><script>
const DATA={"steps": [{"id": "shopper", "title": "Shopper", "detail": "actor · boundary: public · source: examples/architecture-studio/checkout.ir.json", "labels": {"zh": "顾客"}}, {"id": "gateway", "title": "API Gateway", "detail": "gateway · owner: platform · boundary: public · source: examples/architecture-studio/checkout.ir.json", "labels": {"zh": "API 网关"}}, {"id": "orders", "title": "Order Service", "detail": "service · owner: checkout · boundary: private · source: services/orders.py:12", "labels": {"zh": "订单服务"}}, {"id": "inventory", "title": "Inventory Service", "detail": "service · owner: catalog · boundary: private · source: examples/architecture-studio/checkout.ir.json", "labels": {"zh": "库存服务"}}, {"id": "orders-db", "title": "Orders DB", "detail": "database · owner: checkout · boundary: data · source: examples/architecture-studio/checkout.ir.json", "labels": {"zh": "订单数据库"}}, {"id": "stripe", "title": "Stripe", "detail": "external · owner: payments · boundary: external · source: examples/architecture-studio/checkout.ir.json", "labels": {"zh": "支付平台"}}], "scenario": {"failed": "orders", "impacted": ["orders-db", "stripe"]}, "languages": ["zh"]};let i=-1;const nodes=[...document.querySelectorAll('.node')];function titleOf(s){return (language.value&&s.labels&&s.labels[language.value])||s.title}function show(n){i=n;nodes.forEach(x=>x.classList.remove('active'));if(i>=0&&i<DATA.steps.length){const s=DATA.steps[i],el=nodes.find(x=>x.dataset.id===s.id);if(el)el.classList.add('active');narration.textContent=titleOf(s)+' — '+s.detail;counter.textContent=(i+1)+' / '+DATA.steps.length}else{narration.textContent='Overview: all components and relationships.';counter.textContent='Overview'}}function setLanguage(){DATA.steps.forEach(s=>{const el=nodes.find(x=>x.dataset.id===s.id);if(el)el.querySelector('text').textContent=titleOf(s)});show(i)}if(DATA.languages.length){langWrap.hidden=false;DATA.languages.forEach(x=>language.add(new Option(x,x)));language.onchange=setLanguage}nodes.forEach(el=>{el.onclick=()=>show(DATA.steps.findIndex(s=>s.id===el.dataset.id));el.onkeydown=e=>{if(e.key==='Enter'||e.key===' ')el.click()}});prev.onclick=()=>show(Math.max(-1,i-1));next.onclick=()=>show(Math.min(DATA.steps.length-1,i+1));reset.onclick=()=>show(-1);document.addEventListener('keydown',e=>{if(e.key==='ArrowRight')next.click();if(e.key==='ArrowLeft')prev.click()});show(-1);
</script></body></html>