From emacs-skills
Creates diagrams from recent conversation context using D2, generates PNG images themed for Emacs background, and outputs as inline markdown image. Invoke via /d2.
npx claudepluginhub xenodium/emacs-skillsThis skill uses the workspace's default tool permissions.
Create a diagram from the most recent interaction context using D2. Generate a PNG image and output it as a markdown image so it renders inline.
Generates PlantUML diagrams from current context as transparent PNG images with Emacs theme-matched colors, outputs inline Markdown image via /plantuml.
Generates D2 diagrams from text descriptions by classifying type (sequence, architecture, ER, class) and planning structure with nodes, groups, edges.
Generate architecture diagrams, flowcharts, decision trees, workflows, sequence flows, ERDs from declarative D2 text with automatic layouts, themes, and styling.
Share bugs, ideas, or general feedback.
Create a diagram from the most recent interaction context using D2. Generate a PNG image and output it as a markdown image so it renders inline.
emacsclient --eval '(face-foreground (quote default))'
emacsclient --eval '(frame-parameter nil (quote background-mode))'
The first returns a hex color like "#eeffff". The second returns dark or light. Reuse both for all subsequent diagrams.--theme 200 if background mode is dark, or --theme 0 if light.
# Use --theme 200 for dark, --theme 0 for light
d2 --theme 200 --pad 40 /tmp/agent-diagram-XXXX.d2 /tmp/agent-diagram-XXXX.png
Use --theme 200 for dark or --theme 0 for light, based on the Emacs background mode. Apply the queried foreground color to style.font-color and style.stroke on nodes and edges.
direction: right
node1: Label {
style.font-color: "#eeffff"
style.fill: "#2d3748"
style.stroke: "#eeffff"
}
node2: Label {
style.font-color: "#eeffff"
style.fill: "#2d3748"
style.stroke: "#eeffff"
}
node1 -> node2: label {style.stroke: "#eeffff"; style.font-color: "#eeffff"}
(frame-parameter nil 'background-mode). Use --theme 200 for dark or --theme 0 for light. Always use --pad 40./tmp/agent-diagram-$(date +%s).png). Never use descriptive names.style.font-color and style.stroke for all nodes and edges so the diagram is readable on the user's Emacs background.) on its own line.