generate_mindmap
Generate beautiful interactive mind maps from any text, article summary, or structured content. Exports to HTML (interactive), PNG, JPG, SVG, PDF, and XMind...
MIT-0 · Free to use, modify, and redistribute. No attribution required.
⭐ 0 · 38 · 0 current installs · 0 all-time installs
by@FtoIS
MIT-0
Security Scan
OpenClaw
Benign
high confidencePurpose & Capability
Name/description (generate interactive mind maps, export to various formats) match the provided Python script and SKILL.md. Required binary is only python3; the optional Python libraries (cairosvg, pillow) and system libs (cairo/pango/libffi) are appropriate for producing PNG/JPG/PDF exports.
Instruction Scope
SKILL.md instructs installing dependencies and running the included script with JSON data and output path. The instructions reference only expected files/paths (~/Desktop, ~/Documents, explicit --output) and check python3 and cairosvg; there are no instructions to read unrelated system files or send data externally.
Install Mechanism
This is an instruction-only skill (no automated install). SKILL.md asks users to run brew/apt/dnf and pip commands; the use of 'pip install --break-system-packages' on some Linux examples is potentially intrusive for users who install packages globally—recommend using virtualenv/conda. No remote download URLs or opaque installers are used by the skill itself.
Credentials
The skill declares no required environment variables or credentials. The script only consults a single XDG environment variable optionally when choosing a default path, and expands user paths ($HOME, ~, %USERPROFILE%), which is normal and proportionate.
Persistence & Privilege
The skill does not request persistent 'always' inclusion and does not modify other skills or global agent config. It runs as a local script that writes output files to user-specified locations.
Assessment
This skill appears to be what it claims: a local Python-based mind‑map exporter. Before using it: (1) Run it in a virtual environment or sandbox rather than installing pip packages globally (SKILL.md suggests pip with --break-system-packages on Linux); (2) review the included generate_mindmap.py if you want to double-check there's no network access (the file shows no networking or credential access); (3) when invoking, supply an explicit --output path to control where files are written; and (4) if you don't trust installing system libraries, open the HTML/SVG output instead of installing image-export dependencies. Installing dependencies system-wide and running arbitrary scripts always carries normal local risk—use a VM/container if you need higher isolation.Like a lobster shell, security has layers — review code before you run it.
Current versionv1.0.0
Download ziplatest
License
MIT-0
Free to use, modify, and redistribute. No attribution required.
Runtime requirements
Binspython3
SKILL.md
Mind Map Generator
触发时机
以下情况调用此 skill:
- 用户说"生成思维导图"、"画思维导图"、"做一个脑图"
- 用户总结了文章/内容后说"帮我做成思维导图"
- 用户说"把这些内容可视化"、"帮我梳理结构"
- 用户说"导出为 XMind / PNG / PDF"等格式
环境检测
在调用脚本之前,先确认运行环境:
python3 --version # 需要 3.8+
python3 -c "import cairosvg; print('cairosvg ok')" 2>/dev/null || echo "cairosvg not installed"
首次安装依赖(按平台执行)
macOS
# 安装系统库(cairo 是 PNG/JPG/PDF 的必要依赖)
brew install cairo pango libffi
# 安装 Python 依赖
pip3 install cairosvg pillow
注意:macOS 上
pip3 install不需要--break-system-packages,直接安装即可。 若使用 conda/venv,在对应环境里执行pip install cairosvg pillow。
Linux(Debian / Ubuntu)
# 安装系统库
sudo apt-get install -y \
libcairo2-dev libpango1.0-dev \
libgdk-pixbuf2.0-dev libffi-dev
# 安装 Python 依赖
pip install cairosvg pillow --break-system-packages
Linux(Fedora / RHEL / CentOS)
sudo dnf install cairo-devel pango-devel libffi-devel
pip install cairosvg pillow --break-system-packages
无桌面的 Linux 服务器(headless)
# 同上安装系统库和 Python 依赖
# 服务器上通常没有 ~/Desktop,脚本会自动回退到 ~/Documents 或 ~/
# 建议手动指定 --output 路径,例如:
# --output /home/user/mindmap.html
HTML / SVG / XMind 这三种格式无需任何额外依赖,在所有平台开箱即用。 PNG / JPG / PDF 需要
cairosvg,若未安装脚本会打印平台对应的安装命令并退出。
使用方式
脚本路径:{baseDir}/generate_mindmap.py
第一步:构造 JSON 数据
将内容整理为以下结构(建议 2–3 层,最多支持 4 层):
{
"central": "中心主题",
"branches": [
{
"label": "主分支1",
"children": [
"子节点A",
"子节点B",
{
"label": "子节点C(有下级)",
"children": ["细节1", "细节2"]
}
]
},
{
"label": "主分支2",
"children": ["子节点D", "子节点E"]
}
]
}
规则:
central:中心节点(必填)branches:主分支,建议 3–7 个children:子节点,字符串或嵌套对象均可color:可选分支颜色(如"#4A90D9"),不填则自动分配- 文字尽量简短(4–10 字)
第二步:执行脚本
生成 HTML(默认,交互式,无依赖)
# macOS / Linux 通用写法,~ 会自动展开
python3 {baseDir}/generate_mindmap.py \
--title "标题" \
--output ~/Desktop/mindmap.html \
--data '{"central":"中心主题","branches":[...]}'
--output可省略,脚本自动选择合适的输出位置:
- macOS:
~/Desktop/mindmap_<时间戳>.html- Linux(有桌面):
~/Desktop/mindmap_<时间戳>.html- Linux(无桌面):
~/Documents/或~/
生成其他格式
# PNG(高清图片)
python3 {baseDir}/generate_mindmap.py \
--title "标题" --format png \
--output ~/Desktop/mindmap.png \
--data '...'
# JPG
python3 {baseDir}/generate_mindmap.py \
--title "标题" --format jpg \
--output ~/Desktop/mindmap.jpg \
--data '...'
# SVG(矢量,无依赖)
python3 {baseDir}/generate_mindmap.py \
--title "标题" --format svg \
--output ~/Desktop/mindmap.svg \
--data '...'
# PDF
python3 {baseDir}/generate_mindmap.py \
--title "标题" --format pdf \
--output ~/Desktop/mindmap.pdf \
--data '...'
# XMind(可用 XMind 软件直接打开,无依赖)
python3 {baseDir}/generate_mindmap.py \
--title "标题" --format xmind \
--output ~/Desktop/mindmap.xmind \
--data '...'
参数说明
| 参数 | 必填 | 说明 |
|---|---|---|
--title | ✅ | 页面标题(显示在顶部工具栏) |
--output | ❌ | 输出路径(省略则自动选择),支持 ~、$HOME、%USERPROFILE% |
--data | ✅ | JSON 字符串,描述思维导图结构 |
--format | ❌ | html(默认)/ png / jpg / svg / pdf / xmind |
--scale | ❌ | PNG/JPG/PDF 像素密度,默认 2.0,高清用 3.0 |
--quality | ❌ | JPG 质量 1–100,默认 92 |
HTML 文件的交互功能
生成的 HTML 在浏览器中打开后,告知用户以下操作:
| 操作 | 方式 |
|---|---|
| 拖动节点移位 | 鼠标按住节点主体拖动 |
| 调整节点宽度 | 悬停后拖动节点右边缘 |
| 调整节点高度 | 悬停后拖动节点下边缘 |
| 折叠/展开 | 点击节点,或右下角 +/− 按钮 |
| 缩放画布 | 滚轮缩放(以鼠标位置为中心) |
| 平移画布 | 拖拽空白区域 |
| 重置视图 | 顶部「⊙ 重置」 |
| 全展开/折叠 | 顶部「⊞ 展开」/「⊟ 折叠」 |
| 浏览器内导出 | 顶部工具栏:↓ SVG / ↓ PNG / ↓ JPG / ↓ PDF / ↓ XMind |
完整示例
python3 {baseDir}/generate_mindmap.py \
--title "AI 发展趋势" \
--format html \
--data '{
"central": "AI 发展趋势",
"branches": [
{
"label": "大语言模型",
"children": [
{"label": "能力提升", "children": ["多模态", "代码生成", "推理"]},
"开源生态",
"模型压缩"
]
},
{
"label": "AI Agent",
"children": [
"自主规划", "工具调用",
{"label": "记忆系统", "children": ["短期记忆", "长期记忆"]}
]
},
{
"label": "行业应用",
"children": ["医疗健康", "教育培训", "金融风控", "代码开发"]
},
{
"label": "安全挑战",
"children": ["幻觉问题", "隐私保护", "对齐研究"]
}
]
}'
执行成功后(输出路径由脚本自动打印),告知用户:
思维导图已保存到
<输出路径>,用浏览器打开即可查看。支持拖动节点、缩放、折叠,顶部工具栏可直接导出为 PNG / PDF / XMind。
Files
2 totalSelect a file
Select a file to preview.
Comments
Loading comments…
