一键导入
mindmap
Generate an interactive Markmap mindmap from a file, a URL, pasted text, or a topic.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generate an interactive Markmap mindmap from a file, a URL, pasted text, or a topic.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | mindmap |
| user-invocable | true |
| description | Generate an interactive Markmap mindmap from a file, a URL, pasted text, or a topic. |
| allowed-tools | Bash, Read, Write, Glob, WebFetch |
/mindmap <input> [--panel] [--render] [--output <path>]
<input> is one of:
http:// or https://) — fetch the page and map its contentFlags:
--panel — design the structure with a multi-agent judge panel (token-intensive; best for complex/important sources like papers). See Step 2 → Judge Panel.--render — after writing the .md, also produce a standalone interactive .html--output <path> — write the .md to this path instead of the defaultCross-harness note: This skill uses Claude Code tool names (
Read,Write,Glob,Bash,WebFetch). On GitHub Copilot CLI, use the equivalents (view,create,glob,bash,web_fetch) — seereferences/copilot-tools.md. The workflow itself is identical on both.
Strip the flags, then classify what remains and load the content:
http:// or https://), fetch it with WebFetch (ask it to return the page's main text content). The fetched content is the content. Check this first, before the file/text/topic rules.Stop and ask the user (never silently guess) when:
.md/.txt, or contains / or \) but the file does not exist → report no file at <path> and ask: map it as a topic instead, or fix the path?Turn the content into a node hierarchy:
Rules:
--panel)When --panel is passed, do not build the structure single-handed. Instead run a
multi-agent panel via the Workflow tool, using the prompts in
references/judge-panel.md:
core renders everywhere; rich = table/code/checkbox, standard-markmap only)..md.Use the Workflow skeleton and the exact prompts/schemas in the reference file. Cost note: this spawns ~7 agents and is token-intensive — reserve it for complex or high-stakes sources. If all proposers fail, fall back to the normal Step 2 single-pass build and tell the user.
Render-tier safety: the synthesizer keeps rich formats — they render on the
default .md path (markmap.js.org / VS Code ext / --render). The vertical
poster path (scripts/parse-md.mjs) reads only ## headings and -
bullets, so before sending a panel .md down the poster path, pass it through
scripts/degrade-rich.mjs (node scripts/degrade-rich.mjs <in.md> <out.md>),
which rewrites tables/code/checkboxes as bullets. Content is reshaped, never
silently dropped.
.mdWrite a file in the exact shape shown under Markmap Format below.
Output path:
foo.md → foo.mindmap.md (same directory).<slug>.mindmap.md in the current directory.<slug>.mindmap.md in the current directory (same slug rule as topic).<topic-slug>.mindmap.md in the current directory (slug = lowercase, spaces → -).--output <path> overrides the default and is written as given..mindmap.md — <name>-2.mindmap.md, then <name>-3.mindmap.md, … — and use the first name that is free. The same suffixing applies to an explicit --output path. Never overwrite an existing file silently.After writing, tell the user the exact path and how to view it: open it at https://markmap.js.org or with the VS Code “Markmap” extension.
--render): Render to HTMLrender.sh lives in the scripts/ folder next to this SKILL.md. If you don't already know that absolute path, locate it with Glob (**/skills/mindmap/scripts/render.sh), then run it by that path:
bash <skill-dir>/scripts/render.sh "<output.md>"
.html path on stdout — report it to the user.npx not available, exit code 3), the .md is still the guaranteed deliverable. Tell the user rendering was skipped, and show any manual command it printed (the exit-3 npx-missing case prints one). Do not treat this as a failure of the whole task.Write the .md like this:
---
title: <map title>
markmap:
colorFreezeLevel: 2
maxWidth: 300
---
# <Central topic>
## <Branch 1>
- <point>
- <sub-point>
- <point>
## <Branch 2>
- <point>
# H1 — the root / central topic.## H2 = main branches; ### and - bullets = deeper levels.**bold**, `code`, links) is allowed and passes through.colorFreezeLevel: 2, maxWidth: 300) as-is.Input (a structured snippet):
Retrieval-Augmented Generation
Indexing
Chunk documents, embed them, store the vectors.
Retrieval
Embed the query, find the nearest chunks.
Generation
Inject the retrieved context into the prompt.
Output retrieval-augmented-generation.mindmap.md:
---
title: Retrieval-Augmented Generation
markmap:
colorFreezeLevel: 2
maxWidth: 300
---
# Retrieval-Augmented Generation
## Indexing
- Chunk documents
- Embed chunks
- Store vectors
## Retrieval
- Embed the query
- Find nearest chunks
## Generation
- Inject context into prompt
--render needs Node.js / npx (uses npx markmap-cli, no global install).