一键导入
mind-master
Local-first Word/PDF to Markmap mind map workflow with LaTeX math, image selection, screenshot capture, validation, and SVG/PNG/PDF export.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Local-first Word/PDF to Markmap mind map workflow with LaTeX math, image selection, screenshot capture, validation, and SVG/PNG/PDF export.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | mind-master |
| description | Local-first Word/PDF to Markmap mind map workflow with LaTeX math, image selection, screenshot capture, validation, and SVG/PNG/PDF export. |
Mind-Master turns a local Word or PDF document into a high-quality interactive mind map. It follows the ppt-master style: Skill entrypoint, durable reference specs, scripts for repeatable work, serial role handoff, and explicit GATE checkpoints.
The workflow is local-first. Do not upload source documents or generated assets by default.
Use this skill when the user asks for:
DOCX/PDF
-> [1. Convert Source to Markdown]
-> [2. Initialize Project]
-> [3. Extract Assets]
-> [3.5 Split Section Maps, optional]
-> [4. Strategist Outline]
-> [5. Image/Screenshot Decision]
-> [6. Executor Render]
-> [7. Formula and Image Validation]
-> [8. Export]
✅ checkpoint with concrete delivered paths and wait for user confirmation before continuing.--move for source import. After project_manager.py import-sources, the original source path should no longer retain the file.references/ files in one pass and do not reread them during generation.preserve_full, preserve_crop, redraw_high_fidelity, redraw_concept, or omit; omit is the default. Screenshots/slides/photos must not be directly embedded through <img> as raw originals; use preserve_crop only for source-faithful learning evidence, and use redraw only through a registered SVG template.source_quote / source_span, tables, formulas, and figure decisions intact.[*] and marked with derived_from_summary or grounded_hint; they must not become fake sections such as 5.4 or 5.5.callouts, each with a short conclusion and a source_quote found in the active source.source_quote / source_span for validation.icon metadata when the node type is recognizable, using simple line icons such as database, file-text, gauge, line-chart, scale, running, lightbulb, settings, list-checks, key, and wrench.evidence_title, source figure label, image/redraw, and source-backed callouts. Keywords, Momentum advantages, and tuning hints must merge into one bottom learning band, not scatter as fake numbered sections..balanced-layout content bbox: prefer a 16:9 canvas, accept 4:3 only when content requires it, keep top/edge/center voids small, and validate left-branch height, evidence-card compactness, compact comparison tables, and the three-column learning band..balanced-evidence-card; fix overflow through layout/CSS/validation, not by hiding source-backed content.data-node-id, data-parent-id, data-connector-role, data-side), and connectors must route from parent edge ports to child edge ports with visible endpoint markers.Read only what the current stage needs, except Step 6 where batch preread is required.
references/shared-standards.md: global design and content limitsreferences/strategist.md: Step 4 planning rolereferences/executor-base.md: Step 6 common execution rulesreferences/executor-classic.md: classic radial stylereferences/executor-logic.md: logic tree or fishbone stylereferences/executor-org.md: org or hierarchy stylereferences/mindmap-formats.md: JSON, Markdown, HTML, SVG, PNG, PDF contractsreferences/math-rendering.md: OMML, LaTeX, MathML, KaTeX rulesreferences/image-policy.md: image selection, screenshots, preserve/crop/redraw policy, callouts, copyright, readabilityDefault project root:
projects/<project_name>/
Required project layout:
projects/<project_name>/
├── manifest.json
├── sources/
├── assets/
│ ├── images/
│ │ └── index.json
│ └── equations/
├── intermediate/
│ ├── source.md
│ ├── sections/
│ │ ├── index.json
│ │ └── <section_id>.md
│ ├── outline.json
│ └── mindmap.json
├── exports/
│ ├── <project_name>.html
│ ├── <project_name>.svg
│ ├── <project_name>.png
│ └── <project_name>.pdf
└── maps/
└── <section_id>/
├── intermediate/
│ ├── outline.json
│ ├── mindmap.json
│ └── validation.json
└── exports/
├── <section_id>.html
├── <section_id>.svg
├── <section_id>.png
└── <section_id>.pdf
Section map mode:
maps/<section_id>/ workspace per major document section when the source is naturally divided into lessons, chapters, or modules.# 第5节课 and # 第6节课, each H1 section becomes one independent mind map. The H1 is the map root; its H2 headings become the first-level branches.maps/<section_id>/ directory.Before Step 4, ensure the user has selected one style:
classic: classic radial mind maplogic: logic tree or fishbone-style reasoning maporg: organization or hierarchy mapDefault: classic.
If the project has not been initialized yet, ask before Step 2 because manifest.json records the style. If an existing project is already initialized, read manifest.json; if style is missing or inconsistent with the user request, stop and ask.
Required prompt:
Style GATE: 请选择导图风格:classic / logic / org。默认 classic。确认后我会把选择写入 manifest.json,并在 Step 4 前使用同一风格规划 outline。
Before the first Step 6 render, print:
relative or base64Required prompt:
Design GATE: 我将使用以下设计参数生成第一版导图,请确认后继续:
- canvas: <width>x<height>
- palette: <name>
- fonts: <font stack>
- max_depth: <n>
- node_limits: 一级≤12字,二级≤18字,叶子≤30字
- image_mode: <relative|base64>
- export_scale: <n>
Before Step 5 opens external URLs, print every planned URL and wait for confirmation.
Required prompt:
Image/Screenshot GATE: 我准备对以下外部 URL 截图。请确认后我才会打开这些 URL:
1. <url> - <reason>
If there are no external URL intents, say so and continue. Local PDF page rendering does not require this URL gate, but still record generated screenshots in assets/images/index.json.
Document images extracted in Step 1 still pass through Step 3 classification. The image index must include type, is_data_chart, and redraw_required for every image before Step 4/5 decisions.
Role: source converter.
Inputs:
<path/to/source.docx> or <path/to/source.pdf>projects/<project_name>/Command for DOCX:
python skills/mind-master/scripts/source_to_md/doc_to_md.py \
--source <path/to/source.docx> \
--project projects/<project_name>
Command for PDF:
python skills/mind-master/scripts/source_to_md/pdf_to_md.py \
--source <path/to/source.pdf> \
--project projects/<project_name>
Outputs:
projects/<project_name>/intermediate/source.mdprojects/<project_name>/assets/images/[EQUATION_UNRESOLVED:<id>]Checkpoint:
GATE 1 ✅ Source converted to Markdown.
Deliverables:
- source markdown: projects/<project_name>/intermediate/source.md
- inline images: projects/<project_name>/assets/images/
- equation cache: projects/<project_name>/assets/equations/
Confirm to continue to Step 2.
Failure helper:
references/math-rendering.md#error-helperreferences/mindmap-formats.md#error-helperRole: project manager.
Inputs:
classic, logic, or orgCommand:
python skills/mind-master/scripts/project_manager.py init <project_name> --style <classic|logic|org>
Optional source import:
python skills/mind-master/scripts/project_manager.py import-sources \
projects/<project_name> \
--move <path/to/source.docx>
Outputs:
projects/<project_name>/manifest.jsonprojects/<project_name>/sources/Checkpoint:
GATE 2 ✅ Project initialized.
Deliverables:
- manifest: projects/<project_name>/manifest.json
- sources: projects/<project_name>/sources/
- assets: projects/<project_name>/assets/
- intermediate: projects/<project_name>/intermediate/
- exports: projects/<project_name>/exports/
Confirm to continue to Step 3.
Failure helper:
references/mindmap-formats.md#error-helperRole: asset extractor.
Inputs:
projects/<project_name>/sources/projects/<project_name>/intermediate/source.mdCommand:
python skills/mind-master/scripts/extract_assets.py projects/<project_name>
Outputs:
projects/<project_name>/assets/images/index.jsonprojects/<project_name>/assets/images/type, is_data_chart, redraw_required, decision_hint, optional redraw_template_id, optional redraw_instructionocr_text fields when OCR is availableCheckpoint:
GATE 3 ✅ Assets extracted.
Deliverables:
- image index: projects/<project_name>/assets/images/index.json
- images: projects/<project_name>/assets/images/
Confirm to continue to Step 3.5 if section map mode is needed, otherwise Step 4.
Failure helper:
references/image-policy.md#error-helperRole: section splitter.
Use this optional step when one source document should produce multiple maps, such as one map per lesson or chapter.
Inputs:
projects/<project_name>/intermediate/source.mdCommand:
python skills/mind-master/scripts/split_sections.py projects/<project_name>
Outputs:
projects/<project_name>/intermediate/sections/index.jsonprojects/<project_name>/intermediate/sections/<section_id>.mdprojects/<project_name>/maps/<section_id>/Checkpoint:
GATE 3.5 ✅ Section workspaces created.
Deliverables:
- section index: projects/<project_name>/intermediate/sections/index.json
- section sources: projects/<project_name>/intermediate/sections/
- map workspaces: projects/<project_name>/maps/
Confirm which section_id to continue to Step 4.
Role: strategist.
Before starting:
references/shared-standards.md.references/strategist.md.references/image-policy.md only for candidate image semantics, not final image decisions.Inputs:
projects/<project_name>/intermediate/source.md, or projects/<project_name>/intermediate/sections/<section_id>.md in section map modeprojects/<project_name>/assets/images/index.jsonprojects/<project_name>/manifest.jsonCommand pattern:
python skills/mind-master/scripts/project_manager.py validate projects/<project_name>
The actual outline authoring is done by the agent according to references/strategist.md.
Output:
projects/<project_name>/intermediate/outline.json, or projects/<project_name>/maps/<section_id>/intermediate/outline.json in section map modeCheckpoint:
GATE 4 ✅ Strategist outline complete.
Deliverables:
- outline: projects/<project_name>/intermediate/outline.json
Confirm to continue to Step 5.
Failure helper:
references/strategist.md#error-helperreferences/shared-standards.md#error-helperRole: image curator and screenshot operator.
Before selecting images:
assets/images/index.json.preserve_full, preserve_crop, redraw_high_fidelity, redraw_concept, or omit; default to omit.preserve_full only when the full original is clear and all of it is evidence.preserve_crop when the original figure is useful but needs white-space/title/noise removal; keep provenance in crop_source_id, crop_box, crop_focus, and crop_path.redraw_high_fidelity when the original must be structurally preserved but is unreadable at map size; use redraw_concept only when a simplified concept sketch is enough. Missing templates must downgrade to omit.decision: "image" for screenshots, slides, or photos unless the renderer can normalize it to preserve_crop, redraw_high_fidelity, redraw_concept, or omit.Before external URL screenshots:
screenshot_intents from outline.json.Inputs:
projects/<project_name>/intermediate/outline.json, or projects/<project_name>/maps/<section_id>/intermediate/outline.json in section map modeprojects/<project_name>/assets/images/index.jsonprojects/<project_name>/sources/Command for URL or PDF screenshot after gate:
python skills/mind-master/scripts/screenshot_capture.py \
--url <url|file://...pdf#page=3> \
--selector "<css selector>" \
--out projects/<project_name>/assets/images/screenshots/<shot_id>.png \
--full-page false \
--wait-for networkidle
Outputs:
projects/<project_name>/assets/images/index.jsonprojects/<project_name>/assets/images/screenshots/Checkpoint:
GATE 5 ✅ Image and screenshot decisions complete.
Deliverables:
- updated image index: projects/<project_name>/assets/images/index.json
- screenshots: projects/<project_name>/assets/images/screenshots/
Confirm to continue to Step 6.
Failure helper:
references/image-policy.md#error-helperRole: executor.
Batch preread requirement:
Read these files once before generation:
references/shared-standards.mdreferences/executor-base.mdreferences/executor-<style>.mdreferences/mindmap-formats.mdreferences/math-rendering.mdreferences/image-policy.mdDo not reread them while generating the same version.
Inputs:
projects/<project_name>/intermediate/outline.jsonprojects/<project_name>/assets/images/index.jsonprojects/<project_name>/manifest.jsonCommand:
python skills/mind-master/scripts/render_mindmap.py projects/<project_name> \
--section-id <section_id> \
--style <classic|logic|org> \
--image-mode relative
Outputs:
projects/<project_name>/intermediate/mindmap.jsonprojects/<project_name>/intermediate/mindmap.mdprojects/<project_name>/intermediate/layout_self_check.mdprojects/<project_name>/exports/<project_name>.htmlCheckpoint:
GATE 6 ✅ Mind map rendered.
Deliverables:
- mindmap json: projects/<project_name>/intermediate/mindmap.json
- mindmap markdown: projects/<project_name>/intermediate/mindmap.md
- layout self-check: projects/<project_name>/intermediate/layout_self_check.md
- html: projects/<project_name>/exports/<project_name>.html
Confirm to continue to Step 7.
Failure helper:
references/executor-base.md#error-helperreferences/executor-<style>.md#error-helperreferences/math-rendering.md#error-helperRole: validator.
Inputs:
projects/<project_name>/exports/<project_name>.htmlprojects/<project_name>/intermediate/mindmap.jsonprojects/<project_name>/assets/images/index.jsonCommand:
python skills/mind-master/scripts/batch_validate.py projects/<project_name>
Checks:
.katex-errorcoverage_reportsection_id metadataderived=true or grounded_hint=true, include derived_from, and never use source-style section numberspreserve_full, preserve_crop, redraw_high_fidelity, redraw_concept, or omitsource_spanlayout_profile has a legal mode, density score, and complete first-level branch weightssource_fidelity remains complete after layout switchingposter_packing measures content_bbox_ratio, top_blank_ratio, center_void_ratio, edge_blank_ratio, and poster_aspect_ratiobatch_height_compactness measures left_branch_height_ratio, table_compactness, and evidence_grid_compactnessevidence_compactness checks visible evidence titles/callouts, media-area ratio, and card heightevidence_overlay_metadata checks that optional figure overlays have source-backed metadata and render visiblyconnector_target_clarity checks that connectors attach to explicit source/target card edge portsconnector_endpoint_visible checks that every connector has a visible terminal markerconnector_crossing_limit checks connector-to-connector crossings remain minimalconnector_outside_card_ratio checks connector samples stay outside non-target card bodiesconnector_parent_child_mapping checks rendered connector source/target IDs match node parent metadataevidence_card_containment checks all evidence-card internal elements stay inside the cardevidence_chip_overflow checks callout chips wrap/clamp instead of spilling outside the cardoverlay_inside_media_bounds checks overlay chips stay within the evidence media areanode_overflow_detection checks rendered nodes do not visibly overflow their own boxesevidence_caption_containment checks captions and source labels remain inside the evidence cardlearning_band_compactness requires exactly three columns, at most 10 rendered keywords, and a 12-15% max band heightRegression command before Step 8:
python -m unittest discover -s skills/mind-master/tests -p "test_*.py"
Any regression failure blocks export.
Checkpoint:
GATE 7 ✅ Formula and image validation passed.
Deliverables:
- validated html: projects/<project_name>/exports/<project_name>.html
- validation report: projects/<project_name>/intermediate/validation.json
Confirm to continue to Step 8.
Failure helper:
references/math-rendering.md#error-helperreferences/image-policy.md#error-helperreferences/shared-standards.md#error-helperRole: exporter.
Inputs:
projects/<project_name>/exports/<project_name>.htmlCommand:
python skills/mind-master/scripts/export_mindmap.py projects/<project_name> \
--section-id <section_id> \
--html projects/<project_name>/exports/<project_name>.html \
--scale 2
Outputs:
projects/<project_name>/exports/<project_name>.svgprojects/<project_name>/exports/<project_name>.pngprojects/<project_name>/exports/<project_name>.pdfCheckpoint:
GATE 8 ✅ Export complete.
Deliverables:
- html: projects/<project_name>/exports/<project_name>.html
- svg: projects/<project_name>/exports/<project_name>.svg
- png: projects/<project_name>/exports/<project_name>.png
- pdf: projects/<project_name>/exports/<project_name>.pdf
Workflow complete.
Failure helper:
references/mindmap-formats.md#error-helperdocs/session_state.md first if it exists, then docs/progress.md, then evidence summaries under results/latest.projects/<project_name>/.