Generate a mind map image from a topic or plaintext mind map content.
Setup (first run only)
If ${CLAUDE_SKILL_DIR}/scripts/node_modules does not exist, run:
cd ${CLAUDE_SKILL_DIR}/scripts && bun install
Workflow
-
Generate plaintext mind map content from
$ARGUMENTS. If the user provides a short topic, expand it into a full mind map tree (3-4 branches, 3-5 leaves each). If the user provides plaintext content, use it directly. -
Write the plaintext to
mindmap-input.txtin the session scratchpad directory (<scratchpad>below). A fixed/tmppath gets overwritten by parallel sessions. -
Run the script to render the mind map:
node ${CLAUDE_SKILL_DIR}/scripts/generate_mindmap.mjs -i "<scratchpad>/mindmap-input.txt" -o "<output-path>" [flags...]
- Print the script's stdout to the user. Open the output file with
open <path>.
Plaintext format
Use mind-elixir plaintext: a markdown-style indented list. Two-space indentation per level.
- Root Topic
- Branch 1
- Leaf 1a
- Leaf 1b
- Leaf 1c
- Branch 2
- Leaf 2a
- Leaf 2b
- Branch 3
- Leaf 3a
- Leaf 3b
- Leaf 3c
Keep topics short (2-5 words per node). Aim for 3-5 branches, 3-5 leaves per branch, max 3 levels deep.
For node colors, arrows, and summaries, see references/advanced-syntax.md.
Flags
-i input, -o output (.png or .svg; the format follows the extension), -f png|svg, -t academic|latte|dark, -d side|right|left, -s scale (default 3), --typst, --caption "...", --typst-width 90%
The .svg output is the PNG render inside an SVG container (mind-elixir draws DOM, not SVG): it is raster, so prefer .png with a higher -s unless a file must end in .svg. --typst prints the path exactly as passed to -o, so pass it relative to the .typ file.
-o is required (the script has no --dir and no auto-naming): unless the user gives a path, use mindmaps/<topic-slug>.png.
Example invocation
For /mindmap "Portfolio Theory":
node ${CLAUDE_SKILL_DIR}/scripts/generate_mindmap.mjs \
-i "<scratchpad>/mindmap-input.txt" \
-o "mindmaps/portfolio-theory.png"

微信扫一扫