mermaid-view
Convert Mermaid diagram code into high-fidelity SVG or PNG preview. Generate diagrams for architecture, flowcharts, sequence diagrams, and class models directly from CLI.
- License 许可
- MIT
- 最近更新
- 2026-11-11
- Stars
- ★ 3
- Forks
- 0
01 前言 Front Matter
- name
- mermaid-view
- tags
- [ "mermaid", "diagram", "visualization", "png", "svg", "architecture", "flowchart" ]
- author
- Human Skills Team
- version
- 1.0.0
- description
- Convert Mermaid diagram code into high-fidelity SVG or PNG preview. Generate diagrams for architecture, flowcharts, sequence diagrams, and class models directly from CLI.
- trigger_patterns
- [ "mermaid", "mermaid diagram", "generate diagram", "render mermaid", "mermaid-view", "architecture diagram" ]
02 资源文件 1
- 脚本scripts/mermaid_view.py16.4 KB
03 SKILL.md 正文
mermaid-view — Diagram Renderer & Preview Generator
"Turn Mermaid code into crisp, high-fidelity PNG and SVG images instantly."
Overview
mermaid_view is a standalone tool that converts any Mermaid diagram code (flowcharts, sequence diagrams, class diagrams, state machines, entity-relationship diagrams, Gantt charts, etc.) into high-resolution PNG or SVG image files.
Tool Reference: mermaid_view
📝 Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
diagram_code |
string |
Yes | The raw Mermaid code to render (e.g. flowchart TD\n A --> B). Markdown code fences (```mermaid) are automatically stripped if present. |
path |
string |
No | Target directory or explicit file path (e.g. /home/user/my-project or /home/user/my-project/arch.png). Defaults to current directory. |
preview |
string |
No | Output format: "png" (default) or "svg". |
file_name |
string |
No | Optional custom file name (e.g. architecture.png). Defaults to diagram.<preview>. |
theme |
string |
No | Mermaid theme: "default", "dark", "neutral", "forest", or "base". Default: "default". |
Supported Diagram Types
- Flowcharts (
flowchart TD,graph LR) - Sequence Diagrams (
sequenceDiagram) - Class Diagrams (
classDiagram) - State Diagrams (
stateDiagram-v2) - Entity Relationship Diagrams (
erDiagram) - User Journey (
journey) - Git Graphs (
gitGraph) - Mindmaps (
mindmap) - Timelines (
timeline)
Usage Examples
Render PNG, SVG Flowchart, Vector Diagram, Architecture Diagram
human-skills '{
"tool_name": "mermaid_view",
"tool_args": {
"path": "/home/username/my-project", # e.g. `/home/user/my-project/arch.png`, default is `path`
"preview": "png", # e.g. `svg`, default is `png`
"file_name": "diagram.png", # e.g. `architecture.png`, default is `diagram.<preview>`
"theme": "neutral", # e.g. `dark`, `neutral`, `forest`, `base`, default is `dark`
"diagram_code": "flowchart TD\n A[Client] --> B[API Gateway]\n B --> C[Auth Service]\n B --> D[Data Service]\n D --> E[(PostgreSQL)]"
}
}'
04 同仓库更多 Skills
system-lifecycle-designer
Universal architectural methodology for designing granular, atomic, and sub-atomic lifecycles and end-to-end workflows for single functionality integrations across any domain (daemons, batch jobs, request transactions, resource pools). Provides patterns for deterministic identity, pre-commit validation, differential reconciliation, sticky leasing, state machines, transactional persistence, and closed-loop feedback.
style-sampling
Make a new episode in a proven video style - Collage Explainer, Finance Explainer, Animated Science Explainer, 3D Brand Explainer, 3D True Crime - on the person's topic. Use for "an episode of", "in the style of", "sample this style", 「用这个风格做一集」. One video to copy is reverse-any-video.
reverse-any-video
Rebuild any video file as an editable HyperFrames project - motion graphics, talking heads, live action or AI-generated footage - checked against the original frame by frame. Use to reverse, recreate, remake, replicate or copy a video, or 「复刻这个视频」「照着这个视频做一个」.
typescript-patterns
TypeScript patterns for strict, type-safe, maintainable code in modern TypeScript and JavaScript applications. Covers strict compiler configuration, type design, narrowing, discriminated unions, generics, async and error handling, module boundaries, dependency hygiene, and type-level testing. Use when writing or reviewing TypeScript or JavaScript code.
test-collaboration
Inventory and govern a project's test assets. Connect requirements, business rules, risks, bugs, and cross-boundary contracts to stable TEST-IDs and executable evidence in the repository's existing test registry or TESTS.md. Use for test inventory, test gap analysis, unit/integration/contract/E2E/smoke classification, bug-to-test regression protection, consumer/provider contract testing, test-necessity review, and pre-delivery evidence review.
story-lifecycle
Manage a file-based epic → story → sprint development loop without requiring an external project management tool. Creates and tracks epics, breaks them into user stories, assigns them to sprints, and drives implementation story by story. Use when starting a new feature initiative or when the team has no Jira/Linear/Taiga but needs structured delivery tracking.