Install
$ agentstack add skill-impertio-studio-draw-io-claude-skill-package-drawio-impl-swimlanes ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
Draw.io Swimlane Implementation
Purpose
This skill enables correct generation of swimlane diagrams, cross-functional flowcharts, and pool/lane layouts in Draw.io mxGraph XML. It enforces the container-relative coordinate system and prevents the most common AI mistake: placing child shapes at absolute page coordinates instead of container-relative coordinates.
Critical Rules (Memorize These)
- ALWAYS set
container=1in every swimlane and pool style — Without it, child shapes will NOT move with the lane when repositioned. - ALWAYS use container-relative coordinates for children — A child at
x="40" y="35"is 40px from the lane's left edge and 35px from the lane's top edge (below the header). NEVER use absolute page coordinates. - ALWAYS set
parentto the container ID for child shapes — A shape inside "lane1" MUST haveparent="lane1". NEVER setparent="1"for shapes that belong inside a container. - ALWAYS set cross-lane edge
parentto the common ancestor — When an edge connects shapes in different lanes, set the edge'sparentto the pool (the shared ancestor). NEVER set it to one of the individual lanes. - ALWAYS include
collapsible=0on lanes — Without it, users can accidentally collapse lanes in the editor, hiding all contents. - NEVER use absolute page coordinates for shapes inside a container — This is the #1 swimlane mistake. Shapes will render at the wrong position and will NOT move with their parent lane.
Container Hierarchy
Swimlane diagrams use a strict parent-child hierarchy:
Root (id="1")
Pool (container=1, parent="1") = startSize to avoid overlap.
## Lane Geometry Rules
### Pool Positioning
The pool uses absolute page coordinates:
```xml
Lane Positioning
Lanes use coordinates relative to the pool. The first lane starts at y=startSize (below the pool header):
Width rule: ALWAYS set lane width equal to pool width. Lanes span the full width of the pool.
Height rule: The sum of all lane heights plus the pool header startSize MUST equal the pool height:
- Pool height = startSize + lane1.height + lane2.height + ...
Child Shape Positioning
Shapes inside lanes use coordinates relative to the lane's top-left corner:
Place children with y >= startSize of the lane to avoid overlapping the lane header.
Cross-Lane Connections
Edges that connect shapes in different lanes MUST use the pool as their parent:
Edges that connect shapes within the SAME lane MAY use either the lane or the pool as parent. For consistency, ALWAYS use the pool as edge parent.
Nested Lanes
Lanes can contain sub-lanes for finer granularity:
Rule: Sub-lane coordinates are relative to the parent lane. Sub-lane widths MUST equal the parent lane width.
Auto-Expand Behavior
When container=1 is set, Draw.io auto-expands the container if a child shape extends beyond its boundaries. To prevent unwanted expansion:
- ALWAYS size the pool and lanes large enough to contain all children.
- Add
resizable=1to allow manual resizing in the editor. - Add
recursiveResize=0on the pool to prevent child lanes from auto-resizing when the pool resizes.
Complete Example: 3-Lane Order Processing
This example demonstrates:
- 3 lanes (Sales, Warehouse, Finance) inside one pool
- 7 shapes across 3 lanes with container-relative coordinates
- Cross-lane connections with
parent="pool1" - Decision diamond with labeled Yes/No branches
- Document shape for invoice generation
- Consistent left-to-right flow within horizontal lanes
Checklist: Before Outputting a Swimlane Diagram
- Every pool and lane has
container=1in its style. - Every lane has
collapsible=0in its style. - Every child shape has
parentset to its containing lane ID. - Every child shape uses coordinates relative to its lane (NOT absolute page coordinates).
- Every cross-lane edge has
parentset to the pool (common ancestor). - Lane widths equal the pool width.
- Pool height = startSize + sum of all lane heights.
- Child shapes have
y >= startSizeof their lane to avoid header overlap. - Both structural cells (
id="0"andid="1") are present. - All cell IDs are unique.
- All edges have valid
sourceandtargetattributes.
Cross-References
- XML fundamentals: See
drawio-core-xml-formatfor file structure and structural cells. - Style syntax: See
drawio-syntax-stylesfor the complete style property reference. - Connection details: See
drawio-syntax-connectionsfor edge routing and waypoints. - Geometry: See
drawio-core-geometryfor coordinate system and positioning. - Flowchart shapes: See
drawio-impl-flowchartsfor ISO 5807 shapes used inside lanes.
Reference Links
- [Complete Reference](references/methods.md)
- [Working Examples](references/examples.md)
- [Anti-Patterns](references/anti-patterns.md)
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: Impertio-Studio
- Source: Impertio-Studio/Draw.io-Claude-Skill-Package
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.