conventions-mermaid
MANDATORY for any work on Mermaid files (*.mmd, *.mermaid) or Mermaid diagram blocks in Markdown. Load this before creating, editing, or validating Mermaid…
от Integralist★ 31 звезда на GitHub
Установить conventions-mermaid в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Write Mermaid diagrams that render cleanly and remain readable. Validate every
diagram with Mermaid CLI (mmdc) before it goes into a document: generated
diagrams can be invalid or render as an unreadable strip.
Syntax and layout
Put one statement on each line. Use commas or separate sentences instead of semicolons in labels, messages, and notes; sequence diagrams treat raw semicolons as statement separators and can break.
sequenceDiagram
N-->>D: Unsupported, no handler runs
Avoid long, single-column chains such as A --> B --> C --> D. Group steps
into subgraphs by phase, system, or owner. Draw independent steps side by
side, fanning out and back in, to balance width and depth:
flowchart TD
A[Merge PR to main] --> B[Release workflow]
subgraph Build["Parallel build and publish"]
subgraph Svc["API service"]
C1[Build api:sha] --> C2[Push api:sha to registry]
end
subgraph Gtw["API gateway"]
D1[Build gateway:sha] --> D2[Push gateway:sha to registry]
end
end
B --> Svc
B --> Gtw
subgraph Deploy["GitOps deploy"]
E[Open deploy-config PR] --> F[Auto-merge]
F --> G1[Sync staging, region 1]
F --> G2[Sync staging, region 2]
end
C2 --> E
D2 --> E
Validate
Write source to a unique file under /tmp/ and render it:
mmdc -i /tmp/diagram-<id>.mmd -o /tmp/diagram-<id>.png
A syntax error exits non-zero and names the line. Read the PNG and check that
text is legible, nothing is clipped, and the diagram is not a thin strip. If
mmdc is missing, install it with
npm install -g @mermaid-js/mermaid-cli.
Saving an image
Only save an image when the user asks to save one, keep a copy, or put it on their machine. Previewing or validating alone is not a request to save. When saving:
Write source to
/tmp/mermaid-<id>.mmdwith a fresh random ID; do not overwrite an earlier diagram.Add
fontFamily: "Menlo, monospace"at the top level of the Mermaid init config. Mermaid measures text before layout, so setting the font only in CSS can clip labels.Use
theme: "base"withthemeVariablesfor global colours. Global variables cannot colour subgraphs separately; usestyle <subgraph-id>for each boundary andclassDefwithclassfor consistent node boxes.Render with the bundled mermaid.css, resolved to an absolute path, and a white background:
id="$(uuidgen | tr '[:upper:]' '[:lower:]')" mmdc --input "/tmp/mermaid-${id}.mmd" --output "/tmp/mermaid-${id}.png" \ --cssFile "$css" --backgroundColor whiteAdd
--scale 2or--scale 3for higher resolution without changing layout.Read the image to check legibility and clipping, then give the user its exact path. Explain that the PNG does not contain its source, config, or CSS; reproduction needs those files and a compatible Mermaid version.
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- mermaid.css
FAQ
Что делает скилл conventions-mermaid?
MANDATORY for any work on Mermaid files (*.mmd, *.mermaid) or Mermaid diagram blocks in Markdown. Load this before creating, editing, or validating Mermaid diagrams.
Как установить скилл conventions-mermaid?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл conventions-mermaid запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…