[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71GQ0FATACNYY5VKXMPRXZK":3,"skill-same:01M71GQ0FATACNYY5VKXMPRXZK":82},{"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":18,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":53,"commitSha":54,"skillDirectory":55,"forksCount":56,"repositoryHtmlUrl":57,"repositoryHomepageUrl":6,"ownerHtmlUrl":58,"ownerBlogUrl":59,"ownerDescription":60,"updatedAt":61,"install":62,"resources":75},"01M71GQ0FATACNYY5VKXMPRXZK","diagram",null,"Render Mermaid to self-contained HTML, SVG, PNG and an Excalidraw scene; no diagram toolchain.","timurgaleev\u002Fvibestack","timurgaleev","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F32696429?v=4","01M71GMS53Z9B4JQTCQEFXAE9E","Timur Galeev","01M71GMS5S1Q7BEYB3Z7GY3E85",8,"MIT","https:\u002F\u002Fgithub.com\u002Ftimurgaleev\u002Fvibestack\u002Fblob\u002Fmain\u002Fskills\u002Fdiagram\u002FSKILL.md",[],[5,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"png","draw","render mermaid","mermaid diagram","SVG","toolchain","visualize","as","make","graph","html","write","read","excalidraw","mermaid","flowchart","self","Bash","render","2026-11-10 10:12:30",false,"---\nname: diagram\ndescription: |\n  Render Mermaid to self-contained HTML, SVG, PNG and an Excalidraw scene; no diagram toolchain.\nallowed-tools:\n  - Bash\n  - Read\n  - Write\ntriggers:\n  - draw a diagram\n  - make a mermaid diagram\n  - render this flowchart\n  - diagram this\n  - visualize this as a graph\n---\n\nIf this session was compacted, the copy of this skill in context may be cut off.\nRead `${CLAUDE_SKILL_DIR}\u002FSKILL.md` from disk and resume at the step you are on.\n\n## When to invoke\n\nUse to turn a description or some Mermaid source into a picture — \"draw a\ndiagram\", \"make a flowchart\", \"diagram this architecture\", \"visualize this as a\ngraph\".\n\n# \u002Fdiagram — Render a Mermaid diagram\n\nvibestack renders **Mermaid** offline. The repo ships the whole renderer as one\nself-contained page (`lib\u002Fdiagram-render\u002Fdist\u002Fdiagram-render.html`, mermaid\npinned at build time), so the browse shim turns your source into SVG with no\nnetwork at all. The SVG is inlined into the HTML artifact you keep — it opens in\nany browser, on any machine, forever, with nothing to fetch — and the PNG comes\nfrom the same `$B` you already use for QA. The same page also converts the\nsource into an editable `.excalidraw` scene.\n\n{{include lib\u002Fsnippets\u002Fbrowse-setup.md}}\n\n### 1. Get the Mermaid source\n\nIf the user gave Mermaid, use it. Otherwise write it from their description\n(`flowchart`, `sequenceDiagram`, `erDiagram`, `classDiagram`, `gantt`, etc.).\n\nAuthoring rules, all in service of one thing — a diagram nobody can read is\nworse than a paragraph:\n\n- **Direction follows the subject.** `graph LR` for pipelines and flows, where\n  the eye should travel with the data; `graph TD` for hierarchies and\n  decompositions, where depth is the point.\n- **5-15 nodes is the readable range.** Keep labels to a few words. If the ask\n  genuinely needs more, split it into two diagrams along a seam the reader\n  already understands (one per subsystem, or overview plus detail) rather than\n  shrinking everything to fit.\n- **Say what the arrows mean** when a graph mixes kinds of edge — a call, a\n  data flow and a deploy step look identical otherwise.\n\nThen pick an output base path. In a git repo, default to a diagram directory\nthe repo already uses (or `docs\u002F`) with a slug from the diagram's subject, so\nthe artifacts land somewhere tracked and stop overwriting each other. Outside a\nrepo, default to `.\u002Fdiagram`. Confirm the path with the user if the diagram is\none they will commit.\n\nWrite the Mermaid source to `$OUT.mmd` with the Write tool. Passing it through a\nheredoc mangles quotes and backslashes in edge labels, and it is the artifact the\nuser edits to re-render anyway.\n\n### 2. Render the source to SVG with the offline bundle\n\nThe staged copy is content-addressed, so concurrent sessions and mixed vibestack\nversions never clobber each other:\n\n```bash\nB='\u003CBROWSE_BIN>'\nOUT=\"${OUT:-.\u002Fdiagram}\"            # base path; produces $OUT.mmd\u002F.svg\u002F.html\u002F.png\u002F.excalidraw\nmkdir -p \"$(dirname \"$OUT\")\"\necho \"OUT: $OUT\"\n\n# The renderer is linked into this skill's own directory at install time\n# (skills\u002Fdiagram\u002Frenderer -> lib\u002Fdiagram-render), so it resolves the same way\n# in a user-scope install, a project-scope install, and the checkout itself.\nBUNDLE=\"\"\nfor c in \"${CLAUDE_SKILL_DIR:-$HOME\u002F.claude\u002Fskills\u002Fdiagram}\u002Frenderer\u002Fdist\u002Fdiagram-render.html\" \\\n         \"$(git rev-parse --show-toplevel 2>\u002Fdev\u002Fnull)\u002Flib\u002Fdiagram-render\u002Fdist\u002Fdiagram-render.html\"; do\n  [ -f \"$c\" ] && BUNDLE=\"$c\" && break\ndone\nif [ -z \"$BUNDLE\" ] || [ -z \"${B:-}\" ] || [ \"$(\"$B\" status 2>\u002Fdev\u002Fnull)\" = \"BROWSE_NOT_AVAILABLE\" ]; then\n  echo \"RENDER_UNAVAILABLE\"\nelse\n  SHA=$(shasum -a 256 \"$BUNDLE\" | cut -c1-16)\n  # A shared temp dir is writable by others: stage in a dir only this user owns,\n  # and reuse a staged copy only when its hash still matches the bundle.\n  STAGE_DIR=\"${TMPDIR:-\u002Ftmp}\u002Fvibestack-diagram-$(id -u)\"\n  mkdir -p -m 700 \"$STAGE_DIR\" 2>\u002Fdev\u002Fnull\n  { [ -O \"$STAGE_DIR\" ] && [ ! -L \"$STAGE_DIR\" ] && chmod 700 \"$STAGE_DIR\"; } || STAGE_DIR=$(mktemp -d)\n  STAGED=\"$STAGE_DIR\u002Fdiagram-render-$SHA.html\"\n  if [ ! -f \"$STAGED\" ] || [ \"$(shasum -a 256 \"$STAGED\" | cut -c1-16)\" != \"$SHA\" ]; then\n    (umask 077; cp \"$BUNDLE\" \"$STAGED.$$\") && mv -f \"$STAGED.$$\" \"$STAGED\"\n  fi\n  TAB=$(\"$B\" newtab --json | sed -n 's\u002F.*\"tabId\":[[:space:]]*\\([0-9]*\\).*\u002F\\1\u002Fp')\n  [ -z \"$TAB\" ] && { echo \"TAB_OPEN_FAILED — daemon busy? check browse status\"; } || {\n    \"$B\" load-html \"$STAGED\" --tab-id \"$TAB\"\n    \"$B\" wait '#done' --tab-id \"$TAB\"\n    echo \"RENDER_TAB_READY: tab $TAB\"\n    echo \"TAB: $TAB\"\n  }\nfi\n```\n\n**Both failure lines are terminal — STOP, do not continue to Step 3.** With no\n`$TAB` and no `$OUT.svg`, the steps below would build an HTML file around a\nfile that does not exist and screenshot a blank page, reporting success. On\n`RENDER_UNAVAILABLE`, say which half is missing. A missing bundle means an\nincomplete checkout — re-run `.\u002Finstall` from it. A missing shim means the\nbrowse dependencies were never fetched; `$B status` bootstraps them on first\nuse and prints `BROWSE_NOT_AVAILABLE` when it cannot (npm absent). On\n`TAB_OPEN_FAILED`, report what `$B status` says — the daemon is busy, wedged,\nor unable to open a tab — and re-run.\n\nEvery `$B js` \u002F `$B wait` \u002F `$B closetab` below MUST pass `--tab-id $TAB`. Without\nit the call hits whatever tab is active, which may be a live `\u002Fqa` or `\u002Fscrape`\nsession sharing the daemon.\n\nRender the source, reading it from disk inside the page call so no shell quoting\ntouches the Mermaid text. The blocks below start from fresh shells: replace\n`\u003COUT>` and `\u003CTAB>` with the values the render block printed on its `OUT:` and\n`TAB:` lines.\n\n```bash\nB='\u003CBROWSE_BIN>'\nOUT='\u003COUT>'\nTAB='\u003CTAB>'\nSRC=$(python3 -I -c 'import json,sys; print(json.dumps(open(sys.argv[1]).read()))' \"$OUT.mmd\")\n\"$B\" js \"__renderMermaid('diagram-1', $SRC)\" --tab-id \"$TAB\" --out \"$OUT.svg\"\n\"$B\" js \"__mermaidToExcalidraw($SRC)\" --tab-id \"$TAB\" --out \"$OUT.excalidraw\"\n\"$B\" closetab \"$TAB\" >\u002Fdev\u002Fnull 2>&1 || true\n```\n\nIf the first call errors, the Mermaid has a syntax problem — read the error, fix\n`$OUT.mmd`, and re-render. If only the scene call errors, keep the SVG and\nreport the scene as not produced; it is a bonus artifact, not a gate. Do not fall back to a CDN page: rendering is offline\nby design, and a silent network fallback turns an air-gapped failure into a\nblank diagram nobody notices.\n\n#### Re-render an edited scene\n\nWhen the user edits `$OUT.excalidraw` (excalidraw.com, the VS Code extension)\nand wants the picture back, open a render tab exactly as above and swap the\nrender block for the scene call, then continue with Step 3:\n\n```bash\nB='\u003CBROWSE_BIN>'\nOUT='\u003COUT>'\nTAB='\u003CTAB>'\n\"$B\" js \"__excalidrawToSvg($(python3 -I -c 'import json,sys; print(json.dumps(open(sys.argv[1]).read()))' \"$OUT.excalidraw\"))\" \\\n  --tab-id \"$TAB\" --out \"$OUT.svg\"\n\"$B\" closetab \"$TAB\" >\u002Fdev\u002Fnull 2>&1 || true\n```\n\nImage elements render only from the scene's own embedded `files`; an image that\npoints at a URL stays blank, because the page never fetches. Flowcharts convert\nshape by shape; a diagram type the converter does not support comes back as one\nimage element, so the scene opens but is not editable piece by piece — say so\nwhen it happens.\n\n### 3. Inline the SVG into the HTML artifact, then screenshot it\n\n```bash\nB='\u003CBROWSE_BIN>'\nOUT='\u003COUT>'\n{\n  printf '%s' '\u003C!DOCTYPE html>\u003Chtml>\u003Chead>\u003Cmeta charset=\"utf-8\">\u003Ctitle>Diagram\u003C\u002Ftitle>'\n  printf '%s' '\u003Cstyle>body{margin:0;padding:20px;background:#fff;font-family:system-ui}svg{max-width:100%}\u003C\u002Fstyle>'\n  printf '%s' '\u003C\u002Fhead>\u003Cbody>'\n  cat \"$OUT.svg\"\n  printf '%s' '\u003C\u002Fbody>\u003C\u002Fhtml>'\n} > \"$OUT.html\"\n\nif [ -n \"${B:-}\" ] && [ \"$(\"$B\" status 2>\u002Fdev\u002Fnull)\" != \"BROWSE_NOT_AVAILABLE\" ]; then\n  # The tab verbs above need the full daemon, so this chain uses its single\n  # pipe-separated argument; the shim's one-argument-per-step form would run\n  # only the goto here.\n  \"$B\" chain \"goto \\\"file:\u002F\u002F$(cd \"$(dirname \"$OUT\")\" && pwd)\u002F$(basename \"$OUT\").html\\\" | wait --load | screenshot \\\"$OUT.png\\\"\"\n  echo \"DIAGRAM: $OUT.png (and $OUT.html, $OUT.svg, $OUT.mmd, $OUT.excalidraw)\"\nelse\n  echo \"DIAGRAM_HTML_ONLY: $OUT.html — open it in a browser (no shim for PNG)\"\nfi\n```\n\nThe SVG is already drawn, so the capture waits on page load rather than on a\nfixed timer — nothing is still rendering when the screenshot fires.\n\n### 4. Report\n\nList the artifacts: `.mmd` (the source to edit), `.svg` (vector for docs),\n`.html` (opens anywhere, offline), `.png` (for chat and READMEs), `.excalidraw`\n(a scene to hand-edit, then re-render as above).\n\n## Notes\n\n- **Mermaid is the source format.** The Excalidraw scene is derived from it and\n  can be edited and re-rendered here; DOCX and multi-page exports are not — hand\n  the user the HTML or use a dedicated tool.\n- **Fully offline.** The renderer is vendored in the repo, and the HTML artifact\n  carries the finished SVG inline — no CDN, no network, at render time or later.\n- **PDF-bound diagrams belong to `\u002Fmake-pdf`.** It renders a ```` ```mermaid ````\n  fence as a vector figure inside the document, which beats pasting this skill's\n  PNG into a page. Say so when the user's real target is a PDF.\n- If `RENDER_UNAVAILABLE` printed, say what is missing and how to get it back\n  (`.\u002Finstall` from the checkout for the bundle; `$B status` to bootstrap the\n  browse dependencies). Never fall back to a CDN behind the user's back.\n\n{{include lib\u002Fsnippets\u002Fcapture-learnings.md}}\n","If this session was compacted, the copy of this skill in context may be cut off.\nRead `${CLAUDE_SKILL_DIR}\u002FSKILL.md` from disk and resume at the step you are on.\n\n## When to invoke\n\nUse to turn a description or some Mermaid source into a picture — \"draw a\ndiagram\", \"make a flowchart\", \"diagram this architecture\", \"visualize this as a\ngraph\".\n\n# \u002Fdiagram — Render a Mermaid diagram\n\nvibestack renders **Mermaid** offline. The repo ships the whole renderer as one\nself-contained page (`lib\u002Fdiagram-render\u002Fdist\u002Fdiagram-render.html`, mermaid\npinned at build time), so the browse shim turns your source into SVG with no\nnetwork at all. The SVG is inlined into the HTML artifact you keep — it opens in\nany browser, on any machine, forever, with nothing to fetch — and the PNG comes\nfrom the same `$B` you already use for QA. The same page also converts the\nsource into an editable `.excalidraw` scene.\n\n{{include lib\u002Fsnippets\u002Fbrowse-setup.md}}\n\n### 1. Get the Mermaid source\n\nIf the user gave Mermaid, use it. Otherwise write it from their description\n(`flowchart`, `sequenceDiagram`, `erDiagram`, `classDiagram`, `gantt`, etc.).\n\nAuthoring rules, all in service of one thing — a diagram nobody can read is\nworse than a paragraph:\n\n- **Direction follows the subject.** `graph LR` for pipelines and flows, where\n  the eye should travel with the data; `graph TD` for hierarchies and\n  decompositions, where depth is the point.\n- **5-15 nodes is the readable range.** Keep labels to a few words. If the ask\n  genuinely needs more, split it into two diagrams along a seam the reader\n  already understands (one per subsystem, or overview plus detail) rather than\n  shrinking everything to fit.\n- **Say what the arrows mean** when a graph mixes kinds of edge — a call, a\n  data flow and a deploy step look identical otherwise.\n\nThen pick an output base path. In a git repo, default to a diagram directory\nthe repo already uses (or `docs\u002F`) with a slug from the diagram's subject, so\nthe artifacts land somewhere tracked and stop overwriting each other. Outside a\nrepo, default to `.\u002Fdiagram`. Confirm the path with the user if the diagram is\none they will commit.\n\nWrite the Mermaid source to `$OUT.mmd` with the Write tool. Passing it through a\nheredoc mangles quotes and backslashes in edge labels, and it is the artifact the\nuser edits to re-render anyway.\n\n### 2. Render the source to SVG with the offline bundle\n\nThe staged copy is content-addressed, so concurrent sessions and mixed vibestack\nversions never clobber each other:\n\n```bash\nB='\u003CBROWSE_BIN>'\nOUT=\"${OUT:-.\u002Fdiagram}\"            # base path; produces $OUT.mmd\u002F.svg\u002F.html\u002F.png\u002F.excalidraw\nmkdir -p \"$(dirname \"$OUT\")\"\necho \"OUT: $OUT\"\n\n# The renderer is linked into this skill's own directory at install time\n# (skills\u002Fdiagram\u002Frenderer -> lib\u002Fdiagram-render), so it resolves the same way\n# in a user-scope install, a project-scope install, and the checkout itself.\nBUNDLE=\"\"\nfor c in \"${CLAUDE_SKILL_DIR:-$HOME\u002F.claude\u002Fskills\u002Fdiagram}\u002Frenderer\u002Fdist\u002Fdiagram-render.html\" \\\n         \"$(git rev-parse --show-toplevel 2>\u002Fdev\u002Fnull)\u002Flib\u002Fdiagram-render\u002Fdist\u002Fdiagram-render.html\"; do\n  [ -f \"$c\" ] && BUNDLE=\"$c\" && break\ndone\nif [ -z \"$BUNDLE\" ] || [ -z \"${B:-}\" ] || [ \"$(\"$B\" status 2>\u002Fdev\u002Fnull)\" = \"BROWSE_NOT_AVAILABLE\" ]; then\n  echo \"RENDER_UNAVAILABLE\"\nelse\n  SHA=$(shasum -a 256 \"$BUNDLE\" | cut -c1-16)\n  # A shared temp dir is writable by others: stage in a dir only this user owns,\n  # and reuse a staged copy only when its hash still matches the bundle.\n  STAGE_DIR=\"${TMPDIR:-\u002Ftmp}\u002Fvibestack-diagram-$(id -u)\"\n  mkdir -p -m 700 \"$STAGE_DIR\" 2>\u002Fdev\u002Fnull\n  { [ -O \"$STAGE_DIR\" ] && [ ! -L \"$STAGE_DIR\" ] && chmod 700 \"$STAGE_DIR\"; } || STAGE_DIR=$(mktemp -d)\n  STAGED=\"$STAGE_DIR\u002Fdiagram-render-$SHA.html\"\n  if [ ! -f \"$STAGED\" ] || [ \"$(shasum -a 256 \"$STAGED\" | cut -c1-16)\" != \"$SHA\" ]; then\n    (umask 077; cp \"$BUNDLE\" \"$STAGED.$$\") && mv -f \"$STAGED.$$\" \"$STAGED\"\n  fi\n  TAB=$(\"$B\" newtab --json | sed -n 's\u002F.*\"tabId\":[[:space:]]*\\([0-9]*\\).*\u002F\\1\u002Fp')\n  [ -z \"$TAB\" ] && { echo \"TAB_OPEN_FAILED — daemon busy? check browse status\"; } || {\n    \"$B\" load-html \"$STAGED\" --tab-id \"$TAB\"\n    \"$B\" wait '#done' --tab-id \"$TAB\"\n    echo \"RENDER_TAB_READY: tab $TAB\"\n    echo \"TAB: $TAB\"\n  }\nfi\n```\n\n**Both failure lines are terminal — STOP, do not continue to Step 3.** With no\n`$TAB` and no `$OUT.svg`, the steps below would build an HTML file around a\nfile that does not exist and screenshot a blank page, reporting success. On\n`RENDER_UNAVAILABLE`, say which half is missing. A missing bundle means an\nincomplete checkout — re-run `.\u002Finstall` from it. A missing shim means the\nbrowse dependencies were never fetched; `$B status` bootstraps them on first\nuse and prints `BROWSE_NOT_AVAILABLE` when it cannot (npm absent). On\n`TAB_OPEN_FAILED`, report what `$B status` says — the daemon is busy, wedged,\nor unable to open a tab — and re-run.\n\nEvery `$B js` \u002F `$B wait` \u002F `$B closetab` below MUST pass `--tab-id $TAB`. Without\nit the call hits whatever tab is active, which may be a live `\u002Fqa` or `\u002Fscrape`\nsession sharing the daemon.\n\nRender the source, reading it from disk inside the page call so no shell quoting\ntouches the Mermaid text. The blocks below start from fresh shells: replace\n`\u003COUT>` and `\u003CTAB>` with the values the render block printed on its `OUT:` and\n`TAB:` lines.\n\n```bash\nB='\u003CBROWSE_BIN>'\nOUT='\u003COUT>'\nTAB='\u003CTAB>'\nSRC=$(python3 -I -c 'import json,sys; print(json.dumps(open(sys.argv[1]).read()))' \"$OUT.mmd\")\n\"$B\" js \"__renderMermaid('diagram-1', $SRC)\" --tab-id \"$TAB\" --out \"$OUT.svg\"\n\"$B\" js \"__mermaidToExcalidraw($SRC)\" --tab-id \"$TAB\" --out \"$OUT.excalidraw\"\n\"$B\" closetab \"$TAB\" >\u002Fdev\u002Fnull 2>&1 || true\n```\n\nIf the first call errors, the Mermaid has a syntax problem — read the error, fix\n`$OUT.mmd`, and re-render. If only the scene call errors, keep the SVG and\nreport the scene as not produced; it is a bonus artifact, not a gate. Do not fall back to a CDN page: rendering is offline\nby design, and a silent network fallback turns an air-gapped failure into a\nblank diagram nobody notices.\n\n#### Re-render an edited scene\n\nWhen the user edits `$OUT.excalidraw` (excalidraw.com, the VS Code extension)\nand wants the picture back, open a render tab exactly as above and swap the\nrender block for the scene call, then continue with Step 3:\n\n```bash\nB='\u003CBROWSE_BIN>'\nOUT='\u003COUT>'\nTAB='\u003CTAB>'\n\"$B\" js \"__excalidrawToSvg($(python3 -I -c 'import json,sys; print(json.dumps(open(sys.argv[1]).read()))' \"$OUT.excalidraw\"))\" \\\n  --tab-id \"$TAB\" --out \"$OUT.svg\"\n\"$B\" closetab \"$TAB\" >\u002Fdev\u002Fnull 2>&1 || true\n```\n\nImage elements render only from the scene's own embedded `files`; an image that\npoints at a URL stays blank, because the page never fetches. Flowcharts convert\nshape by shape; a diagram type the converter does not support comes back as one\nimage element, so the scene opens but is not editable piece by piece — say so\nwhen it happens.\n\n### 3. Inline the SVG into the HTML artifact, then screenshot it\n\n```bash\nB='\u003CBROWSE_BIN>'\nOUT='\u003COUT>'\n{\n  printf '%s' '\u003C!DOCTYPE html>\u003Chtml>\u003Chead>\u003Cmeta charset=\"utf-8\">\u003Ctitle>Diagram\u003C\u002Ftitle>'\n  printf '%s' '\u003Cstyle>body{margin:0;padding:20px;background:#fff;font-family:system-ui}svg{max-width:100%}\u003C\u002Fstyle>'\n  printf '%s' '\u003C\u002Fhead>\u003Cbody>'\n  cat \"$OUT.svg\"\n  printf '%s' '\u003C\u002Fbody>\u003C\u002Fhtml>'\n} > \"$OUT.html\"\n\nif [ -n \"${B:-}\" ] && [ \"$(\"$B\" status 2>\u002Fdev\u002Fnull)\" != \"BROWSE_NOT_AVAILABLE\" ]; then\n  # The tab verbs above need the full daemon, so this chain uses its single\n  # pipe-separated argument; the shim's one-argument-per-step form would run\n  # only the goto here.\n  \"$B\" chain \"goto \\\"file:\u002F\u002F$(cd \"$(dirname \"$OUT\")\" && pwd)\u002F$(basename \"$OUT\").html\\\" | wait --load | screenshot \\\"$OUT.png\\\"\"\n  echo \"DIAGRAM: $OUT.png (and $OUT.html, $OUT.svg, $OUT.mmd, $OUT.excalidraw)\"\nelse\n  echo \"DIAGRAM_HTML_ONLY: $OUT.html — open it in a browser (no shim for PNG)\"\nfi\n```\n\nThe SVG is already drawn, so the capture waits on page load rather than on a\nfixed timer — nothing is still rendering when the screenshot fires.\n\n### 4. Report\n\nList the artifacts: `.mmd` (the source to edit), `.svg` (vector for docs),\n`.html` (opens anywhere, offline), `.png` (for chat and READMEs), `.excalidraw`\n(a scene to hand-edit, then re-render as above).\n\n## Notes\n\n- **Mermaid is the source format.** The Excalidraw scene is derived from it and\n  can be edited and re-rendered here; DOCX and multi-page exports are not — hand\n  the user the HTML or use a dedicated tool.\n- **Fully offline.** The renderer is vendored in the repo, and the HTML artifact\n  carries the finished SVG inline — no CDN, no network, at render time or later.\n- **PDF-bound diagrams belong to `\u002Fmake-pdf`.** It renders a ```` ```mermaid ````\n  fence as a vector figure inside the document, which beats pasting this skill's\n  PNG into a page. Say so when the user's real target is a PDF.\n- If `RENDER_UNAVAILABLE` printed, say what is missing and how to get it back\n  (`.\u002Finstall` from the checkout for the bundle; `$B status` to bootstrap the\n  browse dependencies). Never fall back to a CDN behind the user's back.\n\n{{include lib\u002Fsnippets\u002Fcapture-learnings.md}}\n",{"name":5,"triggers":43,"description":49,"allowed-tools":50},[44,45,46,47,48],"draw a diagram","make a mermaid diagram","render this flowchart","diagram this","visualize this as a graph","Render Mermaid to self-contained HTML, SVG, PNG and an Excalidraw scene; no diagram toolchain.\n",[36,51,52],"Read","Write","main","777ec643a83c17a0955856b2eb7f596601709fda","skills\u002Fdiagram",0,"https:\u002F\u002Fgithub.com\u002Ftimurgaleev\u002Fvibestack","https:\u002F\u002Fgithub.com\u002Ftimurgaleev","https:\u002F\u002Ftgaleev.com\u002F","Forward Deployed Engineer \u002F\r\nAWS Community Builder \u002F Cloud Architect ","2026-11-11 15:42:25",{"source":8,"skillName":5,"commands":63,"prompt":73,"zipAvailable":74},[64,67,70],{"tool":65,"command":66},"npx","npx skills add timurgaleev\u002Fvibestack --skill diagram",{"tool":68,"command":69},"bunx","bunx skills add timurgaleev\u002Fvibestack --skill diagram",{"tool":71,"command":72},"pnpm","pnpm dlx skills add timurgaleev\u002Fvibestack --skill diagram","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Ftimurgaleev\u002Fvibestack\u002Fblob\u002Fmain\u002Fskills\u002Fdiagram\u002FSKILL.md",true,[76],{"path":77,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":80,"sourceHtmlUrl":81},"renderer","OTHER","其他",24,"https:\u002F\u002Fgithub.com\u002Ftimurgaleev\u002Fvibestack\u002Fblob\u002Fmain\u002Fskills\u002Fdiagram\u002Frenderer",[83,89,95,101,107,113],{"skillNo":84,"name":85,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":38},"01M71GVHCCSQCCPVM8XPSPTA73","docs","https:\u002F\u002Fgithub.com\u002Ftimurgaleev\u002Fvibestack\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Frender\u002F15-backtick-info-string\u002Fskills\u002Fdocs\u002FSKILL.md",[],[85],{"skillNo":90,"name":91,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":38},"01M71GVFT1S5MRNM0AYRT2E6VQ","fences","https:\u002F\u002Fgithub.com\u002Ftimurgaleev\u002Fvibestack\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Frender\u002F14-indented-tilde-fence\u002Fskills\u002Ffences\u002FSKILL.md",[],[91],{"skillNo":96,"name":97,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":38},"01M71GVEYB54K1S83FGRNKN8CF","dirty","https:\u002F\u002Fgithub.com\u002Ftimurgaleev\u002Fvibestack\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Frender\u002F10-check-with-drift\u002Fskills\u002Fdirty\u002FSKILL.md",[],[97],{"skillNo":102,"name":103,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":38},"01M71GVDX9PMND1337C4388DK4","clean","https:\u002F\u002Fgithub.com\u002Ftimurgaleev\u002Fvibestack\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Frender\u002F09-check-no-drift\u002Fskills\u002Fclean\u002FSKILL.md",[],[103],{"skillNo":108,"name":109,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":38},"01M71GVC3VM66F1ZQT2G8JXDR0","bare","https:\u002F\u002Fgithub.com\u002Ftimurgaleev\u002Fvibestack\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Frender\u002F08-no-frontmatter\u002Fskills\u002Fbare\u002FSKILL.md",[],[109],{"skillNo":114,"name":115,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":38},"01M71GV9T8DAYZT0PX52QX0TE1","idem","https:\u002F\u002Fgithub.com\u002Ftimurgaleev\u002Fvibestack\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Frender\u002F07-idempotent-rerender\u002Fskills\u002Fidem\u002FSKILL.md",[],[115]]