[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6P72KKSPFX26PVJ0Q3AMZV0":3,"skill-same:01M6P72KKSPFX26PVJ0Q3AMZV0":148},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":26,"publishedAt":47,"linkOnly":48,"markdownContent":49,"markdownBody":50,"frontMatter":51,"refName":84,"commitSha":85,"skillDirectory":86,"forksCount":14,"repositoryHtmlUrl":87,"repositoryHomepageUrl":6,"ownerHtmlUrl":88,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":89,"install":90,"resources":103},"01M6P72KKSPFX26PVJ0Q3AMZV0","drawio-skill",null,"Use when user requests diagrams, flowcharts, architecture charts, or visualizations. Also use proactively when explaining systems with 3+ components, complex data flows, or relationships that benefit from visual representation. Generates .drawio XML files and exports to PNG\u002FSVG\u002FPDF locally using the native draw.io desktop CLI.","asushiroo\u002Fdotfiles","asushiroo","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F113016352?v=4","01M6P6Z9RW9SDSR9XHPMBAYVE6","asushiro","01M6P6Z9WSWDRXZNZCSB4W5JC2",0,"MIT","https:\u002F\u002Fgithub.com\u002Fasushiroo\u002Fdotfiles\u002Fblob\u002Fmain\u002F.codex\u002Fskills\u002Fdrawio-skill\u002FSKILL.md",[18,23],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000002","文档处理","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],"drawio skill","drawio","model","flows","native","io","app","self","desktop app","files","diagrams","PDF","Charts","visualization","flowchart","diagram","architecture","components","cli","design","2026-11-10 10:12:30",false,"---\nname: drawio-skill\nversion: 1.5.2\ndescription: Use when user requests diagrams, flowcharts, architecture charts, or visualizations. Also use proactively when explaining systems with 3+ components, complex data flows, or relationships that benefit from visual representation. Generates .drawio XML files and exports to PNG\u002FSVG\u002FPDF locally using the native draw.io desktop CLI.\nlicense: MIT\nhomepage: https:\u002F\u002Fgithub.com\u002FAgents365-ai\u002Fdrawio-skill\ncompatibility: Requires draw.io desktop app CLI on PATH (macOS\u002FLinux\u002FWindows). Self-check step requires a vision-enabled model (e.g., Claude Sonnet\u002FOpus); gracefully skipped if unavailable.\nplatforms: [macos, linux, windows]\nmetadata: {\"openclaw\":{\"requires\":{\"anyBins\":[\"draw.io\",\"drawio\"]},\"emoji\":\"?\",\"os\":[\"darwin\",\"linux\",\"win32\"],\"install\":[{\"id\":\"brew-drawio\",\"kind\":\"brew\",\"formula\":\"drawio\",\"bins\":[\"draw.io\"],\"label\":\"Install draw.io via Homebrew\",\"os\":[\"darwin\"]}]},\"hermes\":{\"tags\":[\"drawio\",\"diagram\",\"flowchart\",\"architecture\",\"visualization\",\"uml\"],\"category\":\"design\",\"requires_tools\":[\"draw.io\"],\"related_skills\":[\"mermaid\",\"excalidraw\",\"plantuml\"]},\"author\":\"Agents365-ai\",\"version\":\"1.5.2\"}\n---\n\n# Draw.io Diagrams\n\n## Overview\n\nGenerate `.drawio` XML files and export to PNG\u002FSVG\u002FPDF\u002FJPG locally using the native draw.io desktop app CLI.\n\n**Supported formats:** PNG, SVG, PDF, JPG — no browser automation needed.\n\nPNG, SVG, and PDF exports support `--embed-diagram` (`-e`) — the exported file contains the full diagram XML, so opening it in draw.io recovers the editable diagram. Use double extensions (`name.drawio.png`) to signal embedded XML.\n\n## Bundled resources\n\nWhen the workflow references one of these, read it on demand — none of them need to be in context up front.\n\n| File | Read it when |\n|---|---|\n| `references\u002Fdiagram-types.md` | The user names a specific diagram type (ERD, UML class, sequence, architecture, ML\u002FDL, flowchart) |\n| `references\u002Fstyle-presets.md` | The user asks to learn \u002F save \u002F list \u002F set-default \u002F delete a style preset, or you've resolved an active preset and need the application rules |\n| `references\u002Fstyle-extraction.md` | You're inside the Learn flow and need the extraction procedure (called from `style-presets.md`) |\n| `references\u002Ftroubleshooting.md` | An export fails, vision rejects a PNG, or a rendering looks wrong |\n| `scripts\u002Frepair_png.py` | After every `-e` PNG export — fixes draw.io's truncated IEND chunk (issue #8) |\n| `scripts\u002Fencode_drawio_url.py` | The CLI is unavailable and you need a browser-fallback diagrams.net URL |\n\n## Prerequisites\n\nThe draw.io desktop app must be installed and the CLI accessible:\n\n**macOS sandbox \u002F sandbox isolation note (e.g., codex.app):** In some sandboxed macOS environments, invoking the draw.io desktop CLI (even `draw.io --version`) can crash the draw.io process or produce no output. If that happens, treat the CLI as **unavailable in this sandbox isolation** — do not keep retrying inside the sandbox. Prefer a **non-sandboxed host environment** (outside sandbox isolation) for any CLI export work, or use the browser fallback \u002F XML-only outputs.\n\n```bash\n# macOS (Homebrew — recommended; CLI binary is `drawio`, not `draw.io`)\nbrew install --cask drawio\ndrawio --version\n\n# macOS (full path if not in PATH)\n\u002FApplications\u002Fdraw.io.app\u002FContents\u002FMacOS\u002Fdraw.io --version\n\n# Windows\n\"C:\\Program Files\\draw.io\\draw.io.exe\" --version\n\n# Linux\ndraw.io --version\n```\n\nInstall draw.io desktop if missing:\n- macOS: `brew install --cask drawio` or download from https:\u002F\u002Fgithub.com\u002Fjgraph\u002Fdrawio-desktop\u002Freleases\n- Windows: download installer from https:\u002F\u002Fgithub.com\u002Fjgraph\u002Fdrawio-desktop\u002Freleases\n- Linux: download `.deb`\u002F`.rpm` from https:\u002F\u002Fgithub.com\u002Fjgraph\u002Fdrawio-desktop\u002Freleases — **do not use snap** (AppArmor sandbox denies secrets\u002Fkeyring on servers, causes crash)\n\n## Workflow\n\nBefore starting the workflow, assess whether the user's request is specific enough. If key details are missing, ask 1-3 focused questions:\n- **Diagram type** — which preset? (ERD, UML, Sequence, Architecture, ML\u002FDL, Flowchart, or general)\n- **Output format** — PNG (default), SVG, PDF, or JPG?\n- **Output location** — default is the user's working dir; honor any explicit path the user gives (e.g. \"put it in `.\u002Fartifacts\u002F`\"). Don't ask if they didn't mention one.\n- **Scope\u002Ffidelity** — how many components? Any specific technologies or labels?\n\nSkip clarification if the request already specifies these details or is clearly simple (e.g., \"draw a flowchart of X\").\n\n**Step 0 — Resolve active preset.** Determine which (if any) user-defined style preset applies to this generation.\n\n- Scan the user's message for a phrase that clearly names a style preset: \"use my `\u003Cname>` style\", \"with my `\u003Cname>` style\", \"in `\u003Cname>` mode\", \"in the style of `\u003Cname>`\". A bare `with \u003Cname>` does **not** count — \"draw a diagram with redis\" names a component, not a style. If a clear match is found → active preset = `\u003Cname>`.\n- Else, check `~\u002F.drawio-skill\u002Fstyles\u002F` for any file with `\"default\": true`. If found → active preset = that one.\n- Else → no preset active; fall through to the built-in color\u002Fshape\u002Fedge conventions for the rest of the workflow.\n\nLoad the preset JSON from `~\u002F.drawio-skill\u002Fstyles\u002F\u003Cname>.json`, falling back to `\u003Cthis-skill-dir>\u002Fstyles\u002Fbuilt-in\u002F\u003Cname>.json`. If the named preset exists in neither location, tell the user the name is unknown, list the available presets (user dir + built-in), and stop — do **not** silently fall back to defaults.\n\nWhen a preset loads successfully, mention it in the first line of the reply: *\"Using preset `\u003Cname>` (confidence: `\u003Clevel>`).\"* See the **Applying a preset** subsection below for how the preset changes color\u002Fshape\u002Fedge\u002Ffont decisions.\n\n1. **Check deps** — verify `draw.io --version` succeeds; note platform for correct CLI path\n2. **Plan** — identify shapes, relationships, layout (LR or TB), group by tier\u002Flayer\n3. **Generate** — write `.drawio` XML file to disk. Default output dir is the user's working dir; if the user specified an output path or directory (e.g. `.\u002Fartifacts\u002F`, `docs\u002Fimages\u002F`), use that instead — `mkdir -p` the target dir first. Apply the same dir choice to PNG\u002FSVG\u002FPDF exports in steps 4 and 7.\n4. **Export draft** — run CLI to produce a preview PNG. **Do NOT pass `-e`** at this step — the embedded `zTXt mxGraphModel` chunk it adds causes vision APIs (Claude included) to return 400 \"Could not process image\" in step 5. Save the clean preview as `\u003Cname>.png` (single extension). Embedding is for the final export only (step 7).\n5. **Self-check** — use the agent's built-in vision capability to read the exported PNG, catch obvious issues, auto-fix before showing user (requires a vision-enabled model such as Claude Sonnet\u002FOpus). If reading the PNG returns a 400 \u002F \"Could not process image\" error, you almost certainly exported with `-e` by mistake — re-export without `-e` and retry once. If it still fails, skip self-check and continue to step 6.\n6. **Review loop** — show image to user, collect feedback, apply targeted XML edits, re-export, repeat until approved\n7. **Final export** — re-export the approved version to all requested formats. Use `-e` here (PNG\u002FSVG\u002FPDF) so the deliverable stays editable in draw.io; save as `\u003Cname>.drawio.png` to signal embedded XML. **For PNG with `-e`, run `python3 \u003Cthis-skill-dir>\u002Fscripts\u002Frepair_png.py \u003Cname>.drawio.png` immediately after** — draw.io's CLI truncates the IEND chunk in `-e` PNG output (8 bytes missing), producing a corrupt file that vision APIs and strict PNG decoders reject (issue #8). Report file paths.\n\n**If `draw.io --version` crashes or prints nothing (common in restricted macOS sandbox isolation like codex.app):**\n- Do not keep retrying CLI invocations inside the sandbox.\n- Skip steps 4, 5, 6, and 7 (CLI export + PNG-based review) and use **Browser fallback** (`scripts\u002Fencode_drawio_url.py`) or deliver the `.drawio` XML only.\n- If the user needs PNG\u002FSVG\u002FPDF outputs, ask them to run the export commands in a **non-sandboxed host environment** (outside sandbox isolation) and share the resulting files.\n\nEscalation rule:\n- If the binary exists on PATH (or known app path exists) but execution fails with abnormal exit, empty output, Electron startup failure, display\u002Fsession error, or likely sandbox restriction, prefer one escalated retry before falling back.\n- If the binary is missing entirely, do not escalate just to search more aggressively; go to install guidance or fallback.\n\n### Step 5: Self-Check\n\nAfter exporting the draft PNG, use the agent's vision capability (e.g., Claude's image input) to read the image and check for these issues before showing the user. If the agent does not support vision, skip self-check and show the PNG directly.\n\n**Important:** the draft PNG read here must have been exported **without** `-e`. Draw.io's `-e` flag emits a PNG with a truncated IEND chunk (8 bytes of type+CRC missing) that the Anthropic vision API rejects with 400 \"Could not process image\" (issue #8). The simplest fix for the preview step is to skip `-e` entirely; the final export in step 7 keeps `-e` and runs the repair snippet. If you see the 400 error here, re-export without `-e` and retry once; if it still fails (any other reason), skip self-check and proceed to step 6.\n\n| Check | What to look for | Auto-fix action |\n|-------|-----------------|-----------------|\n| Overlapping shapes | Two or more shapes stacked on top of each other | Shift shapes apart by ≥200px |\n| Clipped labels | Text cut off at shape boundaries | Increase shape width\u002Fheight to fit label |\n| Missing connections | Arrows that don't visually connect to shapes | Verify `source`\u002F`target` ids match existing cells |\n| Off-canvas shapes | Shapes at negative coordinates or far from the main group | Move to positive coordinates near the cluster |\n| Edge-shape overlap | An edge\u002Farrow visually crosses through an unrelated shape | Add waypoints (`\u003CArray as=\"points\">`) to route around the shape, or increase spacing between shapes |\n| Stacked edges | Multiple edges overlap each other on the same path | Distribute entry\u002Fexit points across the shape perimeter (use different exitX\u002FentryX values) |\n\n- Max **2 self-check rounds** — if issues remain after 2 fixes, show the user anyway\n- Re-export after each fix and re-read the new PNG\n\n### Step 6: Review Loop\n\nAfter self-check, show the exported image and ask the user for feedback.\n\n**Targeted edit rules** — for each type of feedback, apply the minimal XML change:\n\n| User request | XML edit action |\n|-------------|----------------|\n| Change color of X | Find `mxCell` by `value` matching X, update `fillColor`\u002F`strokeColor` in `style` |\n| Add a new node | Append a new `mxCell` vertex with next available `id`, position near related nodes |\n| Remove a node | Delete the `mxCell` vertex and any edges with matching `source`\u002F`target` |\n| Move shape X | Update `x`\u002F`y` in the `mxGeometry` of the matching `mxCell` |\n| Resize shape X | Update `width`\u002F`height` in the `mxGeometry` of the matching `mxCell` |\n| Add arrow from A to B | Append a new `mxCell` edge with `source`\u002F`target` matching A and B ids |\n| Change label text | Update the `value` attribute of the matching `mxCell` |\n| Change layout direction | **Full regeneration** — rebuild XML with new orientation |\n\n**Rules:**\n- For single-element changes: edit existing XML in place — preserves layout tuning from prior iterations\n- For layout-wide changes (e.g., swap LR↔TB, \"start over\"): regenerate full XML\n- Overwrite the same `{name}.png` (no `-e`) each iteration — do not create `v1`, `v2`, `v3` files. `-e` is reserved for the final export in step 7.\n- After applying edits, re-export and show the updated image\n- Loop continues until user says approved \u002F done \u002F LGTM\n- **Safety valve:** after 5 iteration rounds, suggest the user open the `.drawio` file in draw.io desktop for fine-grained adjustments\n\n### Step 7: Final Export\n\nOnce the user approves:\n- Export to all requested formats (PNG, SVG, PDF, JPG) — default to PNG if not specified\n- Report file paths for both the `.drawio` source file and exported image(s)\n- **Auto-launch:** offer to open the `.drawio` file in draw.io desktop for fine-tuning — `open diagram.drawio` (macOS), `xdg-open` (Linux), `start` (Windows)\n- Confirm files are saved and ready to use\n\n## Style Presets\n\nA **style preset** is a named JSON file capturing a user's visual preferences (palette, shapes, font, edges). When active, it fully replaces the built-in color\u002Fshape conventions in this skill.\n\n**Lookup order** when SKILL.md's step 0.5 resolves a preset name:\n1. `~\u002F.drawio-skill\u002Fstyles\u002F\u003Cname>.json` — user presets (survive `git pull`)\n2. `\u003Cthis-skill-dir>\u002Fstyles\u002Fbuilt-in\u002F\u003Cname>.json` — shipped built-ins (`default`, `corporate`, `handdrawn`)\n\nAlways lowercase the user-provided name before any file operation — the schema enforces lowercase.\n\n**For everything else — Learn flow (extracting a preset from a file), management ops (list\u002Fdefault\u002Fdelete\u002Frename), application rules (color lookup, shape keywords, edges, fonts, extras, interaction with diagram-type presets), and validation — read `references\u002Fstyle-presets.md`.** It's only needed when the user invokes those flows or when an active preset must be applied to the current generation.\n\n## Draw.io XML Structure\n\n### File skeleton\n\n```xml\n\u003C?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\u003Cmxfile host=\"drawio\" version=\"26.0.0\">\n  \u003Cdiagram name=\"Page-1\">\n    \u003CmxGraphModel>\n      \u003Croot>\n        \u003CmxCell id=\"0\" \u002F>\n        \u003CmxCell id=\"1\" parent=\"0\" \u002F>\n        \u003C!-- user shapes start at id=\"2\" -->\n      \u003C\u002Froot>\n    \u003C\u002FmxGraphModel>\n  \u003C\u002Fdiagram>\n\u003C\u002Fmxfile>\n```\n\n**Rules:**\n- `id=\"0\"` and `id=\"1\"` are required root cells — never omit them\n- User shapes start at `id=\"2\"` and increment sequentially\n- All shapes have `parent=\"1\"` (unless inside a container — then use container's id)\n- All text uses `html=1` in style for proper rendering\n- **Never use `--` inside XML comments** — it's illegal per XML spec and causes parse errors\n- Escape special characters in attribute values: `&amp;`, `&lt;`, `&gt;`, `&quot;`\n- **Multi-line text in labels:** use `&#xa;` for line breaks inside `value` attributes (not literal `\\n`). Example: `value=\"Line 1&#xa;Line 2\"`\n\n### Shape types (vertex)\n\n| Style keyword | Use for |\n|--------------|---------|\n| `rounded=0` | plain rectangle (default) |\n| `rounded=1` | rounded rectangle — services, modules |\n| `ellipse;` | circles\u002Fovals — start\u002Fend, databases |\n| `rhombus;` | diamond — decision points |\n| `shape=mxgraph.aws4.resourceIcon;` | AWS icons |\n| `shape=cylinder3;` | cylinder — databases |\n| `swimlane;` | group\u002Fcontainer with title bar |\n\n### Required properties\n\n```xml\n\u003C!-- Rectangle \u002F rounded box -->\n\u003CmxCell id=\"2\" value=\"Label\" style=\"rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;\" vertex=\"1\" parent=\"1\">\n  \u003CmxGeometry x=\"100\" y=\"100\" width=\"160\" height=\"60\" as=\"geometry\" \u002F>\n\u003C\u002FmxCell>\n\n\u003C!-- Cylinder (database) -->\n\u003CmxCell id=\"3\" value=\"DB\" style=\"shape=cylinder3;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;fontColor=#333333;\" vertex=\"1\" parent=\"1\">\n  \u003CmxGeometry x=\"350\" y=\"100\" width=\"120\" height=\"80\" as=\"geometry\" \u002F>\n\u003C\u002FmxCell>\n\n\u003C!-- Diamond (decision) -->\n\u003CmxCell id=\"4\" value=\"Check?\" style=\"rhombus;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;\" vertex=\"1\" parent=\"1\">\n  \u003CmxGeometry x=\"100\" y=\"220\" width=\"160\" height=\"80\" as=\"geometry\" \u002F>\n\u003C\u002FmxCell>\n```\n\n### Containers and groups\n\nFor architecture diagrams with nested elements, use draw.io's parent-child containment — do **not** just place shapes on top of larger shapes.\n\n| Type | Style | When to use |\n|------|-------|-------------|\n| **Group** (invisible) | `group;pointerEvents=0;` | No visual border needed, container has no connections |\n| **Swimlane** (titled) | `swimlane;startSize=30;` | Container needs a visible title bar, or container itself has connections |\n| **Custom container** | Add `container=1;pointerEvents=0;` to any shape | Any shape acting as a container without its own connections |\n\n**Key rules:**\n- Add `pointerEvents=0;` to container styles that should not capture connections between children\n- Children set `parent=\"containerId\"` and use coordinates **relative to the container**\n\n```xml\n\u003C!-- Swimlane container -->\n\u003CmxCell id=\"svc1\" value=\"User Service\" style=\"swimlane;startSize=30;fillColor=#dae8fc;strokeColor=#6c8ebf;\" vertex=\"1\" parent=\"1\">\n  \u003CmxGeometry x=\"100\" y=\"100\" width=\"300\" height=\"200\" as=\"geometry\"\u002F>\n\u003C\u002FmxCell>\n\u003C!-- Child inside container — coordinates relative to parent -->\n\u003CmxCell id=\"api1\" value=\"REST API\" style=\"rounded=1;whiteSpace=wrap;html=1;\" vertex=\"1\" parent=\"svc1\">\n  \u003CmxGeometry x=\"20\" y=\"40\" width=\"120\" height=\"60\" as=\"geometry\"\u002F>\n\u003C\u002FmxCell>\n\u003CmxCell id=\"db1\" value=\"Database\" style=\"shape=cylinder3;whiteSpace=wrap;html=1;\" vertex=\"1\" parent=\"svc1\">\n  \u003CmxGeometry x=\"160\" y=\"40\" width=\"120\" height=\"60\" as=\"geometry\"\u002F>\n\u003C\u002FmxCell>\n```\n\n### Connector (edge)\n\n**CRITICAL:** Every edge `mxCell` must contain a `\u003CmxGeometry relative=\"1\" as=\"geometry\" \u002F>` child element. Self-closing edge cells (`\u003CmxCell ... edge=\"1\" ... \u002F>`) are **invalid** and will not render. Always use the expanded form.\n\n```xml\n\u003C!-- Directed arrow — always include rounded, orthogonalLoop, jettySize for clean routing -->\n\u003CmxCell id=\"10\" value=\"\" style=\"edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;\" edge=\"1\" parent=\"1\" source=\"2\" target=\"3\">\n  \u003CmxGeometry relative=\"1\" as=\"geometry\" \u002F>\n\u003C\u002FmxCell>\n\n\u003C!-- Arrow with label + explicit entry\u002Fexit points to control direction -->\n\u003CmxCell id=\"11\" value=\"HTTP\u002FREST\" style=\"edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;\" edge=\"1\" parent=\"1\" source=\"2\" target=\"4\">\n  \u003CmxGeometry relative=\"1\" as=\"geometry\" \u002F>\n\u003C\u002FmxCell>\n\n\u003C!-- Arrow with waypoints — use when edge must route around other shapes -->\n\u003CmxCell id=\"12\" value=\"\" style=\"edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;\" edge=\"1\" parent=\"1\" source=\"3\" target=\"5\">\n  \u003CmxGeometry relative=\"1\" as=\"geometry\">\n    \u003CArray as=\"points\">\n      \u003CmxPoint x=\"500\" y=\"50\" \u002F>\n    \u003C\u002FArray>\n  \u003C\u002FmxGeometry>\n\u003C\u002FmxCell>\n```\n\n**Edge style rules:**\n- **Animated connectors:** add `flowAnimation=1;` to any edge style to show a moving dot animation along the arrow. Works in SVG export and draw.io desktop — ideal for data-flow and pipeline diagrams. Example: `style=\"edgeStyle=orthogonalEdgeStyle;flowAnimation=1;rounded=1;...\"`\n- **Always** include `rounded=1;orthogonalLoop=1;jettySize=auto` — these enable smart routing that avoids overlaps\n- Pin `exitX\u002FexitY\u002FentryX\u002FentryY` on every edge when a node has 2+ connections — distributes lines across the shape perimeter\n- Add `\u003CArray as=\"points\">` waypoints when an edge must detour around an intermediate shape\n- **Leave room for arrowheads:** the final straight segment between the last bend and the target shape must be ≥20px long. If too short, the arrowhead overlaps the bend and looks broken. Fix by increasing node spacing or adding explicit waypoints\n\n### Distributing connections on a shape\n\nWhen multiple edges connect to the same shape, assign different entry\u002Fexit points to prevent stacking:\n\n| Position | exitX\u002FentryX | exitY\u002FentryY | Use when |\n|----------|-------------|-------------|----------|\n| Top center | 0.5 | 0 | connecting to node above |\n| Top-left | 0.25 | 0 | 2nd connection from top |\n| Top-right | 0.75 | 0 | 3rd connection from top |\n| Right center | 1 | 0.5 | connecting to node on right |\n| Bottom center | 0.5 | 1 | connecting to node below |\n| Left center | 0 | 0.5 | connecting to node on left |\n\n**Rule:** if a shape has N connections on one side, space them evenly (e.g., 3 connections on bottom → exitX = 0.25, 0.5, 0.75)\n\n### Color palette (fillColor \u002F strokeColor)\n\n*Used only when no preset is active (see \"Applying a preset\" above).*\n\n| Color name | fillColor | strokeColor | Use for |\n|-----------|-----------|-------------|---------|\n| Blue | `#dae8fc` | `#6c8ebf` | services, clients |\n| Green | `#d5e8d4` | `#82b366` | success, databases |\n| Yellow | `#fff2cc` | `#d6b656` | queues, decisions |\n| Orange | `#ffe6cc` | `#d79b00` | gateways, APIs |\n| Red\u002FPink | `#f8cecc` | `#b85450` | errors, alerts |\n| Grey | `#f5f5f5` | `#666666` | external\u002Fneutral |\n| Purple | `#e1d5e7` | `#9673a6` | security, auth |\n\n### Layout tips\n\n**Spacing — scale with complexity:**\n\n| Diagram complexity | Nodes | Horizontal gap | Vertical gap |\n|-------------------|-------|----------------|--------------|\n| Simple | ≤5 | 200px | 150px |\n| Medium | 6–10 | 280px | 200px |\n| Complex | >10 | 350px | 250px |\n\n**Routing corridors:** between shape rows\u002Fcolumns, leave an extra ~80px empty corridor where edges can route without crossing shapes. Never place a shape in a gap that edges need to traverse.\n\n**Grid alignment:** snap all `x`, `y`, `width`, `height` values to **multiples of 10** — this ensures shapes align cleanly on draw.io's default grid and makes manual editing easier.\n\n**General rules:**\n- Plan a grid before assigning x\u002Fy coordinates — sketch node positions on paper\u002Fmentally first\n- Group related nodes in the same horizontal or vertical band\n- Use `swimlane` cells for logical grouping with visible borders\n- Place heavily-connected \"hub\" nodes centrally so edges radiate outward instead of crossing\n- To force straight vertical connections, pin entry\u002Fexit points explicitly on edges:\n  `exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0`\n- Always center-align a child node under its parent (same center x) to avoid diagonal routing\n- **Event bus pattern**: place Kafka\u002Fbus nodes in the **center of the service row**, not below — services on either side can reach it with short horizontal arrows (`exitX=1` left side, `exitX=0` right side), eliminating all line crossings\n- Horizontal connections (`exitX=1` or `exitX=0`) never cross vertical nodes in the same row; use them for peer-to-peer and publish connections\n\n**Avoiding edge-shape overlap:**\n- Before finalizing coordinates, trace each edge path mentally — if it must cross an unrelated shape, either move the shape or add waypoints\n- For tree\u002Fhierarchical layouts: assign nodes to layers (rows), connect only between adjacent layers to minimize crossings\n- For star\u002Fhub layouts: place the hub center, satellites around it — edges stay short and radial\n- When an edge must span multiple rows\u002Fcolumns, route it along the outer corridor, not through the middle of the diagram\n\n## Export\n\n### Commands\n\nThere are **two** export modes:\n\n- **Preview \u002F self-check** (step 4 of the workflow) — no `-e`. Output `diagram.png`. Required for vision self-check; using `-e` here triggers a 400 \"Could not process image\" error from the vision API (issue #8).\n- **Final \u002F deliverable** (step 7) — pass `-e`. Output `diagram.drawio.png`. The embedded XML keeps the file editable in draw.io.\n\n```bash\n# Preview PNG (use this in step 4, before self-check) — NO -e\ndraw.io -x -f png -s 2 -o diagram.png input.drawio\n\n# Final PNG (step 7, after user approval) — WITH -e, double extension\ndraw.io -x -f png -e -s 2 -o diagram.drawio.png input.drawio\n\n# macOS — full path (if not in PATH); preview \u002F final variants\n\u002FApplications\u002Fdraw.io.app\u002FContents\u002FMacOS\u002Fdraw.io -x -f png -s 2 -o diagram.png input.drawio\n\u002FApplications\u002Fdraw.io.app\u002FContents\u002FMacOS\u002Fdraw.io -x -f png -e -s 2 -o diagram.drawio.png input.drawio\n\n# Windows\n\"C:\\Program Files\\draw.io\\draw.io.exe\" -x -f png -e -s 2 -o diagram.drawio.png input.drawio\n\n# Linux (headless — requires xvfb-run; on servers add HOME and --disable-gpu)\nexport HOME=${HOME:-\u002Ftmp}\nxvfb-run -a --server-args=\"-screen 0 1280x1024x24\" \\\n  draw.io -x -f png -e -s 2 -o diagram.drawio.png input.drawio --disable-gpu\n# Running as root (CI \u002F Docker)? Append --no-sandbox AT THE END (placing it earlier makes drawio treat it as the input filename)\n\n# SVG export (final — -e is safe; SVG is text)\ndraw.io -x -f svg -e -o diagram.svg input.drawio\n\n# PDF export (final)\ndraw.io -x -f pdf -e -o diagram.pdf input.drawio\n\n# Custom output directory (e.g. CI artifacts dir) — create if missing, then export there\nmkdir -p .\u002Fartifacts && draw.io -x -f png -e -s 2 -o .\u002Fartifacts\u002Fdiagram.drawio.png input.drawio\n```\n\n### Post-export PNG repair (required after `-e` PNG export)\n\ndraw.io CLI truncates the IEND chunk when emitting `-e` PNGs — the file ends with the 4-byte IEND length field but the `IEND` type + CRC (8 bytes) are missing. Result: vision APIs return 400 \"Could not process image\" and strict PNG decoders error out. SVG\u002FPDF are unaffected.\n\nRun this immediately after every `-e` PNG export:\n\n```bash\npython3 \u003Cthis-skill-dir>\u002Fscripts\u002Frepair_png.py diagram.drawio.png\n```\n\nThe script's `endswith(IEND)` guard makes it a no-op once draw.io fixes the bug upstream — safe to run unconditionally.\n\n**Key flags:**\n- `-x` — export mode (required)\n- `-f` — format: `png`, `svg`, `pdf`, `jpg`\n- `-e` — embed diagram XML in output (PNG, SVG, PDF) — exported file remains editable in draw.io. **Skip for the preview PNG used in step 5 self-check** — `-e` PNGs have a truncated IEND chunk that vision APIs reject (issue #8). For final PNG export, keep `-e` and run `scripts\u002Frepair_png.py` (see Post-export PNG repair). SVG\u002FPDF unaffected.\n- `-s` — scale: `1`, `2`, `3` (2 recommended for PNG)\n- `-o` — output file path; accepts any directory (e.g. `.\u002Fartifacts\u002Fdiagram.drawio.png`) — `mkdir -p` the target dir first. Use `.drawio.png` double extension when embedding.\n- `-b` — border width around diagram (default: 0, recommend 10)\n- `-t` — transparent background (PNG only)\n- `--page-index 0` — export specific page (default: all)\n\n### Browser fallback (no CLI needed)\n\nWhen the draw.io desktop CLI is unavailable, generate a client-side viewer URL:\n\n```bash\npython3 \u003Cthis-skill-dir>\u002Fscripts\u002Fencode_drawio_url.py input.drawio\n```\n\nPrints a `https:\u002F\u002Fviewer.diagrams.net\u002F...` URL with the diagram XML deflate-compressed and base64-encoded into the URL fragment. The fragment (after `#`) is never sent to the server, so nothing is uploaded — the diagram opens client-side for viewing and editing. Useful when the user cannot install the desktop app.\n\n### Fallback chain\n\nWhen tools are unavailable, degrade gracefully:\n\n| Scenario | Behavior |\n|----------|----------|\n| draw.io CLI missing, Python available | Use browser fallback (diagrams.net URL) |\n| draw.io CLI missing, Python missing | Generate `.drawio` XML only; instruct user to open in draw.io desktop or diagrams.net manually |\n| draw.io CLI crashes \u002F no output in macOS sandbox isolation | Treat CLI as unavailable in-sandbox; use browser fallback \u002F XML-only; ask user to run CLI exports in a non-sandboxed host environment |\n| Vision unavailable for self-check | Skip self-check (step 5); proceed directly to showing user the exported PNG |\n| Export fails (Chromium\u002Fdisplay issues) | On Linux, retry with `xvfb-run -a`; if still failing, deliver `.drawio` XML and suggest manual export |\n| Export fails on Linux server (headless) | Try in order: (1) `xvfb-run -a`, (2) append `--no-sandbox` at the very end if root, (3) add `--disable-gpu`, (4) `export HOME=\u002Ftmp`, (5) install apt deps (`libgtk-3-0 libnotify4 libnss3 libgbm1 libasound2t64` etc.), (6) fall back to [tomkludy\u002Fdrawio-renderer](https:\u002F\u002Fhub.docker.com\u002Fr\u002Ftomkludy\u002Fdrawio-renderer) Docker (REST API for headless export) |\n\n### Checking if draw.io is in PATH\n\n```bash\n# Try short command first\nif command -v draw.io &>\u002Fdev\u002Fnull; then\n  DRAWIO=\"draw.io\"\nelif [ -f \"\u002FApplications\u002Fdraw.io.app\u002FContents\u002FMacOS\u002Fdraw.io\" ]; then\n  DRAWIO=\"\u002FApplications\u002Fdraw.io.app\u002FContents\u002FMacOS\u002Fdraw.io\"\nelse\n  echo \"draw.io not found — install from https:\u002F\u002Fgithub.com\u002Fjgraph\u002Fdrawio-desktop\u002Freleases\"\nfi\n```\n\n## Common Mistakes\n\nWhen something looks wrong (export fails, vision rejects a PNG, layout broken, edges misroute), see `references\u002Ftroubleshooting.md` for a row-by-row mistake → fix table.\n\n## Diagram Type Presets\n\nWhen the user requests a specific diagram type, read `references\u002Fdiagram-types.md` for the matching preset (shapes, edges, layout direction). Pick by user phrasing:\n\n| User says | Section in `references\u002Fdiagram-types.md` |\n|---|---|\n| \"ER diagram\", \"schema diagram\", \"data model\" | ERD |\n| \"UML class diagram\", \"class diagram\" | UML Class |\n| \"sequence diagram\", \"interaction diagram\", \"lifeline\" | Sequence |\n| \"architecture\", \"system diagram\", \"service diagram\" | Architecture |\n| \"neural network\", \"model architecture\", \"ML diagram\", \"deep learning\" | ML \u002F Deep Learning Model |\n| \"flowchart\", \"decision tree\", \"process flow\" | Flowchart |\n\nThe diagram-type preset sets **structural** style keywords. If a user style preset is also active (see `## Style Presets`), keep the structural keywords and layer color\u002Ffont\u002Fedge\u002Fextras on top — read `references\u002Fstyle-presets.md` → \"Interaction with diagram-type presets\" for the merge rules.\n","# Draw.io Diagrams\n\n## Overview\n\nGenerate `.drawio` XML files and export to PNG\u002FSVG\u002FPDF\u002FJPG locally using the native draw.io desktop app CLI.\n\n**Supported formats:** PNG, SVG, PDF, JPG — no browser automation needed.\n\nPNG, SVG, and PDF exports support `--embed-diagram` (`-e`) — the exported file contains the full diagram XML, so opening it in draw.io recovers the editable diagram. Use double extensions (`name.drawio.png`) to signal embedded XML.\n\n## Bundled resources\n\nWhen the workflow references one of these, read it on demand — none of them need to be in context up front.\n\n| File | Read it when |\n|---|---|\n| `references\u002Fdiagram-types.md` | The user names a specific diagram type (ERD, UML class, sequence, architecture, ML\u002FDL, flowchart) |\n| `references\u002Fstyle-presets.md` | The user asks to learn \u002F save \u002F list \u002F set-default \u002F delete a style preset, or you've resolved an active preset and need the application rules |\n| `references\u002Fstyle-extraction.md` | You're inside the Learn flow and need the extraction procedure (called from `style-presets.md`) |\n| `references\u002Ftroubleshooting.md` | An export fails, vision rejects a PNG, or a rendering looks wrong |\n| `scripts\u002Frepair_png.py` | After every `-e` PNG export — fixes draw.io's truncated IEND chunk (issue #8) |\n| `scripts\u002Fencode_drawio_url.py` | The CLI is unavailable and you need a browser-fallback diagrams.net URL |\n\n## Prerequisites\n\nThe draw.io desktop app must be installed and the CLI accessible:\n\n**macOS sandbox \u002F sandbox isolation note (e.g., codex.app):** In some sandboxed macOS environments, invoking the draw.io desktop CLI (even `draw.io --version`) can crash the draw.io process or produce no output. If that happens, treat the CLI as **unavailable in this sandbox isolation** — do not keep retrying inside the sandbox. Prefer a **non-sandboxed host environment** (outside sandbox isolation) for any CLI export work, or use the browser fallback \u002F XML-only outputs.\n\n```bash\n# macOS (Homebrew — recommended; CLI binary is `drawio`, not `draw.io`)\nbrew install --cask drawio\ndrawio --version\n\n# macOS (full path if not in PATH)\n\u002FApplications\u002Fdraw.io.app\u002FContents\u002FMacOS\u002Fdraw.io --version\n\n# Windows\n\"C:\\Program Files\\draw.io\\draw.io.exe\" --version\n\n# Linux\ndraw.io --version\n```\n\nInstall draw.io desktop if missing:\n- macOS: `brew install --cask drawio` or download from https:\u002F\u002Fgithub.com\u002Fjgraph\u002Fdrawio-desktop\u002Freleases\n- Windows: download installer from https:\u002F\u002Fgithub.com\u002Fjgraph\u002Fdrawio-desktop\u002Freleases\n- Linux: download `.deb`\u002F`.rpm` from https:\u002F\u002Fgithub.com\u002Fjgraph\u002Fdrawio-desktop\u002Freleases — **do not use snap** (AppArmor sandbox denies secrets\u002Fkeyring on servers, causes crash)\n\n## Workflow\n\nBefore starting the workflow, assess whether the user's request is specific enough. If key details are missing, ask 1-3 focused questions:\n- **Diagram type** — which preset? (ERD, UML, Sequence, Architecture, ML\u002FDL, Flowchart, or general)\n- **Output format** — PNG (default), SVG, PDF, or JPG?\n- **Output location** — default is the user's working dir; honor any explicit path the user gives (e.g. \"put it in `.\u002Fartifacts\u002F`\"). Don't ask if they didn't mention one.\n- **Scope\u002Ffidelity** — how many components? Any specific technologies or labels?\n\nSkip clarification if the request already specifies these details or is clearly simple (e.g., \"draw a flowchart of X\").\n\n**Step 0 — Resolve active preset.** Determine which (if any) user-defined style preset applies to this generation.\n\n- Scan the user's message for a phrase that clearly names a style preset: \"use my `\u003Cname>` style\", \"with my `\u003Cname>` style\", \"in `\u003Cname>` mode\", \"in the style of `\u003Cname>`\". A bare `with \u003Cname>` does **not** count — \"draw a diagram with redis\" names a component, not a style. If a clear match is found → active preset = `\u003Cname>`.\n- Else, check `~\u002F.drawio-skill\u002Fstyles\u002F` for any file with `\"default\": true`. If found → active preset = that one.\n- Else → no preset active; fall through to the built-in color\u002Fshape\u002Fedge conventions for the rest of the workflow.\n\nLoad the preset JSON from `~\u002F.drawio-skill\u002Fstyles\u002F\u003Cname>.json`, falling back to `\u003Cthis-skill-dir>\u002Fstyles\u002Fbuilt-in\u002F\u003Cname>.json`. If the named preset exists in neither location, tell the user the name is unknown, list the available presets (user dir + built-in), and stop — do **not** silently fall back to defaults.\n\nWhen a preset loads successfully, mention it in the first line of the reply: *\"Using preset `\u003Cname>` (confidence: `\u003Clevel>`).\"* See the **Applying a preset** subsection below for how the preset changes color\u002Fshape\u002Fedge\u002Ffont decisions.\n\n1. **Check deps** — verify `draw.io --version` succeeds; note platform for correct CLI path\n2. **Plan** — identify shapes, relationships, layout (LR or TB), group by tier\u002Flayer\n3. **Generate** — write `.drawio` XML file to disk. Default output dir is the user's working dir; if the user specified an output path or directory (e.g. `.\u002Fartifacts\u002F`, `docs\u002Fimages\u002F`), use that instead — `mkdir -p` the target dir first. Apply the same dir choice to PNG\u002FSVG\u002FPDF exports in steps 4 and 7.\n4. **Export draft** — run CLI to produce a preview PNG. **Do NOT pass `-e`** at this step — the embedded `zTXt mxGraphModel` chunk it adds causes vision APIs (Claude included) to return 400 \"Could not process image\" in step 5. Save the clean preview as `\u003Cname>.png` (single extension). Embedding is for the final export only (step 7).\n5. **Self-check** — use the agent's built-in vision capability to read the exported PNG, catch obvious issues, auto-fix before showing user (requires a vision-enabled model such as Claude Sonnet\u002FOpus). If reading the PNG returns a 400 \u002F \"Could not process image\" error, you almost certainly exported with `-e` by mistake — re-export without `-e` and retry once. If it still fails, skip self-check and continue to step 6.\n6. **Review loop** — show image to user, collect feedback, apply targeted XML edits, re-export, repeat until approved\n7. **Final export** — re-export the approved version to all requested formats. Use `-e` here (PNG\u002FSVG\u002FPDF) so the deliverable stays editable in draw.io; save as `\u003Cname>.drawio.png` to signal embedded XML. **For PNG with `-e`, run `python3 \u003Cthis-skill-dir>\u002Fscripts\u002Frepair_png.py \u003Cname>.drawio.png` immediately after** — draw.io's CLI truncates the IEND chunk in `-e` PNG output (8 bytes missing), producing a corrupt file that vision APIs and strict PNG decoders reject (issue #8). Report file paths.\n\n**If `draw.io --version` crashes or prints nothing (common in restricted macOS sandbox isolation like codex.app):**\n- Do not keep retrying CLI invocations inside the sandbox.\n- Skip steps 4, 5, 6, and 7 (CLI export + PNG-based review) and use **Browser fallback** (`scripts\u002Fencode_drawio_url.py`) or deliver the `.drawio` XML only.\n- If the user needs PNG\u002FSVG\u002FPDF outputs, ask them to run the export commands in a **non-sandboxed host environment** (outside sandbox isolation) and share the resulting files.\n\nEscalation rule:\n- If the binary exists on PATH (or known app path exists) but execution fails with abnormal exit, empty output, Electron startup failure, display\u002Fsession error, or likely sandbox restriction, prefer one escalated retry before falling back.\n- If the binary is missing entirely, do not escalate just to search more aggressively; go to install guidance or fallback.\n\n### Step 5: Self-Check\n\nAfter exporting the draft PNG, use the agent's vision capability (e.g., Claude's image input) to read the image and check for these issues before showing the user. If the agent does not support vision, skip self-check and show the PNG directly.\n\n**Important:** the draft PNG read here must have been exported **without** `-e`. Draw.io's `-e` flag emits a PNG with a truncated IEND chunk (8 bytes of type+CRC missing) that the Anthropic vision API rejects with 400 \"Could not process image\" (issue #8). The simplest fix for the preview step is to skip `-e` entirely; the final export in step 7 keeps `-e` and runs the repair snippet. If you see the 400 error here, re-export without `-e` and retry once; if it still fails (any other reason), skip self-check and proceed to step 6.\n\n| Check | What to look for | Auto-fix action |\n|-------|-----------------|-----------------|\n| Overlapping shapes | Two or more shapes stacked on top of each other | Shift shapes apart by ≥200px |\n| Clipped labels | Text cut off at shape boundaries | Increase shape width\u002Fheight to fit label |\n| Missing connections | Arrows that don't visually connect to shapes | Verify `source`\u002F`target` ids match existing cells |\n| Off-canvas shapes | Shapes at negative coordinates or far from the main group | Move to positive coordinates near the cluster |\n| Edge-shape overlap | An edge\u002Farrow visually crosses through an unrelated shape | Add waypoints (`\u003CArray as=\"points\">`) to route around the shape, or increase spacing between shapes |\n| Stacked edges | Multiple edges overlap each other on the same path | Distribute entry\u002Fexit points across the shape perimeter (use different exitX\u002FentryX values) |\n\n- Max **2 self-check rounds** — if issues remain after 2 fixes, show the user anyway\n- Re-export after each fix and re-read the new PNG\n\n### Step 6: Review Loop\n\nAfter self-check, show the exported image and ask the user for feedback.\n\n**Targeted edit rules** — for each type of feedback, apply the minimal XML change:\n\n| User request | XML edit action |\n|-------------|----------------|\n| Change color of X | Find `mxCell` by `value` matching X, update `fillColor`\u002F`strokeColor` in `style` |\n| Add a new node | Append a new `mxCell` vertex with next available `id`, position near related nodes |\n| Remove a node | Delete the `mxCell` vertex and any edges with matching `source`\u002F`target` |\n| Move shape X | Update `x`\u002F`y` in the `mxGeometry` of the matching `mxCell` |\n| Resize shape X | Update `width`\u002F`height` in the `mxGeometry` of the matching `mxCell` |\n| Add arrow from A to B | Append a new `mxCell` edge with `source`\u002F`target` matching A and B ids |\n| Change label text | Update the `value` attribute of the matching `mxCell` |\n| Change layout direction | **Full regeneration** — rebuild XML with new orientation |\n\n**Rules:**\n- For single-element changes: edit existing XML in place — preserves layout tuning from prior iterations\n- For layout-wide changes (e.g., swap LR↔TB, \"start over\"): regenerate full XML\n- Overwrite the same `{name}.png` (no `-e`) each iteration — do not create `v1`, `v2`, `v3` files. `-e` is reserved for the final export in step 7.\n- After applying edits, re-export and show the updated image\n- Loop continues until user says approved \u002F done \u002F LGTM\n- **Safety valve:** after 5 iteration rounds, suggest the user open the `.drawio` file in draw.io desktop for fine-grained adjustments\n\n### Step 7: Final Export\n\nOnce the user approves:\n- Export to all requested formats (PNG, SVG, PDF, JPG) — default to PNG if not specified\n- Report file paths for both the `.drawio` source file and exported image(s)\n- **Auto-launch:** offer to open the `.drawio` file in draw.io desktop for fine-tuning — `open diagram.drawio` (macOS), `xdg-open` (Linux), `start` (Windows)\n- Confirm files are saved and ready to use\n\n## Style Presets\n\nA **style preset** is a named JSON file capturing a user's visual preferences (palette, shapes, font, edges). When active, it fully replaces the built-in color\u002Fshape conventions in this skill.\n\n**Lookup order** when SKILL.md's step 0.5 resolves a preset name:\n1. `~\u002F.drawio-skill\u002Fstyles\u002F\u003Cname>.json` — user presets (survive `git pull`)\n2. `\u003Cthis-skill-dir>\u002Fstyles\u002Fbuilt-in\u002F\u003Cname>.json` — shipped built-ins (`default`, `corporate`, `handdrawn`)\n\nAlways lowercase the user-provided name before any file operation — the schema enforces lowercase.\n\n**For everything else — Learn flow (extracting a preset from a file), management ops (list\u002Fdefault\u002Fdelete\u002Frename), application rules (color lookup, shape keywords, edges, fonts, extras, interaction with diagram-type presets), and validation — read `references\u002Fstyle-presets.md`.** It's only needed when the user invokes those flows or when an active preset must be applied to the current generation.\n\n## Draw.io XML Structure\n\n### File skeleton\n\n```xml\n\u003C?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\u003Cmxfile host=\"drawio\" version=\"26.0.0\">\n  \u003Cdiagram name=\"Page-1\">\n    \u003CmxGraphModel>\n      \u003Croot>\n        \u003CmxCell id=\"0\" \u002F>\n        \u003CmxCell id=\"1\" parent=\"0\" \u002F>\n        \u003C!-- user shapes start at id=\"2\" -->\n      \u003C\u002Froot>\n    \u003C\u002FmxGraphModel>\n  \u003C\u002Fdiagram>\n\u003C\u002Fmxfile>\n```\n\n**Rules:**\n- `id=\"0\"` and `id=\"1\"` are required root cells — never omit them\n- User shapes start at `id=\"2\"` and increment sequentially\n- All shapes have `parent=\"1\"` (unless inside a container — then use container's id)\n- All text uses `html=1` in style for proper rendering\n- **Never use `--` inside XML comments** — it's illegal per XML spec and causes parse errors\n- Escape special characters in attribute values: `&amp;`, `&lt;`, `&gt;`, `&quot;`\n- **Multi-line text in labels:** use `&#xa;` for line breaks inside `value` attributes (not literal `\\n`). Example: `value=\"Line 1&#xa;Line 2\"`\n\n### Shape types (vertex)\n\n| Style keyword | Use for |\n|--------------|---------|\n| `rounded=0` | plain rectangle (default) |\n| `rounded=1` | rounded rectangle — services, modules |\n| `ellipse;` | circles\u002Fovals — start\u002Fend, databases |\n| `rhombus;` | diamond — decision points |\n| `shape=mxgraph.aws4.resourceIcon;` | AWS icons |\n| `shape=cylinder3;` | cylinder — databases |\n| `swimlane;` | group\u002Fcontainer with title bar |\n\n### Required properties\n\n```xml\n\u003C!-- Rectangle \u002F rounded box -->\n\u003CmxCell id=\"2\" value=\"Label\" style=\"rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;\" vertex=\"1\" parent=\"1\">\n  \u003CmxGeometry x=\"100\" y=\"100\" width=\"160\" height=\"60\" as=\"geometry\" \u002F>\n\u003C\u002FmxCell>\n\n\u003C!-- Cylinder (database) -->\n\u003CmxCell id=\"3\" value=\"DB\" style=\"shape=cylinder3;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;fontColor=#333333;\" vertex=\"1\" parent=\"1\">\n  \u003CmxGeometry x=\"350\" y=\"100\" width=\"120\" height=\"80\" as=\"geometry\" \u002F>\n\u003C\u002FmxCell>\n\n\u003C!-- Diamond (decision) -->\n\u003CmxCell id=\"4\" value=\"Check?\" style=\"rhombus;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;\" vertex=\"1\" parent=\"1\">\n  \u003CmxGeometry x=\"100\" y=\"220\" width=\"160\" height=\"80\" as=\"geometry\" \u002F>\n\u003C\u002FmxCell>\n```\n\n### Containers and groups\n\nFor architecture diagrams with nested elements, use draw.io's parent-child containment — do **not** just place shapes on top of larger shapes.\n\n| Type | Style | When to use |\n|------|-------|-------------|\n| **Group** (invisible) | `group;pointerEvents=0;` | No visual border needed, container has no connections |\n| **Swimlane** (titled) | `swimlane;startSize=30;` | Container needs a visible title bar, or container itself has connections |\n| **Custom container** | Add `container=1;pointerEvents=0;` to any shape | Any shape acting as a container without its own connections |\n\n**Key rules:**\n- Add `pointerEvents=0;` to container styles that should not capture connections between children\n- Children set `parent=\"containerId\"` and use coordinates **relative to the container**\n\n```xml\n\u003C!-- Swimlane container -->\n\u003CmxCell id=\"svc1\" value=\"User Service\" style=\"swimlane;startSize=30;fillColor=#dae8fc;strokeColor=#6c8ebf;\" vertex=\"1\" parent=\"1\">\n  \u003CmxGeometry x=\"100\" y=\"100\" width=\"300\" height=\"200\" as=\"geometry\"\u002F>\n\u003C\u002FmxCell>\n\u003C!-- Child inside container — coordinates relative to parent -->\n\u003CmxCell id=\"api1\" value=\"REST API\" style=\"rounded=1;whiteSpace=wrap;html=1;\" vertex=\"1\" parent=\"svc1\">\n  \u003CmxGeometry x=\"20\" y=\"40\" width=\"120\" height=\"60\" as=\"geometry\"\u002F>\n\u003C\u002FmxCell>\n\u003CmxCell id=\"db1\" value=\"Database\" style=\"shape=cylinder3;whiteSpace=wrap;html=1;\" vertex=\"1\" parent=\"svc1\">\n  \u003CmxGeometry x=\"160\" y=\"40\" width=\"120\" height=\"60\" as=\"geometry\"\u002F>\n\u003C\u002FmxCell>\n```\n\n### Connector (edge)\n\n**CRITICAL:** Every edge `mxCell` must contain a `\u003CmxGeometry relative=\"1\" as=\"geometry\" \u002F>` child element. Self-closing edge cells (`\u003CmxCell ... edge=\"1\" ... \u002F>`) are **invalid** and will not render. Always use the expanded form.\n\n```xml\n\u003C!-- Directed arrow — always include rounded, orthogonalLoop, jettySize for clean routing -->\n\u003CmxCell id=\"10\" value=\"\" style=\"edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;\" edge=\"1\" parent=\"1\" source=\"2\" target=\"3\">\n  \u003CmxGeometry relative=\"1\" as=\"geometry\" \u002F>\n\u003C\u002FmxCell>\n\n\u003C!-- Arrow with label + explicit entry\u002Fexit points to control direction -->\n\u003CmxCell id=\"11\" value=\"HTTP\u002FREST\" style=\"edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;\" edge=\"1\" parent=\"1\" source=\"2\" target=\"4\">\n  \u003CmxGeometry relative=\"1\" as=\"geometry\" \u002F>\n\u003C\u002FmxCell>\n\n\u003C!-- Arrow with waypoints — use when edge must route around other shapes -->\n\u003CmxCell id=\"12\" value=\"\" style=\"edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;\" edge=\"1\" parent=\"1\" source=\"3\" target=\"5\">\n  \u003CmxGeometry relative=\"1\" as=\"geometry\">\n    \u003CArray as=\"points\">\n      \u003CmxPoint x=\"500\" y=\"50\" \u002F>\n    \u003C\u002FArray>\n  \u003C\u002FmxGeometry>\n\u003C\u002FmxCell>\n```\n\n**Edge style rules:**\n- **Animated connectors:** add `flowAnimation=1;` to any edge style to show a moving dot animation along the arrow. Works in SVG export and draw.io desktop — ideal for data-flow and pipeline diagrams. Example: `style=\"edgeStyle=orthogonalEdgeStyle;flowAnimation=1;rounded=1;...\"`\n- **Always** include `rounded=1;orthogonalLoop=1;jettySize=auto` — these enable smart routing that avoids overlaps\n- Pin `exitX\u002FexitY\u002FentryX\u002FentryY` on every edge when a node has 2+ connections — distributes lines across the shape perimeter\n- Add `\u003CArray as=\"points\">` waypoints when an edge must detour around an intermediate shape\n- **Leave room for arrowheads:** the final straight segment between the last bend and the target shape must be ≥20px long. If too short, the arrowhead overlaps the bend and looks broken. Fix by increasing node spacing or adding explicit waypoints\n\n### Distributing connections on a shape\n\nWhen multiple edges connect to the same shape, assign different entry\u002Fexit points to prevent stacking:\n\n| Position | exitX\u002FentryX | exitY\u002FentryY | Use when |\n|----------|-------------|-------------|----------|\n| Top center | 0.5 | 0 | connecting to node above |\n| Top-left | 0.25 | 0 | 2nd connection from top |\n| Top-right | 0.75 | 0 | 3rd connection from top |\n| Right center | 1 | 0.5 | connecting to node on right |\n| Bottom center | 0.5 | 1 | connecting to node below |\n| Left center | 0 | 0.5 | connecting to node on left |\n\n**Rule:** if a shape has N connections on one side, space them evenly (e.g., 3 connections on bottom → exitX = 0.25, 0.5, 0.75)\n\n### Color palette (fillColor \u002F strokeColor)\n\n*Used only when no preset is active (see \"Applying a preset\" above).*\n\n| Color name | fillColor | strokeColor | Use for |\n|-----------|-----------|-------------|---------|\n| Blue | `#dae8fc` | `#6c8ebf` | services, clients |\n| Green | `#d5e8d4` | `#82b366` | success, databases |\n| Yellow | `#fff2cc` | `#d6b656` | queues, decisions |\n| Orange | `#ffe6cc` | `#d79b00` | gateways, APIs |\n| Red\u002FPink | `#f8cecc` | `#b85450` | errors, alerts |\n| Grey | `#f5f5f5` | `#666666` | external\u002Fneutral |\n| Purple | `#e1d5e7` | `#9673a6` | security, auth |\n\n### Layout tips\n\n**Spacing — scale with complexity:**\n\n| Diagram complexity | Nodes | Horizontal gap | Vertical gap |\n|-------------------|-------|----------------|--------------|\n| Simple | ≤5 | 200px | 150px |\n| Medium | 6–10 | 280px | 200px |\n| Complex | >10 | 350px | 250px |\n\n**Routing corridors:** between shape rows\u002Fcolumns, leave an extra ~80px empty corridor where edges can route without crossing shapes. Never place a shape in a gap that edges need to traverse.\n\n**Grid alignment:** snap all `x`, `y`, `width`, `height` values to **multiples of 10** — this ensures shapes align cleanly on draw.io's default grid and makes manual editing easier.\n\n**General rules:**\n- Plan a grid before assigning x\u002Fy coordinates — sketch node positions on paper\u002Fmentally first\n- Group related nodes in the same horizontal or vertical band\n- Use `swimlane` cells for logical grouping with visible borders\n- Place heavily-connected \"hub\" nodes centrally so edges radiate outward instead of crossing\n- To force straight vertical connections, pin entry\u002Fexit points explicitly on edges:\n  `exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0`\n- Always center-align a child node under its parent (same center x) to avoid diagonal routing\n- **Event bus pattern**: place Kafka\u002Fbus nodes in the **center of the service row**, not below — services on either side can reach it with short horizontal arrows (`exitX=1` left side, `exitX=0` right side), eliminating all line crossings\n- Horizontal connections (`exitX=1` or `exitX=0`) never cross vertical nodes in the same row; use them for peer-to-peer and publish connections\n\n**Avoiding edge-shape overlap:**\n- Before finalizing coordinates, trace each edge path mentally — if it must cross an unrelated shape, either move the shape or add waypoints\n- For tree\u002Fhierarchical layouts: assign nodes to layers (rows), connect only between adjacent layers to minimize crossings\n- For star\u002Fhub layouts: place the hub center, satellites around it — edges stay short and radial\n- When an edge must span multiple rows\u002Fcolumns, route it along the outer corridor, not through the middle of the diagram\n\n## Export\n\n### Commands\n\nThere are **two** export modes:\n\n- **Preview \u002F self-check** (step 4 of the workflow) — no `-e`. Output `diagram.png`. Required for vision self-check; using `-e` here triggers a 400 \"Could not process image\" error from the vision API (issue #8).\n- **Final \u002F deliverable** (step 7) — pass `-e`. Output `diagram.drawio.png`. The embedded XML keeps the file editable in draw.io.\n\n```bash\n# Preview PNG (use this in step 4, before self-check) — NO -e\ndraw.io -x -f png -s 2 -o diagram.png input.drawio\n\n# Final PNG (step 7, after user approval) — WITH -e, double extension\ndraw.io -x -f png -e -s 2 -o diagram.drawio.png input.drawio\n\n# macOS — full path (if not in PATH); preview \u002F final variants\n\u002FApplications\u002Fdraw.io.app\u002FContents\u002FMacOS\u002Fdraw.io -x -f png -s 2 -o diagram.png input.drawio\n\u002FApplications\u002Fdraw.io.app\u002FContents\u002FMacOS\u002Fdraw.io -x -f png -e -s 2 -o diagram.drawio.png input.drawio\n\n# Windows\n\"C:\\Program Files\\draw.io\\draw.io.exe\" -x -f png -e -s 2 -o diagram.drawio.png input.drawio\n\n# Linux (headless — requires xvfb-run; on servers add HOME and --disable-gpu)\nexport HOME=${HOME:-\u002Ftmp}\nxvfb-run -a --server-args=\"-screen 0 1280x1024x24\" \\\n  draw.io -x -f png -e -s 2 -o diagram.drawio.png input.drawio --disable-gpu\n# Running as root (CI \u002F Docker)? Append --no-sandbox AT THE END (placing it earlier makes drawio treat it as the input filename)\n\n# SVG export (final — -e is safe; SVG is text)\ndraw.io -x -f svg -e -o diagram.svg input.drawio\n\n# PDF export (final)\ndraw.io -x -f pdf -e -o diagram.pdf input.drawio\n\n# Custom output directory (e.g. CI artifacts dir) — create if missing, then export there\nmkdir -p .\u002Fartifacts && draw.io -x -f png -e -s 2 -o .\u002Fartifacts\u002Fdiagram.drawio.png input.drawio\n```\n\n### Post-export PNG repair (required after `-e` PNG export)\n\ndraw.io CLI truncates the IEND chunk when emitting `-e` PNGs — the file ends with the 4-byte IEND length field but the `IEND` type + CRC (8 bytes) are missing. Result: vision APIs return 400 \"Could not process image\" and strict PNG decoders error out. SVG\u002FPDF are unaffected.\n\nRun this immediately after every `-e` PNG export:\n\n```bash\npython3 \u003Cthis-skill-dir>\u002Fscripts\u002Frepair_png.py diagram.drawio.png\n```\n\nThe script's `endswith(IEND)` guard makes it a no-op once draw.io fixes the bug upstream — safe to run unconditionally.\n\n**Key flags:**\n- `-x` — export mode (required)\n- `-f` — format: `png`, `svg`, `pdf`, `jpg`\n- `-e` — embed diagram XML in output (PNG, SVG, PDF) — exported file remains editable in draw.io. **Skip for the preview PNG used in step 5 self-check** — `-e` PNGs have a truncated IEND chunk that vision APIs reject (issue #8). For final PNG export, keep `-e` and run `scripts\u002Frepair_png.py` (see Post-export PNG repair). SVG\u002FPDF unaffected.\n- `-s` — scale: `1`, `2`, `3` (2 recommended for PNG)\n- `-o` — output file path; accepts any directory (e.g. `.\u002Fartifacts\u002Fdiagram.drawio.png`) — `mkdir -p` the target dir first. Use `.drawio.png` double extension when embedding.\n- `-b` — border width around diagram (default: 0, recommend 10)\n- `-t` — transparent background (PNG only)\n- `--page-index 0` — export specific page (default: all)\n\n### Browser fallback (no CLI needed)\n\nWhen the draw.io desktop CLI is unavailable, generate a client-side viewer URL:\n\n```bash\npython3 \u003Cthis-skill-dir>\u002Fscripts\u002Fencode_drawio_url.py input.drawio\n```\n\nPrints a `https:\u002F\u002Fviewer.diagrams.net\u002F...` URL with the diagram XML deflate-compressed and base64-encoded into the URL fragment. The fragment (after `#`) is never sent to the server, so nothing is uploaded — the diagram opens client-side for viewing and editing. Useful when the user cannot install the desktop app.\n\n### Fallback chain\n\nWhen tools are unavailable, degrade gracefully:\n\n| Scenario | Behavior |\n|----------|----------|\n| draw.io CLI missing, Python available | Use browser fallback (diagrams.net URL) |\n| draw.io CLI missing, Python missing | Generate `.drawio` XML only; instruct user to open in draw.io desktop or diagrams.net manually |\n| draw.io CLI crashes \u002F no output in macOS sandbox isolation | Treat CLI as unavailable in-sandbox; use browser fallback \u002F XML-only; ask user to run CLI exports in a non-sandboxed host environment |\n| Vision unavailable for self-check | Skip self-check (step 5); proceed directly to showing user the exported PNG |\n| Export fails (Chromium\u002Fdisplay issues) | On Linux, retry with `xvfb-run -a`; if still failing, deliver `.drawio` XML and suggest manual export |\n| Export fails on Linux server (headless) | Try in order: (1) `xvfb-run -a`, (2) append `--no-sandbox` at the very end if root, (3) add `--disable-gpu`, (4) `export HOME=\u002Ftmp`, (5) install apt deps (`libgtk-3-0 libnotify4 libnss3 libgbm1 libasound2t64` etc.), (6) fall back to [tomkludy\u002Fdrawio-renderer](https:\u002F\u002Fhub.docker.com\u002Fr\u002Ftomkludy\u002Fdrawio-renderer) Docker (REST API for headless export) |\n\n### Checking if draw.io is in PATH\n\n```bash\n# Try short command first\nif command -v draw.io &>\u002Fdev\u002Fnull; then\n  DRAWIO=\"draw.io\"\nelif [ -f \"\u002FApplications\u002Fdraw.io.app\u002FContents\u002FMacOS\u002Fdraw.io\" ]; then\n  DRAWIO=\"\u002FApplications\u002Fdraw.io.app\u002FContents\u002FMacOS\u002Fdraw.io\"\nelse\n  echo \"draw.io not found — install from https:\u002F\u002Fgithub.com\u002Fjgraph\u002Fdrawio-desktop\u002Freleases\"\nfi\n```\n\n## Common Mistakes\n\nWhen something looks wrong (export fails, vision rejects a PNG, layout broken, edges misroute), see `references\u002Ftroubleshooting.md` for a row-by-row mistake → fix table.\n\n## Diagram Type Presets\n\nWhen the user requests a specific diagram type, read `references\u002Fdiagram-types.md` for the matching preset (shapes, edges, layout direction). Pick by user phrasing:\n\n| User says | Section in `references\u002Fdiagram-types.md` |\n|---|---|\n| \"ER diagram\", \"schema diagram\", \"data model\" | ERD |\n| \"UML class diagram\", \"class diagram\" | UML Class |\n| \"sequence diagram\", \"interaction diagram\", \"lifeline\" | Sequence |\n| \"architecture\", \"system diagram\", \"service diagram\" | Architecture |\n| \"neural network\", \"model architecture\", \"ML diagram\", \"deep learning\" | ML \u002F Deep Learning Model |\n| \"flowchart\", \"decision tree\", \"process flow\" | Flowchart |\n\nThe diagram-type preset sets **structural** style keywords. If a user style preset is also active (see `## Style Presets`), keep the structural keywords and layer color\u002Ffont\u002Fedge\u002Fextras on top — read `references\u002Fstyle-presets.md` → \"Interaction with diagram-type presets\" for the merge rules.\n",{"name":5,"license":15,"version":52,"homepage":53,"metadata":54,"platforms":80,"description":7,"compatibility":83},"1.5.2","https:\u002F\u002Fgithub.com\u002FAgents365-ai\u002Fdrawio-skill",{"author":55,"hermes":56,"version":52,"openclaw":65},"Agents365-ai",{"tags":57,"category":46,"related_skills":59,"requires_tools":63},[28,42,41,43,40,58],"uml",[60,61,62],"mermaid","excalidraw","plantuml",[64],"draw.io",{"os":66,"emoji":70,"install":71,"requires":78},[67,68,69],"darwin","linux","win32","?",[72],{"id":73,"os":74,"bins":75,"kind":76,"label":77,"formula":28},"brew-drawio",[67],[64],"brew","Install draw.io via Homebrew",{"anyBins":79},[64,28],[81,68,82],"macos","windows","Requires draw.io desktop app CLI on PATH (macOS\u002FLinux\u002FWindows). Self-check step requires a vision-enabled model (e.g., Claude Sonnet\u002FOpus); gracefully skipped if unavailable.","main","820a8ecb416e59312ffc2b60c29b66eaf5aa27a4",".codex\u002Fskills\u002Fdrawio-skill","https:\u002F\u002Fgithub.com\u002Fasushiroo\u002Fdotfiles","https:\u002F\u002Fgithub.com\u002Fasushiroo","2026-10-02 15:40:43",{"source":8,"skillName":5,"commands":91,"prompt":101,"zipAvailable":102},[92,95,98],{"tool":93,"command":94},"npx","npx skills add asushiroo\u002Fdotfiles --skill drawio-skill",{"tool":96,"command":97},"bunx","bunx skills add asushiroo\u002Fdotfiles --skill drawio-skill",{"tool":99,"command":100},"pnpm","pnpm dlx skills add asushiroo\u002Fdotfiles --skill drawio-skill","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fasushiroo\u002Fdotfiles\u002Fblob\u002Fmain\u002F.codex\u002Fskills\u002Fdrawio-skill\u002FSKILL.md",true,[104,110,114,118,122,128,132,136,140,144],{"path":105,"resourceType":106,"resourceTypeDesc":107,"sizeBytes":108,"sourceHtmlUrl":109},"references\u002Fdiagram-types.md","REFERENCE","参考文档",5702,"https:\u002F\u002Fgithub.com\u002Fasushiroo\u002Fdotfiles\u002Fblob\u002Fmain\u002F.codex\u002Fskills\u002Fdrawio-skill\u002Freferences\u002Fdiagram-types.md",{"path":111,"resourceType":106,"resourceTypeDesc":107,"sizeBytes":112,"sourceHtmlUrl":113},"references\u002Fstyle-extraction.md",17263,"https:\u002F\u002Fgithub.com\u002Fasushiroo\u002Fdotfiles\u002Fblob\u002Fmain\u002F.codex\u002Fskills\u002Fdrawio-skill\u002Freferences\u002Fstyle-extraction.md",{"path":115,"resourceType":106,"resourceTypeDesc":107,"sizeBytes":116,"sourceHtmlUrl":117},"references\u002Fstyle-presets.md",9874,"https:\u002F\u002Fgithub.com\u002Fasushiroo\u002Fdotfiles\u002Fblob\u002Fmain\u002F.codex\u002Fskills\u002Fdrawio-skill\u002Freferences\u002Fstyle-presets.md",{"path":119,"resourceType":106,"resourceTypeDesc":107,"sizeBytes":120,"sourceHtmlUrl":121},"references\u002Ftroubleshooting.md",2532,"https:\u002F\u002Fgithub.com\u002Fasushiroo\u002Fdotfiles\u002Fblob\u002Fmain\u002F.codex\u002Fskills\u002Fdrawio-skill\u002Freferences\u002Ftroubleshooting.md",{"path":123,"resourceType":124,"resourceTypeDesc":125,"sizeBytes":126,"sourceHtmlUrl":127},"scripts\u002Fencode_drawio_url.py","SCRIPT","脚本",1158,"https:\u002F\u002Fgithub.com\u002Fasushiroo\u002Fdotfiles\u002Fblob\u002Fmain\u002F.codex\u002Fskills\u002Fdrawio-skill\u002Fscripts\u002Fencode_drawio_url.py",{"path":129,"resourceType":124,"resourceTypeDesc":125,"sizeBytes":130,"sourceHtmlUrl":131},"scripts\u002Frepair_png.py",1097,"https:\u002F\u002Fgithub.com\u002Fasushiroo\u002Fdotfiles\u002Fblob\u002Fmain\u002F.codex\u002Fskills\u002Fdrawio-skill\u002Fscripts\u002Frepair_png.py",{"path":133,"resourceType":106,"resourceTypeDesc":107,"sizeBytes":134,"sourceHtmlUrl":135},"styles\u002Fbuilt-in\u002Fcorporate.json",1471,"https:\u002F\u002Fgithub.com\u002Fasushiroo\u002Fdotfiles\u002Fblob\u002Fmain\u002F.codex\u002Fskills\u002Fdrawio-skill\u002Fstyles\u002Fbuilt-in\u002Fcorporate.json",{"path":137,"resourceType":106,"resourceTypeDesc":107,"sizeBytes":138,"sourceHtmlUrl":139},"styles\u002Fbuilt-in\u002Fdefault.json",1454,"https:\u002F\u002Fgithub.com\u002Fasushiroo\u002Fdotfiles\u002Fblob\u002Fmain\u002F.codex\u002Fskills\u002Fdrawio-skill\u002Fstyles\u002Fbuilt-in\u002Fdefault.json",{"path":141,"resourceType":106,"resourceTypeDesc":107,"sizeBytes":142,"sourceHtmlUrl":143},"styles\u002Fbuilt-in\u002Fhanddrawn.json",1474,"https:\u002F\u002Fgithub.com\u002Fasushiroo\u002Fdotfiles\u002Fblob\u002Fmain\u002F.codex\u002Fskills\u002Fdrawio-skill\u002Fstyles\u002Fbuilt-in\u002Fhanddrawn.json",{"path":145,"resourceType":106,"resourceTypeDesc":107,"sizeBytes":146,"sourceHtmlUrl":147},"styles\u002Fschema.json",3949,"https:\u002F\u002Fgithub.com\u002Fasushiroo\u002Fdotfiles\u002Fblob\u002Fmain\u002F.codex\u002Fskills\u002Fdrawio-skill\u002Fstyles\u002Fschema.json",[149,171,187,200,214,237],{"skillNo":150,"name":151,"nameZh":6,"description":152,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":153,"categories":154,"keywords":163,"publishedAt":47},"01M6P7AB02738RGKB9RM8QHCA5","writing-shape","Writing, exploit — shape raw material into an article, paragraph by paragraph.","https:\u002F\u002Fgithub.com\u002Fasushiroo\u002Fdotfiles\u002Fblob\u002Fmain\u002F.codex\u002Fskills\u002Fwriting-shape\u002FSKILL.md",[155,158],{"categoryNo":156,"categoryName":157,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000018","写作与文案",{"categoryNo":159,"categoryName":160,"taxonomyType":161,"taxonomyTypeDesc":162},"01JBSEEDCAT000000000000036","内容创作者","PROFESSION","适用职业",[164,165,166,167,168,169,170],"shape","writing shape","writing","exploit","article","material","true",{"skillNo":172,"name":173,"nameZh":6,"description":174,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":175,"categories":176,"keywords":179,"publishedAt":47},"01M6P7A81YB2M6P1V7C0BC5YP9","writing-great-skills","Reference for writing and editing skills well — the vocabulary and principles that make a skill predictable.","https:\u002F\u002Fgithub.com\u002Fasushiroo\u002Fdotfiles\u002Fblob\u002Fmain\u002F.codex\u002Fskills\u002Fwriting-great-skills\u002FSKILL.md",[177,178],{"categoryNo":156,"categoryName":157,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":159,"categoryName":160,"taxonomyType":161,"taxonomyTypeDesc":162},[166,180,181,182,183,184,185,170,186],"writing great skills","editing","reference","vocabulary","make","principles","for",{"skillNo":188,"name":189,"nameZh":6,"description":190,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":191,"categories":192,"keywords":195,"publishedAt":47},"01M6P7A57S23PPT7MY9E9E08AB","writing-fragments","Writing, explore — mine raw fragments, no structure yet.","https:\u002F\u002Fgithub.com\u002Fasushiroo\u002Fdotfiles\u002Fblob\u002Fmain\u002F.codex\u002Fskills\u002Fwriting-fragments\u002FSKILL.md",[193,194],{"categoryNo":156,"categoryName":157,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":159,"categoryName":160,"taxonomyType":161,"taxonomyTypeDesc":162},[196,166,197,198,199,170],"writing fragments","mine","explore","structure",{"skillNo":201,"name":202,"nameZh":6,"description":203,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":204,"categories":205,"keywords":208,"publishedAt":47},"01M6P7A2S5VH0PPWAJTBBH6987","writing-beats","Writing, exploit — assemble raw material into a journey of beats, grounding each term before a beat leans on it.","https:\u002F\u002Fgithub.com\u002Fasushiroo\u002Fdotfiles\u002Fblob\u002Fmain\u002F.codex\u002Fskills\u002Fwriting-beats\u002FSKILL.md",[206,207],{"categoryNo":156,"categoryName":157,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":159,"categoryName":160,"taxonomyType":161,"taxonomyTypeDesc":162},[166,209,167,170,210,211,169,212,213],"writing beats","grounding","it","journey","assemble",{"skillNo":215,"name":216,"nameZh":6,"description":217,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":218,"categories":219,"keywords":220,"publishedAt":47},"01M6P79J16SAK6T4CF0RDN62W6","wizard","Generate an interactive bash wizard that walks a human through a manual procedure — third-party setup, a one-off migration, an A→B state transition — opening URLs, capturing values, confirming each step, and writing .env files and GitHub Actions secrets.","https:\u002F\u002Fgithub.com\u002Fasushiroo\u002Fdotfiles\u002Fblob\u002Fmain\u002F.codex\u002Fskills\u002Fwizard\u002FSKILL.md",[],[216,221,222,223,224,225,226,227,228,36,229,230,231,232,170,233,234,235,236,166],"transition","party","values","manual","github actions","env","third-party","human","migration","interactive","Bash","secrets","actions","state","generate","github",{"skillNo":238,"name":239,"nameZh":6,"description":240,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":241,"categories":242,"keywords":243,"publishedAt":47},"01M6P79EMS5ZYR75Z3WJBZGG9P","wayfinder","Plan a huge chunk of work — more than one agent session can hold — as a shared map of decision tickets on your issue tracker, and resolve them one at a time until the way to the destination is clear.","https:\u002F\u002Fgithub.com\u002Fasushiroo\u002Fdotfiles\u002Fblob\u002Fmain\u002F.codex\u002Fskills\u002Fwayfinder\u002FSKILL.md",[],[239,244,245,246,247,248,249,250,251,252,170,253,254,255,256,257,258,259,260,261],"tracker","more","issue tracker","tickets","clear","as","shared","time","map","issue","session","one at a time","work","decision","plan","chunk","at","can"]