xmind
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseXMind Mind Map Creator
XMind 思维导图生成工具
Create files by building a JSON structure and piping it to the bundled script.
.xmind通过构建JSON结构并将其传入捆绑脚本,创建文件。
.xmindHow to create an XMind file
如何创建XMind文件
- Build a JSON object with and
pathfields (see format below)sheets - Write it to a temp file, then run:
bash
node <skill-dir>/scripts/create_xmind.mjs < /tmp/xmind_input.jsonWhere is the directory containing this SKILL.md file.
<skill-dir>- 构建包含和
path字段的JSON对象(格式见下文)sheets - 将其写入临时文件,然后运行:
bash
node <skill-dir>/scripts/create_xmind.mjs < /tmp/xmind_input.json其中是包含此SKILL.md文件的目录。
<skill-dir>JSON Input Format
JSON输入格式
json
{
"path": "/Users/user/Desktop/my_mindmap.xmind",
"sheets": [
{
"title": "Sheet 1",
"rootTopic": {
"title": "Central Topic",
"children": [
{
"title": "Branch 1",
"notes": "Plain text note",
"children": [
{ "title": "Sub-topic A" },
{ "title": "Sub-topic B" }
]
}
]
},
"relationships": [
{ "sourceTitle": "Sub-topic A", "targetTitle": "Sub-topic B", "title": "related" }
]
}
]
}json
{
"path": "/Users/user/Desktop/my_mindmap.xmind",
"sheets": [
{
"title": "Sheet 1",
"rootTopic": {
"title": "Central Topic",
"children": [
{
"title": "Branch 1",
"notes": "Plain text note",
"children": [
{ "title": "Sub-topic A" },
{ "title": "Sub-topic B" }
]
}
]
},
"relationships": [
{ "sourceTitle": "Sub-topic A", "targetTitle": "Sub-topic B", "title": "related" }
]
}
]
}Topic Properties
主题属性
Each topic object supports:
| Field | Type | Description |
|---|---|---|
| string (required) | Topic title |
| array of topics | Child topics |
| string or | Notes. HTML supports: |
| string | External URL link |
| string | Absolute path to a file to attach (embedded in the .xmind). Mutually exclusive with |
| string | Title of another topic to link to (internal |
| string[] | Tags/labels |
| string[] | Marker IDs: |
| string[] | Callout text bubbles |
| | Visual grouping of children. Range: |
| | Summary topics spanning children ranges |
| string | Layout (see below) |
| string | Topic shape (see shapes below) |
| | Absolute position (only for detached topics in free-positioning sheets) |
每个主题对象支持以下属性:
| 字段 | 类型 | 说明 |
|---|---|---|
| 字符串(必填) | 主题标题 |
| 主题数组 | 子主题 |
| 字符串或 | 备注。HTML支持: |
| 字符串 | 外部URL链接 |
| 字符串 | 要附加的文件的绝对路径(嵌入到.xmind文件中)。与 |
| 字符串 | 要链接到的另一个主题的标题(内部 |
| 字符串数组 | 标签/标记 |
| 字符串数组 | 标记ID: |
| 字符串数组 | 标注文本气泡 |
| | 子主题的可视化分组。范围格式: |
| | 覆盖子主题范围的汇总主题 |
| 字符串 | 布局(见下文) |
| 字符串 | 主题形状(见下文形状列表) |
| | 绝对位置(仅适用于自由定位工作表中的独立主题) |
Topic shapes
主题形状
- — rounded rectangle (default)
org.xmind.topicShape.roundedRect - — diamond (use for conditions/decisions)
org.xmind.topicShape.diamond - — ellipse (use for start/end)
org.xmind.topicShape.ellipserect - — rectangle
org.xmind.topicShape.rect - — underline only
org.xmind.topicShape.underline - — circle
org.xmind.topicShape.circle - — parallelogram (use for I/O)
org.xmind.topicShape.parallelogram
- — 圆角矩形(默认)
org.xmind.topicShape.roundedRect - — 菱形(用于条件/决策)
org.xmind.topicShape.diamond - — 椭圆形(用于开始/结束节点)
org.xmind.topicShape.ellipserect - — 矩形
org.xmind.topicShape.rect - — 仅下划线
org.xmind.topicShape.underline - — 圆形
org.xmind.topicShape.circle - — 平行四边形(用于输入/输出)
org.xmind.topicShape.parallelogram
Layout structures
布局结构
- — balanced map
org.xmind.ui.map.clockwise - — unbalanced map
org.xmind.ui.map.unbalanced - — logic chart (right)
org.xmind.ui.logic.right - — org chart (down)
org.xmind.ui.org-chart.down - — tree (right)
org.xmind.ui.tree.right - — fishbone
org.xmind.ui.fishbone.leftHeaded - — timeline
org.xmind.ui.timeline.horizontal
- — 平衡思维导图
org.xmind.ui.map.clockwise - — 非平衡思维导图
org.xmind.ui.map.unbalanced - — 逻辑图(向右)
org.xmind.ui.logic.right - — 组织结构图(向下)
org.xmind.ui.org-chart.down - — 树形图(向右)
org.xmind.ui.tree.right - — 鱼骨图
org.xmind.ui.fishbone.leftHeaded - — 时间线
org.xmind.ui.timeline.horizontal
Task properties
任务属性
Simple checkbox (no dates needed):
- :
taskStatusor"todo""done"
Planned tasks (for Gantt/timeline view in XMind):
| Field | Type | Description |
|---|---|---|
| number 0.0-1.0 | Completion progress |
| number 1-9 | Priority (1=highest) |
| ISO 8601 string | Start date, e.g. |
| ISO 8601 string | Due date |
| number | Duration in days (preferred for relative planning) |
| array | |
Two approaches for planned tasks:
- Relative (preferred): Use +
durationDays. XMind auto-calculates dates.dependencies - Absolute: Use +
startDatefor fixed dates.dueDate
When the user mentions "planning", "schedule", "timeline", "Gantt", "project", "phases", use RELATIVE planned tasks unless specific dates are given.
简单复选框(无需日期):
- :
taskStatus或"todo""done"
计划任务(用于XMind中的甘特图/时间线视图):
| 字段 | 类型 | 说明 |
|---|---|---|
| 数字(0.0-1.0) | 完成进度 |
| 数字(1-9) | 优先级(1=最高) |
| ISO 8601格式字符串 | 开始日期,例如 |
| ISO 8601格式字符串 | 截止日期 |
| 数字 | 持续天数(相对规划首选) |
| 数组 | |
计划任务的两种方式:
- 相对方式(首选):使用+
durationDays。XMind会自动计算日期。dependencies - 绝对方式:使用+
startDate设置固定日期。dueDate
当用户提到“规划”、“日程”、“时间线”、“甘特图”、“项目”、“阶段”时,除非给出具体日期,否则使用相对方式的计划任务。
Sheet properties
工作表属性
| Field | Type | Description |
|---|---|---|
| string (required) | Sheet title |
| topic (required) | Root topic |
| array | |
| array of topics | Free-floating topics (require |
| boolean | Enable free topic positioning (for logic/flow diagrams) |
| 字段 | 类型 | 说明 |
|---|---|---|
| 字符串(必填) | 工作表标题 |
| 主题(必填) | 根主题 |
| 数组 | |
| 主题数组 | 自由浮动主题(需要开启 |
| 布尔值 | 启用主题自由定位(用于逻辑/流程图) |
Logic / Flow diagrams
逻辑/流程图
For flowcharts, logic diagrams, or algorithmic diagrams, use free positioning with detached topics and straight relationships:
json
{
"path": "/tmp/flowchart.xmind",
"sheets": [{
"title": "Algorithm",
"freePositioning": true,
"rootTopic": {
"title": "START",
"shape": "org.xmind.topicShape.ellipserect",
"structureClass": "org.xmind.ui.map.clockwise"
},
"detachedTopics": [
{"title": "IS X > 0?", "position": {"x": 0, "y": 130}, "shape": "org.xmind.topicShape.diamond"},
{"title": "PRINT YES", "position": {"x": 200, "y": 130}},
{"title": "PRINT NO", "position": {"x": -200, "y": 130}},
{"title": "END", "position": {"x": 0, "y": 260}, "shape": "org.xmind.topicShape.ellipserect"}
],
"relationships": [
{"sourceTitle": "START", "targetTitle": "IS X > 0?", "shape": "org.xmind.relationshipShape.straight"},
{"sourceTitle": "IS X > 0?", "targetTitle": "PRINT YES", "title": "YES", "shape": "org.xmind.relationshipShape.straight"},
{"sourceTitle": "IS X > 0?", "targetTitle": "PRINT NO", "title": "NO", "shape": "org.xmind.relationshipShape.straight"},
{"sourceTitle": "PRINT YES", "targetTitle": "END", "shape": "org.xmind.relationshipShape.straight"},
{"sourceTitle": "PRINT NO", "targetTitle": "END", "shape": "org.xmind.relationshipShape.straight"}
]
}]
}Conventions: Use ellipse for start/end, diamond for conditions, rectangle (default) for actions, parallelogram for I/O. Use for all connectors. Position topics on a grid (y increments of ~130px, x offsets of ~200px for branches).
"org.xmind.relationshipShape.straight"When the user mentions "flowchart", "algorithm", "logic diagram", "organigramme de programmation", "diagramme logique", use this pattern.
对于流程图、逻辑图或算法图,请使用自由定位+独立主题+直线关系:
json
{
"path": "/tmp/flowchart.xmind",
"sheets": [{
"title": "Algorithm",
"freePositioning": true,
"rootTopic": {
"title": "START",
"shape": "org.xmind.topicShape.ellipserect",
"structureClass": "org.xmind.ui.map.clockwise"
},
"detachedTopics": [
{"title": "IS X > 0?", "position": {"x": 0, "y": 130}, "shape": "org.xmind.topicShape.diamond"},
{"title": "PRINT YES", "position": {"x": 200, "y": 130}},
{"title": "PRINT NO", "position": {"x": -200, "y": 130}},
{"title": "END", "position": {"x": 0, "y": 260}, "shape": "org.xmind.topicShape.ellipserect"}
],
"relationships": [
{"sourceTitle": "START", "targetTitle": "IS X > 0?", "shape": "org.xmind.relationshipShape.straight"},
{"sourceTitle": "IS X > 0?", "targetTitle": "PRINT YES", "title": "YES", "shape": "org.xmind.relationshipShape.straight"},
{"sourceTitle": "IS X > 0?", "targetTitle": "PRINT NO", "title": "NO", "shape": "org.xmind.relationshipShape.straight"},
{"sourceTitle": "PRINT YES", "targetTitle": "END", "shape": "org.xmind.relationshipShape.straight"},
{"sourceTitle": "PRINT NO", "targetTitle": "END", "shape": "org.xmind.relationshipShape.straight"}
]
}]
}约定: 使用椭圆形表示开始/结束,菱形表示条件,矩形(默认)表示操作,平行四边形表示输入/输出。所有连接线使用。将主题放置在网格上(y轴增量约130px,分支x轴偏移约200px)。
"org.xmind.relationshipShape.straight"当用户提到“流程图”、“算法”、“逻辑图”、“organigramme de programmation”、“diagramme logique”时,使用此模式。
Working with large files
处理大文件
When reading a PDF or other large file fails (e.g. "PDF too large"), extract text using CLI tools before building the mind map:
bash
undefined当读取PDF或其他大文件失败时(例如“PDF过大”),先使用CLI工具提取文本,再构建思维导图:
bash
undefinedPreferred: pdftotext (install: apt install poppler-utils)
首选:pdftotext(安装:apt install poppler-utils)
pdftotext input.pdf /tmp/extracted.txt
pdftotext input.pdf /tmp/extracted.txt
Fallback if pdftotext unavailable:
如果pdftotext不可用的备选方案:
python3 -c "
import subprocess, pathlib, sys
p = sys.argv[1]
try:
subprocess.run(['pdftotext', p, '/tmp/extracted.txt'], check=True)
except FileNotFoundError:
subprocess.run(['pip', 'install', 'pymupdf'], check=True, capture_output=True)
import importlib; fitz = importlib.import_module('fitz')
doc = fitz.open(p)
pathlib.Path('/tmp/extracted.txt').write_text('\n'.join(page.get_text() for page in doc))
" input.pdf
Then read `/tmp/extracted.txt` to build the mind map.python3 -c "
import subprocess, pathlib, sys
p = sys.argv[1]
try:
subprocess.run(['pdftotext', p, '/tmp/extracted.txt'], check=True)
except FileNotFoundError:
subprocess.run(['pip', 'install', 'pymupdf'], check=True, capture_output=True)
import importlib; fitz = importlib.import_module('fitz')
doc = fitz.open(p)
pathlib.Path('/tmp/extracted.txt').write_text('\n'.join(page.get_text() for page in doc))
" input.pdf
然后读取`/tmp/extracted.txt`来构建思维导图。Important rules
重要规则
- The output path MUST end with
.xmind - Always write the file where the user requests (e.g. ~/Downloads, ~/Desktop)
- IDs are generated automatically
- Topic references in relationships and dependencies are resolved by title
- HTML notes: only ,
<strong>,<u>,<ul>,<ol>,<li>are supported.<br>is NOT supported by XMind.<code> - Internal links () work across sheets
linkToTopic - Notes should be substantial and detailed — don't just repeat the topic title. Use notes to add explanations, context, definitions, examples, key points, or reasoning. Aim for 2-5 sentences minimum per note. Use HTML notes with ,
<strong>/<ul>,<li>for well-structured content. Most topics should have notes unless they are self-explanatory leaf nodes.<br>
- 输出路径必须以结尾
.xmind - 始终将文件写入用户指定的位置(例如~/Downloads、~/Desktop)
- ID会自动生成
- 关系和依赖中的主题引用通过标题解析
- HTML备注:仅支持,
<strong>,<u>,<ul>,<ol>,<li>。XMind不支持<br>。<code> - 内部链接()跨工作表生效
linkToTopic - 备注应详实具体——不要仅重复主题标题。使用备注添加解释、上下文、定义、示例、关键点或推理。每个备注至少2-5句话。使用带有、
<strong>/<ul>、<li>的HTML备注来构建结构清晰的内容。除非是自解释的叶子节点,否则大多数主题都应有备注。<br>