askill
mermaid-ascii

mermaid-asciiSafety 92Repository

Use when writing documentation, specs, plans, or any markdown document that could benefit from diagrams - renders Mermaid syntax to ASCII/Unicode art inline using beautiful-mermaid

0 stars
1.2k downloads
Updated 2/25/2026

Package Files

Loading files...
SKILL.md

Mermaid ASCII Diagrams

Render Mermaid diagrams as ASCII/Unicode art and embed them inline in markdown documents. Uses beautiful-mermaid for high-quality terminal-friendly output.

When to Use

  • Writing documentation, proposals, technical specs, or design docs
  • Any markdown document where a visual diagram would clarify architecture, flows, or relationships
  • During doc-coauthoring when explaining system design, data flows, or decision trees
  • When you need diagrams that render in plain text (terminals, code reviews, markdown files)

Supported Diagram Types

TypeSyntax PrefixBest For
Flowchartgraph TD / graph LRArchitecture, decision flows, processes
SequencesequenceDiagramAPI calls, actor interactions, protocols
StatestateDiagram-v2State machines, lifecycle flows
ClassclassDiagramData models, OOP structure
ERerDiagramDatabase schema, entity relationships

How to Render

The render script lives at ~/.claude/skills/mermaid-ascii/beauti-diagram/scripts/render.mjs and requires bun.

Write mermaid to a temp file, then render:

# Write mermaid syntax to temp file
cat <<'EOF' > /tmp/diagram.mmd
graph TD
  A[Start] --> B{Decision}
  B -->|Yes| C[Action]
  B -->|No| D[End]
EOF

# Render to ASCII
bun ~/.claude/skills/mermaid-ascii/beauti-diagram/scripts/render.mjs --file /tmp/diagram.mmd

Or pipe directly:

echo 'graph LR; A[Input] --> B[Process] --> C[Output]' | bun ~/.claude/skills/mermaid-ascii/beauti-diagram/scripts/render.mjs

Then embed the output in a markdown code block:

### System Architecture

```
┌───────┐     ┌─────────┐     ┌────────┐
│       │     │         │     │        │
│ Input ├────►│ Process ├────►│ Output │
│       │     │         │     │        │
└───────┘     └─────────┘     └────────┘
```

Workflow in Documents

  1. Identify where a diagram would help the reader understand the content
  2. Write valid Mermaid syntax for the diagram
  3. Render using the render script via Bash tool
  4. Embed only the ASCII output in a fenced code block in the document
  5. Do NOT include the original Mermaid source code or HTML comments in the document — only the rendered ASCII result goes in the final output. Include Mermaid source only if the user explicitly asks for it.

Quick Mermaid Syntax Reference

Flowchart

graph TD
  A[Rectangle] --> B{Diamond/Decision}
  B -->|Label| C(Rounded)
  B --> D([Stadium])
  C --> E[(Database)]

Directions: TD (top-down), LR (left-right), BT (bottom-top), RL (right-left)

Sequence Diagram

sequenceDiagram
  participant A as Client
  participant B as Server
  A->>B: Request
  B-->>A: Response
  A->>B: Another call
  Note over A,B: Bidirectional note

State Diagram

stateDiagram-v2
  [*] --> Idle
  Idle --> Processing: start
  Processing --> Done: complete
  Processing --> Error: fail
  Error --> Idle: retry
  Done --> [*]

Class Diagram

classDiagram
  class Animal {
    +String name
    +int age
    +makeSound()
  }
  Animal <|-- Dog
  Animal <|-- Cat

ER Diagram

erDiagram
  USER ||--o{ POST : writes
  POST ||--|{ COMMENT : has
  USER }|--|| PROFILE : has

Common Mistakes

  • Missing bun: The render script requires bun runtime (TypeScript support). Install via curl -fsSL https://bun.sh/install | bash
  • Missing dependencies: Run cd ~/.claude/skills/mermaid-ascii/beauti-diagram && bun install if the render fails with import errors
  • Semicolons in single-line: Single-line mermaid uses ; as separator: graph LR; A --> B; B --> C
  • Multiline needs proper newlines: Pipe multiline syntax via heredoc or temp file, not as a single quoted string

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

76/100Analyzed 3/28/2026

A well-structured, technically sound skill for rendering Mermaid diagrams to ASCII art. Features comprehensive coverage of diagram types, clear step-by-step workflows, and useful examples. The skill is highly actionable with structured instructions and a common mistakes section. Slight penalty for referencing internal agent paths (script location in ~/.claude/skills) which ties it to a specific agent setup, but the core concept and syntax reference remain broadly applicable.

92
88
75
85
85

Metadata

Licenseunknown
Version-
Updated2/25/2026
Publisherbuihuuloc

Tags

apici-cddatabasegithubgithub-actionsllm