diagram
Skill159 starsChanged 6 months agoMITView on GitHub
Create, validate, update, and render diagram-as-code artifacts with Mermaid-first schema awareness plus PlantUML, Graphviz DOT, and Excalidraw JSON adapters.
We split this skill into the rules it gives an agent
13 rules. 0 are common, 7 are distinctive, and 6 are very specific to this project.
0
Common
Most of the 36 edited versions we read keep these.
7
Distinctive
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 25
Use this skill when the user wants a rendered static diagram, a validated diagram source artifact, or a revision to an existing diagram …
- Distinctive: line 27
Default to Mermaid unless the user asks for another format or the shape is a better fit for another adapter:
- Distinctive: line 36
Use the runtime tools directly:
- Very specific: line 69
Call diagram_validate before rendering when you wrote or revised source manually.
- Very specific: line 70
If validation fails, use the returned errors and suggested_fix, revise once, then validate again.
- Very specific: line 71
Call diagram_create or diagram_update with render_to set to svg by default.
- Distinctive: line 92
Use the canonical header for the selected type.
- Distinctive: line 93
Keep labels short and ASCII-safe unless the user provided exact labels.
- Distinctive: line 95
Avoid unsupported Markdown inside labels.
- Very specific: line 96
Prefer flowchart TD or flowchart LR.
- Distinctive: line 105
Read the existing source artifact when needed.
- Very specific: line 108
Call diagram_update with the complete updated source, original format/type, and desired render_to.
- Very specific: line 110
If the user only asks to annotate a diagram and exact placement does not matter, the tool can add a small update annotation when passed …
“Common” is measured: kept by at least 6 in 10 of the 36 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Diagram
Use this skill when the user wants a rendered static diagram, a validated diagram source artifact, or a revision to an existing diagram source.
Default to Mermaid unless the user asks for another format or the shape is a better fit for another adapter:
- Mermaid: sequence, flowchart, state, ER, class, gantt, git-graph, mindmap, and pie diagrams.
- PlantUML: UML sequence/component/activity/deployment diagrams when the user already uses PlantUML or asks for it.
- Graphviz DOT: topology, dependency graphs, and layouts where rank/direction control matters.
- Excalidraw JSON: hand-drawn-style editable sketches when the user asks for an editable canvas.
Tool Surface
Use the runtime tools directly:
diagram_create: create source, validate it, save source, and optionally render.diagram_update: update existing source or source artifact, validate it, save a new source artifact, and optionally render.diagram_validate: validate source only; do not render.
The tool output includes these fields:
{
"success": true,
"valid": true,
"source": "...",
"source_artifact_ref": "/workspace/.generated-diagrams/skills/diagram/diagram-...",
"rendered_artifact_ref": "/workspace/.generated-diagrams/skills/diagram/diagram-...",
"type": "flowchart",
"format": "mermaid",
"artifacts": [],
"runtime_events": [],
"warnings": []
}On validation failure, success and valid are false and errors plus
suggested_fix may be present. When render_to is "none",
rendered_artifact_ref is null. Invalid source is still saved with
source_artifact_valid: false so the operator can inspect or repair it.
Default Workflow
- Pick the diagram type before writing syntax. If uncertain, set
typetoauto, but prefer an explicit type when the user request clearly names one. - For Mermaid, read references/mermaid-types.md when you need grammar examples or when the diagram type is not obvious.
- Draft complete source yourself when the user needs a specific diagram. Do not rely on the tool's generated starter unless the request is generic.
- Call
diagram_validatebefore rendering when you wrote or revised source manually. - If validation fails, use the returned
errorsandsuggested_fix, revise once, then validate again. Make at most 2 fix-up attempts before surfacing the failure with the invalid source artifact. The runtime also caps automatic pre-render fix-up at 2 attempts. - Call
diagram_createordiagram_updatewithrender_toset tosvgby default. Usepngorpdfonly when requested and the adapter can render that target. - Return the source artifact and rendered artifact paths to the user.
Type Selection
Use these defaults:
| User intent | Type |
| messages, API call flow, actors, request/response | sequence |
| process, decision tree, pipeline, system flow | flowchart |
| lifecycle, status machine, transitions | state |
| database schema, entities, relationships | er |
| classes, interfaces, inheritance, methods | class |
| timeline, schedule, milestones, roadmap | gantt |
| branches, commits, merges, release train | git-graph |
| brainstorm, taxonomy, concept map, outline | mindmap |
| shares, proportions, percentages | pie |
Mermaid Rules
- Use the canonical header for the selected type.
- Keep labels short and ASCII-safe unless the user provided exact labels.
- Quote labels when Mermaid grammar requires it, especially pie chart slices.
- Avoid unsupported Markdown inside labels.
- Prefer
flowchart TDorflowchart LR; do not mix both in one source. - In
sequenceDiagram, define participants when names are long or reused. - In
gantt, includedateFormatand stable task ids when using dependencies. - In
erDiagram, include cardinality on relationships.
Update Rules
For diagram_update, preserve the existing type and format unless the user explicitly asks to convert. When the user gives natural-language update instructions:
- Read the existing source artifact when needed.
- Apply the change to the source yourself.
- Validate the full updated source.
- Call
diagram_updatewith the complete updated source, original format/type, and desiredrender_to.
If the user only asks to annotate a diagram and exact placement does not matter, the tool can add a small update annotation when passed only artifact_ref plus instructions.
Adapter Notes
- Mermaid and Graphviz use local renderers when available. If a renderer is not installed, SVG requests fall back to source-backed SVG artifacts so the operator still gets an embed-ready file.
- Mermaid validation checks the diagram header and, for flowchart, state, and class diagrams, bracket and quote balance. Full syntax checking happens only when
mmdcrenders the source, so re-read the diagram-type grammar before drafting whenmmdcis not installed. - PlantUML rendering uses
HYBRIDCLAW_PLANTUML_SERVER_URLorPLANTUML_SERVER_URLwhen configured. Without a server, SVG requests fall back to source-backed SVG artifacts. Operators are responsible for pointing this setting only at a trusted PlantUML server with appropriate network egress controls. - Excalidraw defaults to
render_to: "none"because JSON is the editable deliverable. Userender_to: "svg"when a static preview is requested; the runtime renders the JSON elements directly to SVG. - Local Mermaid and Graphviz renders use short-lived OS temp directories. Normal tool completion removes them; process-level termination such as SIGKILL may leave temporary source copies for the OS temp cleaner. Diagram render usage is reported as a zero-cost budget hook; LLM tokens are only consumed when the model drafts or repairs source.
Runtime Hooks
Rendered diagrams include a diagram.rendered event in runtime_events.
Validation failures include a diagram.validation_failed event with the
validation errors and source artifact path when one was persisted. Diagram
artifacts are stored under the skill-scoped path
.generated-diagrams/skills/diagram/.
Stakes
Diagram rendering is F8 low stakes: the output is a file artifact the operator chooses to share. Do not treat generated diagrams as authoritative for security, legal, medical, or financial decisions without separate verification.
Other versions45 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 45
- garrytan/gstack★ 138ksame name
- Yeachan-Heo/oh-my-claudecode★ 40ksame name
- Yeachan-Heo/oh-my-claude-sisyphus★ 40ksame name
- Kastalien-Research/thoughtbox★ 64same name
- jantichy/claude★ 40same name
- domengabrovsek/agent-config★ 17same name
- domengabrovsek/claude★ 17same name
- heathdutton/claude-d2-diagrams★ 16same name
- johnlindquist/claude-workshop-skills★ 16same name
- flowing-abyss/obsidian-vault-skills★ 9same name
35 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use benchmark-models, ios-sync and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
ShreyRaviSkillbenchmark-models
Cross-model benchmark for gstack skills. Runs the same prompt through Claude, GPT (via Codex CLI), and Gemini side-by-side — compares latency, tokens, cost, and optionally quality via LLM judge. Answers "which model is actually best for this skill?" with data instead of vibes. Separate from /benchmark, which measures web page performance. Use when: "benchmark models", "compare models", "which model is best for X", "cross-model comparison", "model shootout". (gstack) Voice triggers (speech-to-text aliases): "compare models", "model shootout", "which model is best".
Also in 5 projects that use this
Saqlain-811Skillios-sync
Regenerate the iOS debug bridge against the latest upstream gstack templates. (gstack)
Also in 4 projects that use this
ShreyRaviSkillsetup-gbrain
Set up gbrain for this coding agent: install the CLI, initialize a local PGLite or Supabase brain, register MCP, capture per-remote trust policy. One command from zero to "gbrain is running, and this agent can call it." Use when: "setup gbrain", "connect gbrain", "start gbrain", "install gbrain", "configure gbrain for this machine". (gstack)
Also in 4 projects that use this
Saqlain-811Skillios-clean
Remove the DebugBridge SPM package and all #if DEBUG wiring from an iOS app. (gstack)
Also in 3 projects that use this
seek888Skillopen-gstack-browser
Launch GStack Browser — AI-controlled Chromium with the sidebar extension baked in. Opens a visible browser window where you can watch every action in real time. The sidebar shows a live activity feed and chat. Anti-bot stealth built in. Use when asked to "open gstack browser", "launch browser", "connect chrome", "open chrome", "real browser", "launch chrome", "side panel", or "control my browser". Voice triggers (speech-to-text aliases): "show me the browser".
Also in 4 projects that use this
bastosSkillios-design-review
Review iOS app UI/UX design quality using Apple's design principles and the Liquid Glass-era design language from WWDC25/26. Use when asked for a design review, UX critique, visual design assessment, or evaluation of an app's interface quality, design intent, alignment with the new Apple design system, or usability. Triggers: "design review", "UX review", "visual design critique", "review the UI", "does this design work", "evaluate this interface", "design feedback", "Liquid Glass review".
Also in 3 projects that use this
- +3 more from ShreyRavi
- +2 more from Saqlain-811
In this repository91 other files it gives its agents.
- AGENTS.mdAGENTS.md
- skills/llm-wiki/templates/AGENTS.mdAGENTS.md
- templates/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- 1passwordSkill
- agentic-tpmSkill
- airtableSkill
- alexaSkill
- apple-calendarSkill
- apple-musicSkill
- apple-passwordsSkill
- bahnSkill
- blinkSkill
- bookingSkill
- brand-voiceSkill
- byd-batterySkill
- channel-catchupSkill
- code-reviewSkill
- code-simplificationSkill
- current-timeSkill
- discordSkill
- distil-pii-redactorSkill
- docxSkill
- download-platform-invoicesSkill
- excalidrawSkill
- fastbillSkill
- fax-sendSkill
- feature-planningSkill
- firecrawlSkill
- froniusSkill
- ga4Skill
- gh-issuesSkill
- github-pr-workflowSkill
- gogSkill
- google-adsSkill
- google-workspaceSkill
- gwsSkill
- handoff-linksSkill
- hermes3000-writingSkill
- hetzner-cloudSkill
- hetzner-dnsSkill
- hetzner-storage-boxSkill
- heygenSkill
- homematicSkill
- hubspotSkill
- hueSkill
- human-distillSkill
- hybridclaw-helpSkill
- image-generationSkill
- inbox-cleanupSkill
- iss-positionSkill
- langfuseSkill
- lexware-officeSkill
- llm-wikiSkill
- mailchimpSkill
- manim-videoSkill
- microsoft-365Skill
- miroSkill
- mittwaldSkill
- money-savingSkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

