mermaid-mind-map
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMermaid Mind Map
Mermaid 思维导图
Analyze source material and produce a Mermaid diagram with 2-4 levels of branching hierarchy.
mindmap分析源材料,生成具有2-4级分支层级的Mermaid 图表。
mindmapReference Files
参考文件
| File | Read When |
|---|---|
| Default: mind map node shapes, indentation, icons, known limitations |
| Default: node text constraints, depth control, source-type strategies |
| Generating non-mind-map Mermaid diagrams or needing broader syntax |
| 文件 | 读取时机 |
|---|---|
| 默认场景:思维导图节点形状、缩进、图标、已知限制 |
| 默认场景:节点文本约束、深度控制、源类型策略 |
| 生成非思维导图类Mermaid图表或需要更全面语法参考时 |
Workflow
工作流
Copy this checklist to track progress:
text
Mind map progress:
- [ ] Step 1: Determine source type
- [ ] Step 2: Set scope (depth, budget, central concept)
- [ ] Step 3: Extract structure
- [ ] Step 4: Generate Mermaid mind map
- [ ] Step 5: Validate output
- [ ] Step 6: Present to user复制以下检查清单跟踪进度:
text
思维导图进度:
- [ ] 步骤1:确定源类型
- [ ] 步骤2:设置范围(深度、节点数量上限、核心概念)
- [ ] 步骤3:提取结构
- [ ] 步骤4:生成Mermaid思维导图
- [ ] 步骤5:验证输出
- [ ] 步骤6:交付给用户Step 1: Determine source type
步骤1:确定源类型
Identify which source type applies and run the corresponding discovery actions:
- Topic exploration: User names a concept. Ask one clarifying question about scope or audience if ambiguous. No file scanning needed.
- Codebase overview: Scan project structure. Read key config files (,
package.json, etc.). Map modules, entry points, and dependencies.pyproject.toml - File/document summary: Read the target file. Extract key themes, sections, and relationships between ideas.
- Feature planning / debugging: Gather requirements or symptoms. Decompose into components, phases, or possible causes.
识别适用的源类型并执行对应的探索操作:
- 主题探索:用户指定某个概念。若范围或受众不明确,可提出一个澄清问题。无需扫描文件。
- 代码库概览:扫描项目结构,读取关键配置文件(、
package.json等),梳理模块、入口点及依赖关系。pyproject.toml - 文件/文档总结:读取目标文件,提取核心主题、章节及观点间的关联。
- 功能规划/调试:收集需求或问题症状,拆解为组件、阶段或可能的原因。
Step 2: Set scope
步骤2:设置范围
Choose a depth level using the table in (overview, standard, or detailed). Ask the user only if unclear. Default to standard (3 levels, 15-30 nodes).
references/generation-guidelines.mdSet the central concept: one clear noun or short phrase (1-3 words) for the root node. Total node budget: 40 max.
参考中的表格选择深度层级(概览、标准或详细)。仅当不明确时询问用户,默认使用标准层级(3级,15-30个节点)。
references/generation-guidelines.md确定核心概念:根节点使用1-3个单词组成的清晰名词或短句。节点总数上限为40个。
Step 3: Extract structure
步骤3:提取结构
- Identify 3-7 main branches from the source material (5 is ideal).
- For each branch, identify 2-5 sub-nodes per the depth setting.
- Group related concepts under the same branch.
- Each node must be a single keyword or short phrase, never a sentence.
- See for node text word limits and keyword extraction techniques.
references/generation-guidelines.md
- 从源材料中确定3-7个主分支(理想数量为5个)。
- 根据深度设置,每个分支下确定2-5个子节点。
- 将相关概念归到同一分支下。
- 每个节点必须是单个关键词或短句,不能是完整句子。
- 可参考中的节点文本字数限制和关键词提取技巧。
references/generation-guidelines.md
Step 4: Generate Mermaid mind map
步骤4:生成Mermaid思维导图
Load for exact syntax. Generate inside a fenced code block.
references/mermaid-syntax.mdmermaidUse node shapes intentionally (see for the full shape strategy):
references/generation-guidelines.md- Root: for the central concept
((circle)) - Main branches: for categories,
[square]for processes(rounded) - Leaf nodes: default for general items, for uncertain items
{cloud}
查阅获取准确语法。在带围栏的代码块中生成图表。
references/mermaid-syntax.mdmermaid有目的地使用节点形状(完整形状策略请参考):
references/generation-guidelines.md- 根节点:使用表示核心概念
((circle)) - 主分支:使用表示分类,
[square]表示流程(rounded) - 叶子节点:普通项使用默认形状,不确定项使用
{cloud}
Step 5: Validate
步骤5:验证
Run these checks before presenting. If any fail, revise and re-check:
- Total node count (including root) is 40 or fewer
- Maximum depth does not exceed selected level
- No node text exceeds 6 words
- Root node text is 1-3 words
- Each main branch has 2-7 children
- No single-child branches (merge upward if found)
- No unescaped in plain-text nodes (will break Mermaid parsing)
()[]{} - Branch depths are balanced (within 1 level of each other)
交付前执行以下检查,若有不通过项则修改后重新检查:
- 节点总数(含根节点)不超过40个
- 最大深度不超过选定层级
- 节点文本不超过6个单词
- 根节点文本为1-3个单词
- 每个主分支有2-7个子节点
- 无仅含单个子节点的分支(若存在则向上合并)
- 纯文本节点中无未转义的(会破坏Mermaid解析)
()[]{} - 分支深度保持平衡(彼此相差不超过1级)
Step 6: Present output
步骤6:交付输出
Output the mind map in a fenced code block:
mermaid```mermaid
mindmap
root((Central Concept))
[Branch 1]
Sub-topic A
Sub-topic B
[Branch 2]
Sub-topic C
(Process D)
```Note where it renders: GitHub markdown, Mermaid Live Editor, VS Code with Mermaid extension.
If the user requests a file, write to a file containing the fenced block.
.md在带围栏的代码块中输出思维导图:
mermaid```mermaid
mindmap
root((核心概念))
[分支1]
子主题A
子主题B
[分支2]
子主题C
(流程D)
```说明可渲染的平台:GitHub Markdown、Mermaid在线编辑器、安装了Mermaid扩展的VS Code。
若用户要求文件形式,则写入包含上述围栏代码块的文件。
.mdAnti-patterns
反模式
- Sentences as node labels (split into parent concept with child details instead)
- Depth beyond 4 levels (Mermaid becomes unreadable; split into multiple maps)
- More than 40 nodes (split into multiple focused maps)
- Adding icons unless requested (require Font Awesome, may not render)
- Mixing with other Mermaid diagram types in one code block
mindmap
- 将句子作为节点标签(应拆分为父概念加子详情)
- 深度超过4级(Mermaid图表会变得难以阅读,应拆分为多个图表)
- 节点数量超过40个(应拆分为多个聚焦的图表)
- 未经过请求就添加图标(需要Font Awesome支持,可能无法渲染)
- 在单个代码块中混合与其他Mermaid图表类型
mindmap
Related skills
相关技能
- for slide decks that complement visual overviews
presentation-creator - for detailed architecture decisions beyond visual mapping
define-architecture
- :用于生成可补充可视化概览的幻灯片
presentation-creator - :用于进行可视化映射之外的详细架构决策
define-architecture