mermaid-mind-map

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Mermaid Mind Map

Mermaid 思维导图

Analyze source material and produce a Mermaid
mindmap
diagram with 2-4 levels of branching hierarchy.
分析源材料,生成具有2-4级分支层级的Mermaid
mindmap
图表。

Reference Files

参考文件

FileRead When
references/mermaid-syntax.md
Default: mind map node shapes, indentation, icons, known limitations
references/generation-guidelines.md
Default: node text constraints, depth control, source-type strategies
references/mermaid-reference.md
Generating non-mind-map Mermaid diagrams or needing broader syntax
文件读取时机
references/mermaid-syntax.md
默认场景:思维导图节点形状、缩进、图标、已知限制
references/generation-guidelines.md
默认场景:节点文本约束、深度控制、源类型策略
references/mermaid-reference.md
生成非思维导图类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
    ,
    pyproject.toml
    , etc.). Map modules, entry points, and dependencies.
  • 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
references/generation-guidelines.md
(overview, standard, or detailed). Ask the user only if unclear. Default to standard (3 levels, 15-30 nodes).
Set the central concept: one clear noun or short phrase (1-3 words) for the root node. Total node budget: 40 max.
参考
references/generation-guidelines.md
中的表格选择深度层级(概览、标准或详细)。仅当不明确时询问用户,默认使用标准层级(3级,15-30个节点)。
确定核心概念:根节点使用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
    references/generation-guidelines.md
    for node text word limits and keyword extraction techniques.
  • 从源材料中确定3-7个主分支(理想数量为5个)。
  • 根据深度设置,每个分支下确定2-5个子节点。
  • 将相关概念归到同一分支下。
  • 每个节点必须是单个关键词或短句,不能是完整句子。
  • 可参考
    references/generation-guidelines.md
    中的节点文本字数限制和关键词提取技巧。

Step 4: Generate Mermaid mind map

步骤4:生成Mermaid思维导图

Load
references/mermaid-syntax.md
for exact syntax. Generate inside a fenced
mermaid
code block.
Use node shapes intentionally (see
references/generation-guidelines.md
for the full shape strategy):
  • Root:
    ((circle))
    for the central concept
  • Main branches:
    [square]
    for categories,
    (rounded)
    for processes
  • Leaf nodes: default for general items,
    {cloud}
    for uncertain items
查阅
references/mermaid-syntax.md
获取准确语法。在带围栏的
mermaid
代码块中生成图表。
有目的地使用节点形状(完整形状策略请参考
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
mermaid
code block:
```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
.md
file containing the fenced block.
在带围栏的
mermaid
代码块中输出思维导图:
```mermaid
mindmap
  root((核心概念))
    [分支1]
      子主题A
      子主题B
    [分支2]
      子主题C
      (流程D)
```
说明可渲染的平台:GitHub Markdown、Mermaid在线编辑器、安装了Mermaid扩展的VS Code。
若用户要求文件形式,则写入包含上述围栏代码块的
.md
文件。

Anti-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
    mindmap
    with other Mermaid diagram types in one code block
  • 将句子作为节点标签(应拆分为父概念加子详情)
  • 深度超过4级(Mermaid图表会变得难以阅读,应拆分为多个图表)
  • 节点数量超过40个(应拆分为多个聚焦的图表)
  • 未经过请求就添加图标(需要Font Awesome支持,可能无法渲染)
  • 在单个代码块中混合
    mindmap
    与其他Mermaid图表类型

Related skills

相关技能

  • presentation-creator
    for slide decks that complement visual overviews
  • define-architecture
    for detailed architecture decisions beyond visual mapping
  • presentation-creator
    :用于生成可补充可视化概览的幻灯片
  • define-architecture
    :用于进行可视化映射之外的详细架构决策