/dapr-skills:create-diagramfrom dapr-skills
Draws Dapr architecture diagrams in the docs.dapr.io style as SVG (and optional PNGs). Sets up a diagram-as-code engine in the project.
Ships in dapr-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
This skill draws a Dapr diagram as code and exports it to an SVG (and, with Chromium, PNGs) in the user's project. It copies a small engine into a diagrams/ folder, you write one scene file per diagram, and the exporter renders it. The design rules and the layout method are in REFERENCE.md, the engine API in API.md, and specialised topics in topics/. This file is only the workflow.
<skill dir> is the directory that contains this SKILL.md. Relative paths in this file, such as scripts/setup.mjs, resolve from there. <diagramsDir> is the folder you set up below, diagrams by default. Run every command from the project root, because a relative <diagramsDir> resolves against the current directory. Remember the absolute path of the setup.mjs you run: you need it again for refreshes.
Check before creating any file:
node --version. If it is older or missing, tell the user and stop.diagrams, unless the user names another one.node <skill dir>/scripts/setup.mjs <diagramsDir> and act on the exit code:
--refresh. Scenes and out/ are not touched.--with-browser. On no, you get SVG only. Do not ask again.
@playwright/test 1.56.1 package (about 13 MB) goes into the diagrams folder. The Chromium browser (about 150 MB) downloads once to the per-user Playwright cache and is shared by every project.fsevents). Ignore them. Setup prints "Chromium ready" when it worked.fonts-liberation package.@playwright/test, the engine may use that one. Its Chromium still has to be downloaded, so --with-browser is still needed unless npx playwright install chromium was already run.--with-browser, then re-export (node "<diagramsDir>/_engine/export.mjs") so the PNGs and bbox.json are produced.Never edit <diagramsDir>/_engine/. Setup replaces it on refresh, so edits are lost.
Work from what the user gave you:
topics/mermaid.md.Confirm that list with the user before drawing, and ask about anything ambiguous. Use docs.dapr.io terms for Dapr concepts (sidecar, building block, component). See Turning a source into a layout.
Always read REFERENCE.md first: Design rules, The scene contract and the Worked example. Open the other files when you need them:
API.md: while writing the code, for every builder's options.examples/: before the first scene, and copy the closest one.topics/mermaid.md: the source is a Mermaid block.topics/matching.md: you are matching an existing picture.topics/api-blocks.md: the diagram shows an HTTP call or a Dapr API block.topics/brand-marks-custom.md: you need a mark that is not built in.topics/slides.md: the diagram is for slides.Then:
<diagramsDir>/scenes/<name>.mjs. The name is lowercase words joined by hyphens, such as order-flow.<diagramsDir>/scenes/index.mjs.node "<diagramsDir>/_engine/export.mjs" --only <name> (or without --only for every scene).--check fails on it. Only a machine with Chromium can clear that line, so tell the user instead of editing out/ or bbox.json by hand.fonts-liberation and export again.<diagramsDir>/out/<name>-light.png and <name>-dark.png if they exist. A transparent dark PNG looks washed out on a white viewer, so judge it as if on a dark background; if you cannot view it on one, ask the user to check it on a dark slide. Without PNGs you cannot view the result yourself: ask the user to open <diagramsDir>/out/<name>.svg in a browser, in light and in dark mode, and confirm it looks right.node "<diagramsDir>/_engine/measure-labels.mjs" <name> (needs Chromium). It prints every label's box in scene units.out/ belongs to the exporter. Never put a hand-made file there.
You MUST run this and fix every failure it reports:
node "<diagramsDir>/_engine/export.mjs" --check
It renders and validates every scene and fails if a file in out/ is out of date.
<diagramsDir>/
_engine/ # copied by setup, do not edit
.gitattributes # keeps SVGs LF and PNGs binary in git
.gitignore # ignores node_modules/ (Playwright)
scenes/
index.mjs # registry
<name>.mjs # one scene per diagram
out/
<name>.svg # light and dark in one file
<name>-light.png, <name>-dark.png # only with Chromium
Tell the user, briefly:
<diagramsDir>/out/<name>.svg and, if made, the two PNGs.<name>-light.png on a light background and <name>-dark.png on a dark one.node "<diagramsDir>/_engine/export.mjs", with the real folder name.setup.mjs you used, as node <that path> <diagramsDir> --refresh. If you no longer have it, tell the user to ask you to refresh the diagram engine. Do not show the placeholder <skill dir> to the user.API.md (opens in a new tab)REFERENCE.md (opens in a new tab)engine/LICENSE-APACHE-2.0 (opens in a new tab)engine/NOTICE (opens in a new tab)engine/VERSION (opens in a new tab)engine/apis.mjs (opens in a new tab)engine/app.mjs (opens in a new tab)engine/brands.mjs (opens in a new tab)engine/browser.mjs (opens in a new tab)engine/cards.mjs (opens in a new tab)engine/engine.mjs (opens in a new tab)engine/export.mjs (opens in a new tab)engine/flow.mjs (opens in a new tab)engine/font-guard.mjs (opens in a new tab)engine/fonts/OFL-Geist.txt (opens in a new tab)engine/fonts/OFL-Inter.txt (opens in a new tab)engine/fonts/geist-400.woff2 (opens in a new tab)engine/fonts/geist-500.woff2 (opens in a new tab)engine/fonts/geist-600.woff2 (opens in a new tab)engine/fonts/geist-700.woff2 (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
33 skills in this plugin
/add-pubsub-dotnetAdds Dapr pub/sub to an existing .NET (ASP.NET Core, plain or Aspire) project. Edits only after you approve a plan. Use for "add pub/sub to my .NET project" or "subscribe this ASP.NET app to a topic". For a new project use create-pubsub-dotnet./add-pubsub-pythonAdds Dapr pub/sub to an existing Python FastAPI app. Edits only after you approve a plan. Use for "add pub/sub to my FastAPI app" or "make this Python service subscribe to a Dapr topic". For a new app use create-pubsub-python./add-workflow-dotnetAdds Dapr Workflow, activities and management endpoints to an existing .NET (ASP.NET Core, plain or Aspire) project after you approve a plan. Use for "add a workflow to my .NET project" or "make this process a durable workflow". For a new project use create-workflow-dotnet. For Diagrid use the diagrid plugin.npx claudepluginhub diagrid-labs/dapr-skills --plugin dapr-skillsOther plugins' skills for the same job