From marsai-default
Generate Mermaid diagrams from context and open them in mermaid.live in the browser. Use when the user asks for a diagram, visualization, flowchart, sequence diagram, ER diagram, or any visual representation of code, architecture, or processes. Produces lightweight, shareable mermaid.live URLs that open in the browser for interactive editing.
npx claudepluginhub v4-company/marsai --plugin marsai-defaultThis skill uses the workspace's default tool permissions.
Generate Mermaid diagrams and open them directly in mermaid.live in the user's browser.
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
Generate Mermaid diagrams and open them directly in mermaid.live in the user's browser.
Choose the most appropriate Mermaid diagram type:
| Need | Diagram Type | Keyword |
|---|---|---|
| Process flow, decision trees | Flowchart | flowchart TD or flowchart LR |
| API calls, message passing | Sequence | sequenceDiagram |
| OOP structure, interfaces | Class | classDiagram |
| Database schema, entities | ER | erDiagram |
| State machines, lifecycles | State | stateDiagram-v2 |
| Project timelines | Gantt | gantt |
| Distribution/proportions | Pie | pie |
| Git branch strategy | Git Graph | gitGraph |
| User experience mapping | Journey | journey |
| Prioritization matrix | Quadrant | quadrantChart |
| Data over time | XY Chart | xychart-beta |
| Chronological events | Timeline | timeline |
| Brainstorming | Mindmap | mindmap |
Write clean, well-structured Mermaid code. Key syntax rules:
Flowchart nodes:
A[Rectangle] A(Rounded) A{Diamond} A((Circle)) A[(Database)]--> (arrow), -.-> (dotted), ==> (thick), ~~~ (invisible)A -->|label| Bsubgraph title ... endSequence diagrams:
participant A or actor A->> (solid+arrow), -->> (dotted+arrow), -x (destroy), -) (async)loop, alt/else, opt, par/and, critical/option, breakNote right of A: textautonumber for sequence numbersER diagrams:
||--o{ (one to many), ||--|| (one to one), }o--o{ (many to many)-- (identifying/solid), .. (non-identifying/dashed)ENTITY { type name PK/FK/UK "comment" }Class diagrams:
+ public, - private, # protected, ~ package<|-- inheritance, *-- composition, o-- aggregation, --> association<<interface>>, <<abstract>> annotationsState diagrams:
[*] for start/end statesstate "description" as s1<<choice>>, <<fork>>, <<join>>-- separator for concurrent statesCRITICAL: Avoid the word end in lowercase inside node labels -- it's a reserved keyword. Use End, END, or wrap in quotes.
Write the mermaid code to a temp file, then use the bundled encoder script:
# macOS: uses `open`. On Linux, replace `open` with `xdg-open`.
cat <<'MERMAID_EOF' | python3 ~/.claude/skills/drawing-diagrams/mermaid-encode.py | xargs open
<mermaid code here>
MERMAID_EOF
Options:
--theme dark -- use dark theme (options: default, dark, forest, neutral)--view -- open in view-only mode (no editor)--rough -- hand-drawn/sketchy styleExample with options:
cat <<'MERMAID_EOF' | python3 ~/.claude/skills/drawing-diagrams/mermaid-encode.py --theme forest --rough | xargs open
flowchart LR
A[Start] --> B{Decision}
B -->|Yes| C[Do thing]
B -->|No| D[Other thing]
MERMAID_EOF
After opening the browser, tell the user:
classDef to highlight important nodes (errors in red, success in green, etc.)flowchart TD
subgraph Client
A[Browser] --> B[Mobile App]
end
subgraph API["API Gateway"]
C[Load Balancer]
end
subgraph Services
D[Auth Service]
E[Core Service]
F[Notification Service]
end
Client --> API --> Services
erDiagram
USER ||--o{ ORDER : places
ORDER ||--|{ LINE_ITEM : contains
PRODUCT ||--o{ LINE_ITEM : "ordered in"
sequenceDiagram
autonumber
Client->>+API: POST /resource
API->>+DB: INSERT
DB-->>-API: OK
API-->>-Client: 201 Created
open command) -- for Linux, users would need xargs xdg-open--rough flag gives a hand-drawn sketchy look (nice for presentations)