一键导入
mermaid
This skill should be used when the user invokes "/mermaid" to create a diagram from the current context using Mermaid and output the resulting image path.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
This skill should be used when the user invokes "/mermaid" to create a diagram from the current context using Mermaid and output the resulting image path.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
This skill should be used when the user invokes "/describe" to look up Emacs documentation via emacsclient.
This skill should be used when the user invokes "/dired" to open files from the latest interaction in an Emacs dired buffer via emacsclient.
This skill should be used when the user invokes "/highlight" to highlight relevant regions in one or more files in Emacs via emacsclient.
Use when the user asks about a specific place — restaurant, cafe, shop, business, landmark — or when context implies a location-based lookup ("where is X", "find Y", "X in Z", "X near A"). Calls the mappu CLI to search Apple Maps and returns local results with addresses, websites, preview images, and a map snapshot.
This skill should be used when the user invokes "/open" to open files from the latest interaction in Emacs buffers via emacsclient.
This skill should be used when the user invokes "/select" to open one or more files in Emacs and select a region relevant to the current discussion via emacsclient.
| name | mermaid |
| description | This skill should be used when the user invokes "/mermaid" to create a diagram from the current context using Mermaid and output the resulting image path. |
| tools | Bash |
| disable-model-invocation | true |
Create a diagram from the most recent interaction context using Mermaid. Generate a PNG image with a transparent background 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" to "dark" or "default" based on the background mode.mmdc with -t dark if background mode is dark, or -t default if light.
# Use -t dark for dark, -t default for light
PUPPETEER_EXECUTABLE_PATH=/opt/homebrew/bin/chromium mmdc \
-i /tmp/agent-diagram-XXXX.mmd \
-o /tmp/agent-diagram-XXXX.png \
-t dark -b transparent --scale 2 \
--configFile /tmp/agent-diagram-XXXX-config.json
Write this JSON config file to apply the Emacs foreground color. Replace #eeffff with the queried color. Set "theme" to "dark" or "default" based on the Emacs background mode.
{
"theme": "dark",
"themeVariables": {
"primaryTextColor": "#eeffff",
"secondaryTextColor": "#eeffff",
"tertiaryTextColor": "#eeffff",
"primaryBorderColor": "#eeffff",
"lineColor": "#eeffff",
"textColor": "#eeffff",
"actorTextColor": "#eeffff",
"actorBorder": "#eeffff",
"signalColor": "#eeffff",
"signalTextColor": "#eeffff",
"labelTextColor": "#eeffff",
"loopTextColor": "#eeffff",
"noteTextColor": "#eeffff",
"noteBorderColor": "#eeffff",
"sectionTextColor": "#eeffff",
"titleColor": "#eeffff"
}
}
sequenceDiagram
participant a as Alice
participant b as Bob
a->>b: Hello
b-->>a: Hi back
(frame-parameter nil 'background-mode). Use -t dark for dark or -t default for light. Always use -b transparent --scale 2.PUPPETEER_EXECUTABLE_PATH=/opt/homebrew/bin/chromium when invoking mmdc.themeVariables set to the queried foreground color and pass it via --configFile./tmp/agent-diagram-$(date +%s).png). Never use descriptive names.) on its own line.