XMind Mind Map Processing Skill
This skill provides complete processing capabilities for XMind files (
): parsing, creation, and updating. File operations are implemented through the accompanying Python tool script, and mind map content is converted to Markdown format as session-level memory, facilitating continuous communication and editing between users and the model.
Tool Script
This skill depends on
(relative to this skill directory) and uses Python standard libraries (zero third-party dependencies). Execution method:
bash
python skills/xmind/scripts/xmind_tool.py --session <session-id> <command> [args...]
Session Management
All commands require the
parameter to isolate memory files for different sessions.
Session ID Acquisition Rules (by priority):
- Obtain from context: If a previously used session ID already exists in the current conversation context, reuse it directly
- Generate new ID: If no available session ID exists in the context, generate a UUID v4 format string (e.g.,
f47ac10b-58cc-4372-a567-0e02b2c3d479
) before the first call, and continue to reuse it in subsequent calls
- Memory file storage path:
/tmp/skills-xmind-parsed/<session-id>/<filename>.md
Supported Formats
| Format | Version | Internal Structure | Detection Method |
|---|
| Zen | XMind Zen / 2020+ | ZIP containing | Automatic detection |
| Legacy | XMind 8 | ZIP containing | Automatic detection |
New files are created in Zen format by default; when updating existing files, the original format is retained.
Markdown Representation Specification
Parsed Markdown uses an indented list structure, formatted as follows:
markdown
# Sheet: Worksheet Title
## Central Topic
> Labels: Label1, Label2
> Link: https://example.com
> Markers: priority-1
> This is the note content of the central topic
- Branch 1 {labels: important} {link: https://example.com}
> This is the note for Branch 1
> Notes can have multiple lines
- Sub-node 1.1 {markers: task-done, priority-1}
- Sub-sub-node 1.1.1
- Sub-node 1.2
- Branch 2
- Sub-node 2.1
- Sub-node 2.2
Format Explanation:
- — Worksheet title (separate multiple worksheets with )
- — Central topic
- — Node, use 2-space indentation to indicate hierarchy
- — Inline label metadata
- — Inline hyperlink metadata
- — Inline marker/icon metadata
- — Node note (in blockquote format, immediately following the node)
- Metadata for the central topic uses top-level blockquotes (, , )
Core Workflow
Scenario 1: Parse XMind File
Trigger Words: "parse xmind", "open mind map", "view xmind content", "xmind to markdown"
Steps:
-
Confirm File Path: Verify whether the
file path provided by the user exists
-
Execute Parsing: Run the tool script
bash
python skills/xmind/scripts/xmind_tool.py --session <session-id> parse <file.xmind>
-
Display Results: Show the output Markdown content to the user, including:
- Overview of the overall structure of the mind map
- Hierarchical relationships of each node
- Attached metadata such as labels, notes, and links
-
Record Memory Path: The
<!-- memory_file: ... -->
comment at the end of the output contains the memory file path; remember this path for subsequent operations
-
Guide Interaction: Prompt the user that they can continue to ask questions, modify, or export the mind map content
Scenario 2: Create XMind File
Trigger Words: "create xmind", "new mind map", "generate xmind"
Steps:
-
Collect Requirements: Communicate with the user to clarify the structure of the mind map:
- What is the central topic?
- What are the main branches?
- What sub-nodes are under each branch?
- Do you need to add labels, notes, links, etc.?
-
Generate Markdown: Generate content according to the above Markdown specification based on the user's description
-
Write to Temporary Markdown File and Execute Creation:
bash
# Write markdown content to a temporary file, then execute creation
python skills/xmind/scripts/xmind_tool.py --session <session-id> create <output.xmind> <temp.md> [--format zen|legacy]
-
Confirm Creation Result: Report successful file creation to the user and display the file path
-
Retain Memory: The memory file is automatically created, and can be edited subsequently
Format Selection:
- Zen format is created by default (modern format with better compatibility)
- If the user explicitly requires XMind 8 compatible format, use the parameter
Scenario 3: Update XMind File
Trigger Words: "update xmind", "modify mind map", "edit xmind"
Steps:
-
Load Current Content:
-
First attempt to read the memory file (if parsed before):
bash
python skills/xmind/scripts/xmind_tool.py --session <session-id> memory <file.xmind>
-
If there is no memory file, perform parsing first:
bash
python skills/xmind/scripts/xmind_tool.py --session <session-id> parse <file.xmind>
-
Understand Modification Requirements: Confirm the modifications to be made with the user, such as:
- Add new branches or sub-nodes
- Delete a node
- Modify node content, labels, or notes
- Adjust node hierarchical relationships
-
Modify Markdown: Make modifications based on the memory file, ensuring the format complies with the specification
-
Write Modified Markdown: Write the modified content to a temporary file
-
Execute Update:
bash
python skills/xmind/scripts/xmind_tool.py --session <session-id> update <file.xmind> <modified.md>
-
Confirm Result: Report successful update to the user and display the change summary
Scenario 4: Continue Communication Based on Memory
When the user mentions a previously parsed xmind file again in the same session:
- Read Memory File: Use the command to retrieve the previously parsed content
- Answer Based on Content: Answer the user's question based on the Markdown content
- Supported Operations:
- Summarize key points of the mind map
- Search for specific nodes
- Analyze structure and hierarchical relationships
- Propose improvement suggestions
- Convert content to other formats (outline, table, etc.)
Notes
- Parsing and creation operations involve file I/O; verify the path is valid before execution
- Update operations will overwrite the original file; if the user does not explicitly request it, it is recommended to back up or save as a new file first
- Memory files are stored in
/tmp/skills-xmind-parsed/<session-id>/
and may be cleaned up by the system after the session ends
- If a damaged xmind file is encountered (invalid ZIP or missing key content files), report the specific error to the user
- Image attachments in XMind files will not be included in Markdown; only text structure and metadata are processed
- Use Chinese to interact with users throughout the process