mcpField
M
mermaid-mind-map

mermaid-mind-map

github.com/mblodeProductivity169124 installsUpdated 2d ago
Repository

About mermaid-mind-map

Mermaid Mind Map analyzes source material and produces a Mermaid mindmap with a structured hierarchy. It supports topic exploration, codebase overviews, document summaries, and feature planning or debugging.

Key features

  1. 01Analyze topics, codebases, and documents
  2. 02Extract themes and relationships
  3. 03Generate hierarchical Mermaid mindmaps
  4. 04Validate depth, node count, and syntax

Use cases

  1. 01Map modules and dependencies in a codebase
  2. 02Summarize the structure of a document visually
  3. 03Break feature requirements or debugging symptoms into branches

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/mblode/agent-skills --skill mermaid-mind-map

After installing, type/mermaid-mind-mapin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
generation-guidelines.md
mermaid-reference.md
mermaid-syntax.md

Details

From the project README

Mermaid Mind Map

Analyze source material and produce a Mermaid mindmap diagram with 2-4 levels of branching hierarchy.

Reference Files

FileRead When
references/mermaid-syntax.mdDefault: mind map node shapes, indentation, icons, known limitations
references/generation-guidelines.mdDefault: node text constraints, depth control, source-type strategies
references/mermaid-reference.mdGenerating non-mind-map Mermaid diagrams or needing broader syntax

Workflow

Copy this checklist to track progress:

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
Step 1: Determine source type

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.
Step 2: Set scope

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.

Step 3: Extract structure
  • 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.
Step 4: Generate Mermaid mind map

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
Step 5: Validate

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)
Step 6: Present output

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.

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

Related skills

  • presentation-creator for slide decks that complement visual overviews
  • define-architecture for detailed architecture decisions beyond visual mapping

Comments

Markdown supported