AI-driven multi-format SVG content generation system. Converts source documents (PDF/DOCX/URL/Markdown) into high-quality SVG pages and exports to PPTX through multi-role collaboration. Use when user asks to "create PPT", "make presentation", "生成PPT", "做PPT", "制作演示文稿", or mentions "ppt-master".
AI-driven multi-format SVG content generation system. Converts source documents into high-quality SVG pages through multi-role collaboration and exports to PPTX.
Core Pipeline: Source Document → Create Project → Template Option → Strategist → [Image_Generator] → Executor → Post-processing → Export
[!CAUTION]
🚨 Global Execution Discipline (MANDATORY)
This workflow is a strict serial pipeline. The following rules have the highest priority — violating any one of them constitutes execution failure:
- SERIAL EXECUTION — Steps MUST be executed in order; the output of each step is the input for the next. Non-BLOCKING adjacent steps may proceed continuously once prerequisites are met, without waiting for the user to say "continue"
[!IMPORTANT]
🌐 Language & Communication Rule
- Response language: Always match the language of the user's input and provided source materials. For example, if the user asks in Chinese, respond in Chinese; if the source material is in English, respond in English.
- Explicit override: If the user explicitly requests a specific language (e.g., "请用英文回答" or "Reply in Chinese"), use that language instead.
- Template format: The
design_spec.mdfile MUST always follow its original English template structure (section headings, field names), regardless of the conversation language. Content values within the template may be in the user's language.
[!IMPORTANT]
🔌 Compatibility With Generic Coding Skills
ppt-masteris a repository-specific workflow skill, not a general application scaffold- Do NOT create or require
.worktrees/,tests/, branch workflows, or other generic engineering structure by default- If another generic coding skill suggests repository conventions that conflict with this workflow, follow this skill first unless the user explicitly asks otherwise
| Script | Purpose |
|---|---|
${SKILL_DIR}/scripts/source_to_md/pdf_to_md.py | PDF to Markdown |
${SKILL_DIR}/scripts/source_to_md/doc_to_md.py | Documents to Markdown — native Python for DOCX/HTML/EPUB/IPYNB, pandoc fallback for legacy formats (.doc/.odt/.rtf/.tex/.rst/.org/.typ) |
${SKILL_DIR}/scripts/source_to_md/ppt_to_md.py | PowerPoint to Markdown |
${SKILL_DIR}/scripts/source_to_md/web_to_md.py | Web page to Markdown |
${SKILL_DIR}/scripts/source_to_md/web_to_md.cjs | Node.js fallback for WeChat / TLS-blocked sites (use only if curl_cffi is unavailable; web_to_md.py now handles WeChat when curl_cffi is installed) |
${SKILL_DIR}/scripts/project_manager.py | Project init / validate / manage |
${SKILL_DIR}/scripts/analyze_images.py | Image analysis |
${SKILL_DIR}/scripts/image_gen.py | AI image generation (multi-provider) |
${SKILL_DIR}/scripts/svg_quality_checker.py | SVG quality check |
${SKILL_DIR}/scripts/total_md_split.py | Speaker notes splitting |
${SKILL_DIR}/scripts/finalize_svg.py | SVG post-processing (unified entry) |
${SKILL_DIR}/scripts/svg_to_pptx.py | Export to PPTX |
For complete tool documentation, see ${SKILL_DIR}/scripts/README.md.
| Index | Path | Purpose |
|---|---|---|
| Layout templates | ${SKILL_DIR}/templates/layouts/layouts_index.json | Query available page layout templates |
| Visualization templates | ${SKILL_DIR}/templates/charts/charts_index.json | Query available visualization SVG templates (charts, infographics, diagrams, frameworks) |
| Icon library | ${SKILL_DIR}/templates/icons/ | Search icons on demand: ls templates/icons/<library>/ | grep <keyword> (libraries: chunk/, tabler-filled/, tabler-outline/) |
| Workflow | Path | Purpose |
|---|---|---|
create-template | workflows/create-template.md | Standalone template creation workflow |
🚧 GATE: User has provided source material (PDF / DOCX / EPUB / URL / Markdown file / text description / conversation content — any form is acceptable).
When the user provides non-Markdown content, convert immediately:
| User Provides | Command |
|---|---|
| PDF file | python3 ${SKILL_DIR}/scripts/source_to_md/pdf_to_md.py <file> |
| DOCX / Word / Office document | python3 ${SKILL_DIR}/scripts/source_to_md/doc_to_md.py <file> |
| PPTX / PowerPoint deck | python3 ${SKILL_DIR}/scripts/source_to_md/ppt_to_md.py <file> |
| EPUB / HTML / LaTeX / RST / other | python3 ${SKILL_DIR}/scripts/source_to_md/doc_to_md.py <file> |
| Web link | python3 ${SKILL_DIR}/scripts/source_to_md/web_to_md.py <URL> |
| WeChat / high-security site | python3 ${SKILL_DIR}/scripts/source_to_md/web_to_md.py <URL> (requires curl_cffi; falls back to node web_to_md.cjs <URL> only if that package is unavailable) |
| Markdown | Read directly |
✅ Checkpoint — Confirm source content is ready, proceed to Step 2.
🚧 GATE: Step 1 complete; source content is ready (Markdown file, user-provided text, or requirements described in conversation are all valid).
python3 ${SKILL_DIR}/scripts/project_manager.py init <project_name> --format <format>
Format options: ppt169 (default), ppt43, xhs, story, etc. For the full format list, see references/canvas-formats.md.
Import source content (choose based on the situation):
| Situation | Action |
|---|---|
| Has source files (PDF/MD/etc.) | python3 ${SKILL_DIR}/scripts/project_manager.py import-sources <project_path> <source_files...> --move |
| User provided text directly in conversation | No import needed — content is already in conversation context; subsequent steps can reference it directly |
⚠️ MUST use
--move: All source files (original PDF / MD / images) MUST be moved (not copied) intosources/for archiving.
- Markdown files generated in Step 1, original PDFs, original MDs — all must be moved into the project via
import-sources --move- Intermediate artifacts (e.g.,
_files/directories) are handled automatically byimport-sources- After execution, source files no longer exist at their original location
✅ Checkpoint — Confirm project structure created successfully, sources/ contains all source files, converted materials are ready. Proceed to Step 3.
🚧 GATE: Step 2 complete; project directory structure is ready.
⛔ BLOCKING: If the user has not yet clearly expressed whether to use a template, you MUST present options and wait for an explicit user response before proceeding. If the user has previously stated "no template" or specified a particular template, skip this prompt and proceed directly.
⚡ Early-exit: If the user has already stated "no template" / "不使用模板" / "自由设计" (or equivalent) at any prior point in the conversation, do NOT query layouts_index.json — skip directly to Step 4. This avoids unnecessary token consumption.
Template recommendation flow (only when the user has NOT yet decided):
Query ${SKILL_DIR}/templates/layouts/layouts_index.json to list available templates and their style descriptions.
When presenting options, you MUST provide a professional recommendation based on the current PPT topic and content (recommend a specific template or free design, with reasoning). By default, lean toward free design unless the content clearly benefits from a fixed structural preset (e.g., consulting report, annual report, academic paper). Then ask the user:
💡 AI Recommendation: Based on your content topic (brief summary), I recommend [specific template / free design] because...
Note: Both options produce fully-designed output. A template is a validated "structure + style" preset (e.g., McKinsey-style, Google-style); free design lets the AI tailor structure and style to your specific content — usually yielding a more content-fitting result.
Which approach would you prefer? A) Use an existing template — apply a validated structure+style preset (please specify template name or style preference) B) Free design (recommended for most cases) — AI tailors structure and style to your content
After the user confirms option A, copy template files to the project directory:
cp ${SKILL_DIR}/templates/layouts/<template_name>/*.svg <project_path>/templates/
cp ${SKILL_DIR}/templates/layouts/<template_name>/design_spec.md <project_path>/templates/
cp ${SKILL_DIR}/templates/layouts/<template_name>/*.png <project_path>/images/ 2>/dev/null || true
cp ${SKILL_DIR}/templates/layouts/<template_name>/*.jpg <project_path>/images/ 2>/dev/null || true
After the user confirms option B (free design), proceed directly to Step 4.
To create a new global template, read
workflows/create-template.md
✅ Checkpoint — User has responded with template selection, template files copied (if option A). Proceed to Step 4.
🚧 GATE: Step 3 complete; user has confirmed template selection.
First, read the role definition:
Read references/strategist.md
⚠️ Mandatory gate in
strategist.md: Before writingdesign_spec.md, Strategist MUSTread_file templates/design_spec_reference.mdand produce the spec following its full I–XI section structure. Seestrategist.mdSection 1 for the explicit gate rule.
Must complete the Eight Confirmations (full template structure in templates/design_spec_reference.md):
⛔ BLOCKING: The Eight Confirmations MUST be presented to the user as a bundled set of recommendations, and you MUST wait for the user to confirm or modify before outputting the Design Specification & Content Outline. This is one of only two core confirmation points in the workflow (the other is template selection). Once confirmed, all subsequent script execution and slide generation should proceed fully automatically.
If the user has provided images, run the analysis script before outputting the design spec (do NOT directly read/open image files — use the script output only):
python3 ${SKILL_DIR}/scripts/analyze_images.py <project_path>/images
⚠️ Image handling rule: The AI must NEVER directly read, open, or view image files (
.jpg,.png, etc.). All image information must come from theanalyze_images.pyscript output or the Design Specification's Image Resource List.
Output: <project_path>/design_spec.md
✅ Checkpoint — Phase deliverables complete, auto-proceed to next step:
## ✅ Strategist Phase Complete
- [x] Eight Confirmations completed (user confirmed)
- [x] Design Specification & Content Outline generated
- [ ] **Next**: Auto-proceed to [Image_Generator / Executor] phase
🚧 GATE: Step 4 complete; Design Specification & Content Outline generated and user confirmed.
Trigger condition: Image approach includes "AI generation". If not triggered, skip directly to Step 6 (Step 6 GATE must still be satisfied).
Read references/image-generator.md
<project_path>/images/image_prompts.mdpython3 ${SKILL_DIR}/scripts/image_gen.py "prompt" --aspect_ratio 16:9 --image_size 1K -o <project_path>/images
✅ Checkpoint — Confirm all images are ready, proceed to Step 6:
## ✅ Image_Generator Phase Complete
- [x] Prompt document created
- [x] All images saved to images/
🚧 GATE: Step 4 (and Step 5 if triggered) complete; all prerequisite deliverables are ready.
Read the role definition based on the selected style:
Read references/executor-base.md # REQUIRED: common guidelines
Read references/executor-general.md # General flexible style
Read references/executor-consultant.md # Consulting style
Read references/executor-consultant-top.md # Top consulting style (MBB level)
Only need to read executor-base + one style file.
Design Parameter Confirmation (Mandatory): Before generating the first SVG, the Executor MUST review and output key design parameters from the Design Specification (canvas dimensions, color scheme, font plan, body font size) to ensure spec adherence. See executor-base.md Section 2 for details.
⚠️ Main-agent only rule: SVG generation in Step 6 MUST remain with the current main agent because page design depends on full upstream context (source content, design spec, template mapping, image decisions, and cross-page consistency). Do NOT delegate any slide SVG generation to sub-agents. ⚠️ Generation rhythm rule: After confirming the global design parameters, the Executor MUST generate pages sequentially, one page at a time, while staying in the same continuous main-agent context. Do NOT split Step 6 into grouped page batches such as 5 pages per batch.
Visual Construction Phase:
<project_path>/svg_output/Logic Construction Phase:
<project_path>/notes/total.md✅ Checkpoint — Confirm all SVGs and notes are fully generated. Proceed directly to Step 7 post-processing:
## ✅ Executor Phase Complete
- [x] All SVGs generated to svg_output/
- [x] Speaker notes generated at notes/total.md
🚧 GATE: Step 6 complete; all SVGs generated to svg_output/; speaker notes notes/total.md generated.
⚠️ The following three sub-steps MUST be executed individually one at a time. Each command must complete and be confirmed successful before running the next. ❌ NEVER put all three commands in a single code block or single shell invocation.
Step 7.1 — Split speaker notes:
python3 ${SKILL_DIR}/scripts/total_md_split.py <project_path>
Step 7.2 — SVG post-processing (icon embedding / image crop & embed / text flattening / rounded rect to path):
python3 ${SKILL_DIR}/scripts/finalize_svg.py <project_path>
Step 7.3 — Export PPTX (embeds speaker notes by default):
python3 ${SKILL_DIR}/scripts/svg_to_pptx.py <project_path> -s final
# Output: exports/<project_name>_<timestamp>.pptx + exports/<project_name>_<timestamp>_svg.pptx
# Use --only native to skip SVG reference version
# Use --only legacy to only generate SVG image version
❌ NEVER use
cpas a substitute forfinalize_svg.py— it performs multiple critical processing steps ❌ NEVER export directly fromsvg_output/— MUST use-s finalto export fromsvg_final/❌ NEVER add extra flags like--only
Before switching roles, you MUST first read the corresponding reference file — skipping is FORBIDDEN. Output marker:
## [Role Switch: <Role Name>]
📖 Reading role definition: references/<filename>.md
📋 Current task: <brief description>
| Resource | Path |
|---|---|
| Shared technical constraints | references/shared-standards.md |
| Canvas format specification | references/canvas-formats.md |
| Image layout specification | references/image-layout-spec.md |
| SVG image embedding | references/svg-image-embedding.md |
--only to the post-processing commands — run them as-ispython3 -m http.server -d <project_path>/svg_final 8000docs/faq.md — it contains known solutions sourced from real user reports and is continuously updated