Generates professional diagrams (flowcharts, mind maps, architecture, UML, graphs) from Mermaid, D2, and Graphviz code blocks in Markdown. Renders to SVG for GitHub and embeds into PDFs.
Ships in pinakdhabu-exam-prompt. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Generates publication-quality diagrams from code blocks in Markdown files. Supports three syntaxes:
| Syntax | Best For | Tool |
|---|---|---|
| Mermaid | Flowcharts, sequence diagrams, class diagrams, mind maps, Gantt, state diagrams, pie charts | @mermaid-js/mermaid-cli |
| D2 | Cloud architecture, network topology, AWS diagrams, system design | d2 CLI |
| Graphviz (DOT) | Directed/undirected graphs, trees, automata, dependency graphs | dot CLI |
All diagrams render as SVG — natively viewable in GitHub Markdown AND embedded into PDF when
converted with scripts/convert-to-pdf.js.
# Render all diagrams in a file
node scripts/diagram-gen.js notes.md
# Watch mode (auto-re-render on save)
node scripts/diagram-gen.js README.md --watch
# Convert MD to PDF with diagrams embedded
node scripts/convert-to-pdf.js notes-with-diagrams.md
flowchart TD
A[Start] --> B{Decision}
B -->|Yes| C[Process]
B -->|No| D[End]
C --> D
sequenceDiagram
User->>System: Login request
System->>DB: Validate credentials
DB-->>System: Valid
System-->>User: Success
User -> API: GET /data
API -> Database: SELECT * FROM data
Database -> API: rows
API -> User: JSON response
digraph Dependencies {
rankdir=LR;
App -> API -> Database;
App -> Cache;
API -> Queue;
}
When scripts/convert-to-pdf.js runs, Mermaid code blocks are automatically detected and
rendered:
Source MD (with ```mermaid blocks)
│
▼ diagram-gen.js
SVG images + updated MD
│
▼ convert-to-pdf.js (Playwright)
Print-ready PDF with diagrams
The PDF renderer (Playwright Chromium) can render SVGs directly — all diagrams appear in the final PDF.
.md filenode scripts/diagram-gen.js input.md.md with <img> tagsnode scripts/convert-to-pdf.js input-with-diagrams.mdWhen an AI agent needs to generate a diagram:
scripts/diagram-gen.js for renderingscripts/convert-to-pdf.js for PDF output# From inline code
node scripts/diagram-gen.js --code "flowchart TD; A-->B"
# List all formats
node scripts/diagram-gen.js --list-formats
| Diagram Type | Use Case | Max Elements |
|---|---|---|
| flowchart | Algorithms, processes, workflows | < 50 nodes |
| sequenceDiagram | API calls, user flows, protocols | < 20 actors |
| classDiagram | OOP design, DB schemas | < 30 classes |
| mindmap | Subject overviews, topic hierarchies | < 100 nodes |
| stateDiagram | State machines, protocols | < 30 states |
| gantt | Project timelines, study schedules | < 30 tasks |
| D2 | System architecture, cloud infra | < 40 components |
| DOT | Dependency graphs, trees | < 100 nodes |
| Situation | Action |
|---|---|
| Mermaid syntax error | Validate against Mermaid parser; simplify diagram or use alternate syntax (Graphviz/D2) |
| Renderer not available | Ensure @mermaid-js/mermaid-cli is installed (npm install); fall back to text description |
| D2 not installed | Install d2 CLI or fall back to Mermaid for architecture diagrams |
| Diagram too complex | Split into multiple sub-diagrams; stay within element limits per Best Practices table |
This skill integrates with the session config system (deps/session-profile.json). Before
executing, check for an existing session profile:
deps/session-profile.json exists, read university, subject, pattern, and exam_type
fields to auto-configure the skill.setup-exam-prompt (or npm run init) first.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
diagram-generation, mermaid, d2, graphviz, markdown-enhancement, pdf-export
/pinakdhabu-exam-prompt:universal-diagram-generatorfrom pinakdhabu-exam-prompt
pinakdhabu-exam-prompt@awesome-skills-plugins-for-students is listed by studentsuite/awesome-skills-plugins-for-students — review the source before installing
npx claudepluginhub studentsuite/awesome-skills-plugins-for-students --plugin pinakdhabu-exam-prompt30 skills in this plugin
/universal-agent-normalizerUniversal agent normalizer that detects which AI coding agent is running and maps the Exam Prompt skill system to the agent's native configuration format. Supports 20+ coding agents as of June 2026. Ensures every agent can discover, load, and invoke all 30+ skills regardless of its native skill mechanism. Run this skill first whenever you are onboarding a new agent or if skills fail to load. Works for any university worldwide.
/universal-a-plus-answer-writerGenerates exam-ready A+ answers for ANY university worldwide — SPPU, VTU, IITs, NITs, MIT, Oxford, Cambridge, Harvard, NUS, and 50+ more. Covers ALL question types (theory, numerical, MCQ, case study, derivation, diagram, design, etc.), ALL mark levels (1-100+), ALL exam conditions (closed/open book, online, oral, lab, take-home), ALL Bloom's levels, and ALL command words. Pre-configured with SPPU Computer Engineering intelligence. Universally adaptable via syllabus PDF input. Trigger on ANY exam answer request. Never trigger for lab practical reports, project documentation, or coding assignments unless asked.
/universal-assignment-writerGenerates assignment-ready content for any university worldwide across all assignment types (theory, numerical, case study, research, literature review, project proposals, design, analysis, comparison, critical review, problem-solving, and diagram/illustration). Supports multiple output formats, evaluation depth mapping, marking scheme generation, and citation requirements. University-agnostic.
Other plugins' skills for the same job