mk-mermaidjs-v11
Create inline Mermaid v11 diagrams -- flowcharts, sequence, class, ER, Gantt, state, timeline, and more -- for markdown and browser. Zero deps; mmdc optional for CLI export.
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 16
- Forks
- 3
01 前言 Front Matter
- name
- mk-mermaidjs-v11
- description
- Create inline Mermaid v11 diagrams -- flowcharts, sequence, class, ER, Gantt, state, timeline, and more -- for markdown and browser. Zero deps; mmdc optional for CLI export.
02 资源文件 5
- 参考文档references/cli-usage.md4.3 KB
- 参考文档references/configuration.md4.8 KB
- 参考文档references/diagram-types.md5.2 KB
- 参考文档references/examples.md7.2 KB
- 参考文档references/integration.md5.9 KB
03 SKILL.md 正文
Mermaid.js v11
Quick Start
Basic Diagram Structure:
{diagram-type}
{diagram-content}
Common types: flowchart, sequenceDiagram, classDiagram, stateDiagram, erDiagram,
gantt, and journey. Load references/diagram-types.md for
the complete v11 syntax catalog.
Creating Diagrams
Inline Markdown Code Blocks:
```mermaid
flowchart TD
A[Start] --> B{Decision}
B -->|Yes| C[Action]
B -->|No| D[End]
```
Configuration via Frontmatter:
```mermaid
---
theme: dark
---
flowchart LR
A --> B
```
Comments: Use %% prefix for single-line comments.
CLI Usage
Convert .mmd files to images:
# Installation
npm install -g @mermaid-js/mermaid-cli
# Basic conversion
mmdc -i diagram.mmd -o diagram.svg
# With theme and background
mmdc -i input.mmd -o output.png -t dark -b transparent
# Custom styling
mmdc -i diagram.mmd --cssFile style.css -o output.svg
See references/cli-usage.md for Docker, batch processing, and advanced workflows.
JavaScript Integration
HTML Embedding:
<pre class="mermaid">
flowchart TD
A[Client] --> B[Server]
</pre>
<script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
<script>mermaid.initialize({ startOnLoad: true });</script>
See references/integration.md for Node.js API and advanced integration patterns.
Configuration & Theming
Common Options:
theme: "default", "dark", "forest", "neutral", "base"look: "classic", "handDrawn"fontFamily: Custom font specificationsecurityLevel: "strict", "loose", "antiscript"
See references/configuration.md for complete config options, theming, and customization.
Practical Patterns
Load references/examples.md for:
- Architecture diagrams
- API documentation flows
- Database schemas
- Project timelines
- State machines
- User journey maps
References
| Need | Load |
|---|---|
| Diagram syntax | references/diagram-types.md |
| Config, theming, accessibility | references/configuration.md |
| CLI, Docker, batch export | references/cli-usage.md |
| JavaScript integration | references/integration.md |
| Common patterns | references/examples.md |
For rendered SVG layout review, load mk:tech-graph and follow its SVG-layout route.
Gotchas
- Mermaid v11 removed some v10 aliases; always use canonical type names (e.g.,
flowchartnotgraph). - The
securityLevel: "strict"setting strips HTML from labels — use plain text in node labels when security mode is on. mmdcrequires Node 18+; skip the CLI section if the project's Node version is older.- Inline frontmatter config (the
---block inside a code fence) is a v10.7+ feature; older renderers silently drop it and render the---as content. - External
@importin<style>breaksrsvg-convert— embed fonts inline if you later export viamk:tech-graph.
04 同仓库更多 Skills
mk-worktree
Manages git worktrees for parallel agent isolation: creates parallel/{name}-{timestamp} branches, merges with conflict detection. NOT for user feature branches (use git worktree directly).
mk-workflow-orchestrator
Auto-invoked 7-phase workflow for complex-feature intent; fasttrack mode for pre-approved specs. NOT for explicit single tasks (mk:cook), green-field builds (mk:autobuild), or simple fixes (mk:fix).
mk-web-to-markdown
Fetch a URL and return clean markdown, for arbitrary external pages (blog, RFC, GitHub issue, vendor doc) not covered by mk:docs-finder. Static-only by default; opt-in JS rendering available.
mk-vulnerability-scanner
Vulnerability analysis: OWASP Top 10, current threat landscape, supply chain security, attack surface mapping, risk prioritization. Use for security audits. NOT for STRIDE/CSO infra audits (mk:cso).
mk-vue
Vue 3 authoring/review: components, composables, reactivity, Pinia, Pinia Colada, file routing, forms. Composition API + script setup. Auto-activates on .vue files. Deep review: mk:vue-best-practices.
mk-vue-testing-best-practices
Vue 3 testing best-practices review: Vitest + Vue Test Utils for components, composables, Pinia, Router, async/Suspense, forms, a11y, plus Playwright E2E strategy. Advisory only.