bostonaholic/skills

drawing-mermaid-diagrams

Writes, edits, and debugs Mermaid diagrams (flowchart, sequence, class, state, ER, Gantt, pie, mindmap, timeline, quadrant, git graph, XY, Sankey, architecture, journey, kanban, block).

View source

How to use

  1. Copy the installation command and review the source package before installing it in your own agent environment.
  2. Check the source document for required tools, credentials and supported hosts.
  3. Describe your input and desired deliverable; review the output against the source material.
npx skills add https://github.com/bostonaholic/skills --skill drawing-mermaid-diagrams

Before you start

  • Installation does not include a model subscription, API allowance or permission to access your files.
  • Repository stars and installation counts describe activity, not an independent quality or security test.
Original skill document

Rendered from the source repository. Headings, examples, code, tables, links, and referenced images are preserved.

Mermaid Diagrams

A diagram is done when it renders without error and its layout reads clearly. Pick the type that matches the content (process, messages, schema, schedule, hierarchy, and so on); a flowchart is not the answer to everything.

Renderer support

Each host (GitHub, GitLab, a docs site, an IDE preview) bundles its own Mermaid release, often older than the latest. -beta keywords (xychart-beta, sankey-beta, architecture-beta, block-beta) and recent types such as kanban may fail there. When the target renderer is unknown, prefer a core type, or ask which renderer will display the diagram.

Default to a frontmatter config: block before the diagram keyword. Fall back to a first-line %%{init: {...}}%% directive only for a renderer too old to read frontmatter config.

Validate by rendering

Write the diagram to <out>/diagram.mmd in a scratch directory and render it:

sh
npx -y @mermaid-js/mermaid-cli -i <out>/diagram.mmd -o <out>/diagram.png

For a Markdown file, -i doc.md -o <out>/doc.md renders every mermaid block. Fix each Parse error on line N or Lexical error and render again until it succeeds. When layout matters, open the PNG and check direction, overlaps, and label text. Only then put the code in its destination.

If mmdc cannot find Chrome, write {"executablePath": "<path to an installed Chrome or Chromium>"} to <out>/puppeteer.json and add -p <out>/puppeteer.json. If Node, network, or a browser is unavailable, do not install one without asking; check the diagram against the gotchas below and tell the user it was not rendered.

A successful CLI render uses the Mermaid release bundled with the CLI, so it does not prove an older host renders the diagram.

Gotchas

Several of these fail silently rather than with a parse error.

  • Labels containing (), [], {}, :, ;, or # are wrapped in

"..."; inner quotes are written #quot;, < and > as #lt; and #gt;.

  • A lowercase end as a flowchart node ID or bare label breaks the parse; use

End or ["end"].

  • A node ID beginning with o or x right after a link (A---oB) silently

becomes a circle or cross edge; add a space or capitalize.

  • %% comments sit on their own line; a trailing comment is a parse error.
  • Block diagrams have no ==> or ::: shorthand.
  • Indentation is significant in mindmap and kanban.
  • Styling not applying: the config block must come first, themeVariables

need theme: base, and hex colors in frontmatter must be quoted (an unquoted # is a YAML comment and the color is silently dropped).

  • Renders in the CLI but not on the host: the host's Mermaid is older; replace

a -beta or recent type, or switch frontmatter config to %%{init}.

Related by task

from this repository

More skills

All skills
bostonaholic
Community

auditing-complexity

Ranks where code complexity concentrates in a git repository (cyclomatic complexity, nesting, fan-out, mutable state) and scores CRAP change risk from a coverage file. Read-only. Use when asked for complexity hotspots or change risk. Not for test value; use auditing-tests.

installs
1
GitHub stars
2
Updated
Oct 20
bostonaholic
Community

composing-agent-prompts

Composes a self-contained, source-cited task prompt for another coding agent to execute in a target repository, without running the task. Use when the user asks to write, draft, or hand off a prompt, brief, or task spec for another agent. Not for system prompts; use writing-system-prompts.

installs
1
GitHub stars
2
Updated
Oct 20
bostonaholic
Community

conducting-deep-research

Conducts source-backed, goal-directed research that combines a scholarly evidence review with an institution, company, or funding map. Use when a request needs both an evidence review and an organization or funding map. Not for quick lookups or general research write-ups.

installs
1
GitHub stars
2
Updated
Oct 20
bostonaholic
Community

cutting-skills

Audits or trims an existing agent skill to its behavioral core and narrows over-broad trigger metadata. Use when the user asks to cut, simplify, shorten, de-slop, or reduce the context cost or trigger aggressiveness of a SKILL.md or skill folder. Never infer from a skill being long or edited for another purpose.

installs
1
GitHub stars
2
Updated
Oct 20