> branded PowerPoint. Edits only the slides/objects the user names, using native editable objects, while keeping every other slide, the logo, masters, links, grouping and transparency byte-for-byte unchanged, and writes back a .pptx that opens clean in WPS / PowerPoint. Use automatically when the user asks to revise, fix, refine, restyle, or repair an existing presentation, including phrases such as "改PPT", "修改PPT", "修改这份PPT", "把这个ppt改一下", "调整这几页", "只改第X页", "保真修改", "别动其他页", "edit this pptx", "fix my slides", "revise this deck", "refine these slides", "repair the pptx". It can also generate a new editable PPTX or magazine web deck from source material (PDF/DOCX/XLSX/URL/Markdown) when asked — "create PPT", "make a deck", "生成PPT", "做PPT", "制作演示文稿", "把这个做成PPT", "杂志风PPT", "网页PPT" — but preserve-and-edit is the primary, differentiated mode. Also triggers on "ultimate-ppt-master", "保真改PPT", "deckweaver", or "ppt-master".
npx skills add https://github.com/kdnsna/ultimate-ppt-master-skill --skill ultimate-ppt-master
> Preservation-first PowerPoint editing: change only the slides/objects the user names, keep everything else byte-for-byte, and hand back an editable .pptx that opens clean in WPS / PowerPoint. Generating a new editable PPTX or magazine web deck from source material is still supported, but it is secondary — do not turn a revise/repair request into a from-scratch regeneration.
Primary mode — preserve-and-edit an existing PPTX: Read repair plan → Touch only named slides/objects → Render before/after → Write back editable .pptx + safety report (see Existing PPTX Repair Mode below).
Secondary mode — generate from source: Input → Storyboard → Design & Generate → Refine & Deliver.
Before any script run, verify the runtime once (fast; preserve-edit itself is Python-stdlib-only, generation routes need more):
python3 --version # needs 3.10+; picks python3.13/3.12/3.11/3.10/python3 on PATH
${SKILL_DIR}/.venv exists, prefer ${SKILL_DIR}/.venv/bin/python for everything. bash ${SKILL_DIR}/scripts/bootstrap.sh --profile core
(--profile core installs requirements-core.txt only — no Chromium, no npm. Use --profile all or visual-review when the task needs source conversion, image generation, or Playwright rendering.)
ModuleNotFoundError, the missing package is a per-route optional dep — install it inside ${SKILL_DIR}/.venv via pip install <package> (see requirements.txt section headers for the route it belongs to), do not silently skip the step.Treat this Skill as the local quality and workflow layer around PowerPoint, not as a replacement for PowerPoint's native editor. The default user-facing sequence is:
slideId; preserve editable PowerPoint objects and finish formal editing in PowerPoint.Bridge, providers, DeckIR, scripts, and JSON contracts remain available in professional/diagnostic mode. Preserve project-brief.json, storyboard.json, asset_plan.json, quality-report.json, and existing Bridge handoff compatibility. When a DeckSession is present, keep its phases (intake / outline / generating / review / delivered) and stable slideId values through every artifact.
When an existing PPTX is supplied as a visual or brand reference, run:
python3 ${SKILL_DIR}/scripts/pptx_template_import.py <reference.pptx> --manifest-only --reference-style-mode style-only
Use the resulting reference-style.json to reuse master/layout rhythm, theme fonts and colors, placeholders, chart treatment, and common page roles without copying private content.
When a handoff includes attachments/pptlint-repair-plan.json, treat the source PPTX as the deliverable being repaired, not merely as source material for a new deck:
scripts/preserve_edit_pptx.py. It copies every package part verbatim and re-serializes only the named slide (and any chart parts that slide's chart ops touch), so untouched slides, the logo, masters, layouts, themes, media and links stay byte-for-byte identical.Inspect first, then edit:
python3 ${SKILL_DIR}/scripts/preserve_edit_pptx.py --list <source.pptx>
python3 ${SKILL_DIR}/scripts/preserve_edit_pptx.py <source.pptx> <repaired.pptx> \
--slide <N> --replace "旧文本=新文本" --report <fidelity-report.json>
Supported native ops (prefer these over whole-deck regeneration):
--replace OLD=NEW or op replace_textstyle_text — font / size / bold / color (optional match)replace_table_cell — by row/col or find textset_shape_geometry — move/resize in points (match by index/name/text)replace_chart_text, set_chart_value (rewrites the linked chart part only)Multi-slide / mixed ops in one shot:
python3 ${SKILL_DIR}/scripts/preserve_edit_pptx.py <source.pptx> <repaired.pptx> \
--edits edits.json --report <fidelity-report.json>
# edits.json: [{"slide":1,"replacements":{"Q2":"Q3"}},{"slide":4,"operations":[{"op":"replace_table_cell","row":2,"col":1,"text":"128"}]}]
Or one typed op on a single slide: --op '{"op":"style_text","size":24,"bold":true}'. A no-match leaves even the named slide byte-identical.
safe must be true — only intended slide/chart parts may change, and no parts may be added or removed. Any unexpected changed, added, or removed part is a hard failure — stop and report it, do not deliver;pptlint proof, and treat its score/rule result as supporting evidence only. Never issue a success claim or Verified credential from text/rule checks without the rendered visual review.This mode is a targeted revision path. It must not silently turn a repair request into a new storyboard, change the narrative, regenerate unaffected pages, or spend full-generation time on a small local fix.
Quality Pipeline Add-on: stakeholder-facing decks must also pass Visual Direction → Page Role Contract → Visual Completion Audit.
<!-- BEGIN GENERATED:workflow-policy -->
This section is generated from contracts/. Do not hand-edit; run python3 scripts/generate_contracts.py.
SKILL.mdDESIGN.mdcontracts/workflow-policy.yaml, contracts/route-policy.yaml, contracts/visual-defaults.yaml, contracts/quality-modes/Before choosing a route or generating files, rewrite the user's short instruction into bestEffectBrief. Record prompt quality, auto-expanded audience/scenario/message/page-count/style/source/asset assumptions, recommended route, and which decisions came from the user vs the Agent.
.pptx signals → formal-editable-pptx with quality mode standard.magazine-web-deck.Mode 2: Magazine Web Deck, style Style A · 电子杂志 × 电子墨水, 8 pages, cover surface light-or-warm-paper.light-or-warm-paper (light / warm paper / near-white).copy (--copy).--move / archive-and-remove-original is an explicit advanced option, not the default.Allowed values: unmapped, candidate, grounded, conflicted, missing.
Draft slides created only because sources exist must start as unmapped, never grounded.
grounded requires claim-level source binding.
Default mode: standard.
Available modes: quick, standard, audit.
| Mode | Use | Key gates |
|---|---|---|
| quick | draft, internal discussion, content validation | structure/file validity fail; visual evidence warning |
| standard | most formal reports, default production path | formal delivery fail; visual evidence recommended |
| audit | board materials, government, finance compliance, external release | missing preview PNG / design report / blank-page risk fail |
Semantic assertions:
<!-- END GENERATED:workflow-policy -->
Before route selection or production, convert the user's raw request into a bestEffectBrief. This is mandatory for direct Agent use, because many users will only write a short topic or "帮我做个 PPT".
The bestEffectBrief must record:
complete, thin, or extreme-thin;guizang-web-fixed-style, formal-editable-pptx, or dual-delivery;Use this deterministic order before Default Delivery Route. First match wins; formal/editable keywords outrank prompt thinness.
| Order | Decision key | Trigger | Result |
|---:|---|---|---|
| 1 | explicit-formal-signal | pptx, .pptx, PowerPoint, 可编辑, 汇报, 报告, 政府, 金融, 培训, 审计, consulting/business report, or a stakeholder-revised file | formal-editable-pptx |
| 2 | explicit-web-signal | 杂志风, 网页PPT, HTML, 横滑, Swiss/瑞士风, editorial/e-ink, browser-first, keynote/showcase/demo-day | magazine-web-deck |
| 3 | extreme-thin-fallback | only a topic, or <=25 characters/words with no audience, scenario, source, page count, style, or core-message signal | guizang-web-fixed-style |
| 4 | thin-guided-intake | has a topic plus at least one signal above, but lacks source or core content | staged questions |
| 5 | complete-source-first | source and production context are sufficient | continue source-first |
When in doubt, run the fixture-backed classifier:
python3 ${SKILL_DIR}/scripts/best_effect_router.py "<raw user request>"
If the user provides only a topic, a one-line request, or almost no source material, do not make the user write a perfect prompt first. Unless the user explicitly asks for formal / editable / government / finance / training PPTX, use this stable default:
Guizang-like Magazine Web Deck fixed style;Mode 2: Magazine Web Deck;Style A · 电子杂志 × 电子墨水;This fallback is the "stable high-quality output" path. The Agent may ask one focused question only when missing facts, brand/IP permission, compliance boundaries, or source authority would materially change the deck. Ordinary style gaps are filled by the fixed style.
If the user explicitly asks for a formal editable deck, government/finance/training/report material, or .pptx, switch to formal-editable-pptx: create a 8-12 page editable PPTX brief with Microsoft YaHei, a light/near-white default cover, one large soft-edged hero panel, formal-business quality gate, source confidence, official/IP asset plan, and the same bestEffectBrief record. Do not use a full-page black cover unless the user or brand direction explicitly asks for it.
Before production, decide whether the request came through a visual Web brief or through direct Codex conversation:
project-brief.json.visualBrief, guidedBrief, and expectationFit. The Web tags are user intent, not decoration. Pasted background and special requirements override tag defaults when they conflict.For direct Agent use, run the Best-Effect Brief Enhancer before guided intake. Ask staged questions only when bestEffectBrief cannot safely infer a production path.
Guided intake may inspect these items, but ask no more than three user-facing questions before presenting a storyboard. Infer non-risky technical choices and expose remaining details as editable assumptions:
After the user answers, write a concise confirmation brief. Proceed only when expectationFit.readyForProduction = true, or when the user explicitly accepts a draft with recorded assumptions.
The skill is optimized for real office PPT delivery. Keep the route decision simple:
bestEffectBrief..pptx, editable files, business reports, consulting decks, training material, government/finance material, or anything another person may need to revise.Plain-language wording for generic requests:
> 我会先把你的简短指令自动扩写成最佳效果 brief;如果只有主题/一句话且没有明确要求正式可编辑 PPTX,我会默认走 Guizang-like 杂志风网页 PPT,先出一版稳定高质量版本。若你要正式汇报或可编辑文件,我会改走 PPTX。
Choose a quality mode first: quick for drafts, standard (default) for most formal reports, audit/formal-audit for board/government/finance/external release. Default to qualityGate.level = "formal-business" for business/report/consulting/training/government/finance decks and for any deliverable expected to be handed to a real stakeholder. This is the default quality bar unless the user explicitly asks for a quick draft.
Before generating final PPTX or Web Deck files, lock these items in design_spec.md, spec_lock.md, and design-quality-report.md:
templates/visual-directions/, or a documented custom benchmark when no direction fits.page_role, visual_weight, layout_family, page_recipe_id, asset_requirement, visual_layer, raster_policy, and anti_patterns in design_spec.md / spec_lock.md.image2 when available) as the default visual asset engine for custom visuals; this is the Codex execution path for "ChatGPT/OpenAI as the primary visual asset engine". Record prompts, filenames, target slides, and manual edits in asset-plan.md or images/image_prompts.md.scripts/generate_visual_element_kit.py: assets/generated/element-manifest.json, images/image_prompts.json, and images/image_prompts.md.spec_lock.md brand_assets and asset-plan.md / images/image_sources.json entries for every deterministic IP mark that will appear in the deck. Each entry must record official-source, user-provided, text-lockup-fallback, or needs-authorized-replacement.spec_lock.md aesthetic_checks covering body font baseline, title/body scale, card count, card padding, whitespace target, logo handling, and repeated-layout risk.Formal delivery rules:
raster_policy.image2 when available) as the primary visual asset engine when visuals can improve the deck. Generate composed supporting visuals and small reusable micro-assets before final slide assembly.python3 scripts/generate_visual_element_kit.py <project_path> before final slide assembly for formal decks with repeated micro-assets. If no image backend/key and no host-native image tool is available, continue with Needs-Manual prompts in images/image_prompts.md; do not block the whole deck.交通银行, 好客山东, 文旅大戏, product/card names, partner organizations, city/tourism brands, app/mini-program marks, event marks. Prefer official websites, press releases, media kits, government/public-service portals, or user-provided files. Third-party logo download sites may be used only as search clues, not as final source evidence.assets/generated/ or the project image folder, and insert them as real assets.b / c.design-quality-report.md and record needs-authorized-replacement.Use these defaults unless the user, brand guide, or selected template explicitly overrides them:
"Microsoft YaHei" (微软雅黑), with "PingFang SC" only as a preview fallback and Arial as Latin fallback. This keeps PowerPoint handoff practical and avoids web-font copyright or install risk.山海交汇 烟火同行 with coastlines, mountain silhouettes, travel-stamp rhythm, warm market lights, and restrained bank-brand structure. Do not leave the deck at "business blue" when the source has a richer theme.8-14 pt radius family for editable PPTX (12-20 px for Web); a single cover hero/evidence panel may use 18-24 pt / 24-32 px. Keep charts, rules, and table internals straight. Use whitespace, scale, alignment, and one clear dominant element before adding decoration.Run the formal audit when project artifacts exist:
python3 scripts/audit_formal_delivery.py <project_path_or_artifact>
python3 scripts/audit_design_completion.py <project_path_or_artifact>
python3 scripts/audit_visual_recipes.py <project_path_or_artifact>
python3 scripts/audit_pptx_native_objects.py <final.pptx> --expect text,shape
If the audit fails, report the concrete issues and fix the deck before final delivery unless the user explicitly chooses to ship with known risks.
> [!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:
>
> 1. LEAN SERIAL EXECUTION — Steps run in order, but do not manufacture extra waits. Once prerequisites are available, continue through non-blocking steps without asking the user to say "continue".
> 2. BEST-EFFECT BRIEF BEFORE GUIDED INTAKE — If the user asks directly in Codex and has not provided enough detail for a real PPT, first write bestEffectBrief. If the prompt is merely thin, ask staged questions only for facts, sources, brand/IP, compliance, or route decisions that materially change the deliverable. If the prompt is extreme-thin and the user did not explicitly request formal editable PPTX, use the Extreme Thin Prompt Fallback and produce the Guizang-like Magazine Web Deck fixed style.
> 3. STOP ONLY FOR REAL BLOCKERS AFTER INTAKE — After the brief is clear enough, stop only when a required source, route choice, legal/brand permission, or missing manual asset makes proceeding risky. Otherwise make reasonable assumptions, record them, and continue.
> 4. ONE DELIVERY BRIEF AFTER INTAKE — The guided intake may take multiple short turns when the request is vague; after that, replace further multi-round confirmations with one concise delivery brief. The Strategist still decides canvas, page count, audience, style, colors, icons, typography, and images, but these are recorded as one production contract rather than a chain of user-facing checkpoints.
> 5. GATE BEFORE ENTRY — Each Step has prerequisites (🚧 GATE) listed at the top; these MUST be verified before starting that Step
> 6. NO SPECULATIVE EXECUTION — "Pre-preparing" content for subsequent Steps is FORBIDDEN (e.g., writing SVG code during the Strategist phase)
> 7. NO SUB-AGENT SVG GENERATION — Executor Step 6 SVG generation is context-dependent and MUST be completed by the current main agent end-to-end. Delegating page SVG generation to sub-agents is FORBIDDEN
> 8. SEQUENTIAL PAGE GENERATION ONLY — In Executor Step 6, after the global design context is locked, SVG pages MUST be generated sequentially page by page in one continuous pass. Grouped page batches (for example, 5 pages at a time) are FORBIDDEN
> 9. SPEC_LOCK RE-READ PER PAGE — Before generating each SVG page, Executor MUST read_file <project_path>/spec_lock.md. All colors / fonts / icons / images MUST come from this file — no values from memory or invented on the fly. Executor MUST also look up the current page's page_rhythm tag and apply the matching layout discipline (anchor / dense / breathing — see executor-base.md §2.1). This rule exists to resist context-compression drift on long decks and to break the uniform "every page is a card grid" default
> 10. SVG MUST BE HAND-WRITTEN, NOT SCRIPT-GENERATED — Editable PPTX SVG pages are written by the main agent directly, one page at a time. Do not batch-generate deck SVGs with Python / Node / shell scripts.
> [!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.md file 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
>
> - ultimate-ppt-master is 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
> [!IMPORTANT]
> ## Local Runtime Rule
>
> - Resolve SKILL_DIR to this skill directory before running scripts.
> - Prefer the bundled virtual environment when it exists: ${SKILL_DIR}/.venv/bin/python.
> - Otherwise use a Python 3.10+ interpreter (python3.13, python3.12, python3.11, or python3.10). Do not run PPT Master scripts with Python 3.9 or older.
> - When command examples below say python3, substitute the resolved Python interpreter.
| 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/excel_to_md.py | Excel workbooks to Markdown — supports .xlsx/.xlsm; legacy .xls should be resaved as .xlsx |
| ${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 (supports WeChat/high-security pages via curl_cffi) |
| ${SKILL_DIR}/scripts/source_to_md/web_to_md.cjs | Legacy Node.js fallback kept for this fusion package; prefer web_to_md.py first |
| ${SKILL_DIR}/scripts/project_manager.py | Project init / validate / manage |
| ${SKILL_DIR}/scripts/best_effect_router.py | Deterministic Best-Effect route classifier backed by routing fixtures |
| ${SKILL_DIR}/scripts/analyze_images.py | Image analysis |
| ${SKILL_DIR}/scripts/build_asset_plan.py | Build / merge asset_plan.json, prompt files, and generated-item manifests before image generation |
| ${SKILL_DIR}/scripts/image_gen.py | AI image generation (multi-provider) |
| ${SKILL_DIR}/scripts/image_search.py | Web image search helper for PPTX image acquisition |
| ${SKILL_DIR}/scripts/svg_quality_checker.py | SVG quality check |
| ${SKILL_DIR}/scripts/spec_lock_slice.py | Enforce spec_lock.md line budget and return a per-page lock slice |
| ${SKILL_DIR}/scripts/execution_budget.py | Require resume-execute split mode for decks above the page threshold |
| ${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 |
| ${SKILL_DIR}/scripts/validate-magazine-deck.mjs | Static Style A magazine deck validation: placeholders, classes, rhythm, and image refs |
| ${SKILL_DIR}/scripts/validate-swiss-deck.mjs | Static Style B Swiss deck validation using references/magazine-web/swiss-layout-registry.json |
| ${SKILL_DIR}/scripts/animation_config.py | Optional object-level PPTX animation sidecar scaffolding |
| ${SKILL_DIR}/scripts/notes_to_audio.py | Optional recorded narration audio generation |
| ${SKILL_DIR}/scripts/update_spec.py | Propagate a spec_lock.md color / font_family change across all generated SVGs |
| ${SKILL_DIR}/scripts/visual_review.py | Optional rubric-based visual review pass for generated SVG pages |
| ${SKILL_DIR}/scripts/audit_design_completion.py | Visual-completion audit for page roles, layout repetition, assets, notes, and handoff readiness |
| ${SKILL_DIR}/scripts/generate_visual_layers.py | Prepare no-text page visual layer prompts/manifests for hybrid-editable decks |
| ${SKILL_DIR}/scripts/audit_visual_recipes.py | Audit page recipes, visual layers, and raster policy for 4.0 hybrid-editable decks |
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 |
| Scenario preset directions | ${SKILL_DIR}/templates/presets/preset-directions.json | Seed common deck structures, source requirements, template candidates, and QA checks |
| Visual direction packs | ${SKILL_DIR}/templates/visual-directions/index.json | Select context-specific aesthetic guardrails before Strategist writes design_spec.md |
| Page recipes | ${SKILL_DIR}/templates/page-recipes/index.json | Select per-page structural recipes before generating PPTX/Web pages |
| Brand presets | ${SKILL_DIR}/templates/brands/brands_index.json | Query available brand identity presets (color / typography / logo / voice) |
| Visualization templates | ${SKILL_DIR}/templates/charts/charts_index.json | Query available visualization SVG templates (charts, infographics, diagrams, frameworks) |
| Icon library | ${SKILL_DIR}/templates/icons/ | See ${SKILL_DIR}/templates/icons/README.md; search icons on demand with ls templates/icons/<library>/ \| grep <keyword> |
| Magazine Web Style A template | ${SKILL_DIR}/assets/magazine-web/template.html | Single-file editorial/e-ink web deck seed |
| Magazine Web Style B template | ${SKILL_DIR}/assets/magazine-web/template-swiss.html | Single-file Swiss Style web deck seed |
| Magazine Web references | ${SKILL_DIR}/references/magazine-web/ | Themes, layouts, components, image prompts, screenshot framing, and QA checklists |
| Workflow | Path | Purpose |
|----------|------|---------|
| topic-research | workflows/topic-research.md | Pre-pipeline research when the user supplies only a topic with no source files |
| create-template | workflows/create-template.md | Standalone template creation workflow |
| create-brand | workflows/create-brand.md | Standalone brand-only template creation workflow |
| resume-execute | workflows/resume-execute.md | Resume SVG execution in a fresh chat after Step 1-5 |
| verify-charts | workflows/verify-charts.md | Chart coordinate calibration before export |
| customize-animations | workflows/customize-animations.md | Optional object-level PPTX animation customization |
| generate-audio | workflows/generate-audio.md | Optional recorded narration/audio workflow |
| live-preview | workflows/live-preview.md | Browser-based live preview and annotation workflow |
| visual-review | workflows/visual-review.md | Optional per-page visual review pass after SVG generation and before post-processing |
Use this workflow only when the Default Delivery Route selects the magazine-style web deck.
Choose one visual sub-style before copying a template:
| Style | Use when | Template | References |
|---|---|---|---|
| A · 电子杂志 × 电子墨水 (default) | the user says magazine, editorial, e-ink, Monocle-like, humanistic, narrative, or does not specify a sub-style | assets/magazine-web/template.html | themes.md, layouts.md, components.md |
| B · 瑞士国际主义 / Swiss Style | the user says Swiss Style, 瑞士风, Helvetica, grid, information design, data-driven, product/engineering/KPI deck | assets/magazine-web/template-swiss.html | themes-swiss.md, layouts-swiss.md, swiss-layout-lock.md |
If the user has not already provided these details, ask concise questions one at a time: sub-style A/B, audience/scenario, talk duration or target page count, source material, image availability/screenshot handling, theme preference, and hard constraints. If enough information is present, proceed with a stated assumption. Preserve Style A as the default so the original magazine/e-ink aesthetic remains unchanged.
If the user needs help with structure, propose a narrative arc:
Hook → Context → Core → Shift → Takeaway
Create a folder for the web deck, usually <project_name>/ppt/, with an adjacent images/ directory. Copy the seed template:
mkdir -p "<project_path>/ppt/images" "<project_path>/ppt/assets"
cp "${SKILL_DIR}/assets/magazine-web/motion.min.js" "<project_path>/ppt/assets/motion.min.js"
Style A · editorial/e-ink:
cp "${SKILL_DIR}/assets/magazine-web/template.html" "<project_path>/ppt/index.html"
Style B · Swiss Style:
cp "${SKILL_DIR}/assets/magazine-web/template-swiss.html" "<project_path>/ppt/index.html"
Immediately replace the <title> placeholder in index.html; grep for [必填] and remove all remaining placeholders before delivery.
Read only the needed magazine references based on selected style:
${SKILL_DIR}/references/magazine-web/themes.md${SKILL_DIR}/references/magazine-web/layouts.md${SKILL_DIR}/references/magazine-web/themes-swiss.md${SKILL_DIR}/references/magazine-web/layouts-swiss.md${SKILL_DIR}/references/magazine-web/swiss-layout-lock.md${SKILL_DIR}/references/magazine-web/swiss-layout-registry.json${SKILL_DIR}/references/magazine-web/components.md${SKILL_DIR}/references/magazine-web/screenshot-framing.md (only when screenshots/UI captures are used)${SKILL_DIR}/references/magazine-web/image-prompts.md${SKILL_DIR}/references/magazine-web/checklist.mdRules:
<section> must include light, dark, hero light, or hero dark.<style> block in index.html and confirm every class used by the chosen skeleton exists.ppt/images/ and reference them with relative paths like images/01-cover.jpg.data-layout value from swiss-layout-registry.json, and local images should include data-image-slot when the layout defines an image slot.Fill <main id="deck"> with the selected sections, then run these checks:
grep -n "\\[必填\\]" "<project_path>/ppt/index.html"
grep -n 'class="slide' "<project_path>/ppt/index.html"
node "${SKILL_DIR}/scripts/validate-magazine-deck.mjs" "<project_path>/ppt/index.html"
For Style B, also run the static Swiss lock validator:
node "${SKILL_DIR}/scripts/validate-swiss-deck.mjs" "<project_path>/ppt/index.html"
Open the file directly in a browser:
open "<project_path>/ppt/index.html"
Use ${SKILL_DIR}/references/magazine-web/checklist.md for final QA. P0 issues must be fixed before delivery. The output is index.html, not a .pptx.
🚧 GATE: User has provided source material (PDF / DOCX / EPUB / URL / Markdown file / text description / conversation content — any form is acceptable).
If the user has not provided enough PPT-making context, run the Brief Clarity Gate before source conversion. For direct Codex requests, ask staged questions rather than assuming the full frame. If the user provides only "做个 PPT" with no topic, audience, source, or objective, do not enter topic research or production yet.
If the user provides only a topic name or brief requirements with no source files or substantive source content, run workflows/topic-research.md first, then return here with the generated Markdown/source materials.
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> |
| XLSX / XLSM / Excel workbook | python3 ${SKILL_DIR}/scripts/source_to_md/excel_to_md.py <file> |
| CSV / TSV | Read directly as plain-text table source |
| 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 |
> Office vector assets (EMF/WMF) from DOCX/PPTX sources: preserve extracted EMF/WMF files as first-class vector assets. Do not convert them to PNG unless the user explicitly accepts rasterization; finalize_svg.py skips them and svg_to_pptx.py embeds them as native Office media.
✅ 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...> --copy |
| User provided text directly in conversation | No import needed — content is already in conversation context; subsequent steps can reference it directly |
> ✅ Default to --copy: Import creates project-local copies under sources/ and leaves the user's original files in place.
> - Prefer --copy for desktop, downloads, shared-drive, and multi-project reuse.
> - Use --move / archive-and-remove-original only when the user explicitly wants originals removed after import.
> - Repo-internal generated research artifacts may still move by default to avoid accidental commits; pass --copy to override.
> - Intermediate artifacts (e.g., _files/ directories) are handled automatically by import-sources
✅ 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.
Default path — free design, no question asked. Proceed directly to Step 4. Do NOT query layouts_index.json and do NOT ask the user an A/B template-vs-free-design question. Free design is the standard mode: the AI tailors structure and style to the specific content.
Template flow is opt-in. Enter it only when one of these explicit triggers appears in the user's prior messages:
Scenario preset hint (non-blocking). If the task clearly matches a common scenario, read ${SKILL_DIR}/templates/presets/preset-directions.json and use the matching preset to seed the narrative, source requirements, recommended slide roster, candidate charts, and quality checks. This does not force a visual template. Only copy layout/brand template files when the user explicitly requests that template, asks what templates exist and chooses one, or the handoff manifest already contains an explicit preset/template selection.
Only when a trigger fires: read ${SKILL_DIR}/templates/layouts/layouts_index.json, resolve the match (or list available options for trigger 3), and 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
Soft hint (non-blocking, optional). Before Step 4, if the user's content is an obvious strong match for an existing template (e.g., clearly an academic defense, a government report, a McKinsey-style consulting deck) AND the user has given no template signal, the AI MAY emit a single-sentence notice and continue without waiting:
> Note: the library has a template <name> that matches this scenario closely. Say the word if you want to use it; otherwise I'll continue with free design.
This is a hint, not a question — do NOT block, do NOT require an answer. Skip the hint entirely when the match is weak or ambiguous.
> To create a new global template, read workflows/create-template.md
✅ Checkpoint — Default path proceeds to Step 4 without user interaction. If a template trigger fired, template files are copied before advancing.
🚧 GATE: Step 3 complete; default free-design path taken, or (if triggered) template files copied into the project.
First, read the role definition:
Read references/strategist.md
> ⚠️ Mandatory gate in strategist.md: Before writing design_spec.md, Strategist MUST read_file templates/design_spec_reference.md and produce the spec following its full I–XI section structure. See strategist.md Section 1 for the explicit gate rule.
> ⚠️ Visual Direction gate: Strategist MUST read templates/visual-directions/index.json, select the closest visual direction pack (or custom), and record why it fits, top aesthetic risks, required page roles, page recipes, and anti-patterns.
Must complete one delivery brief:
The delivery brief is one compact production decision, not eight separate user-facing confirmations. For Web handoff projects, read bestEffectBrief, briefMode, visualBrief, guidedBrief, and expectationFit from project-brief.json first. For direct Codex requests, create bestEffectBrief before any guided intake. If bestEffectBrief.strategy = best-effect-fixed-style, proceed with the Guizang-like Magazine Web Deck fixed style unless a fact, source, brand/IP, or compliance blocker would materially change the deliverable. Otherwise run guided intake when expectationFit.readyForProduction would be false. If the source, audience, and output route are sufficient, record assumptions and continue without waiting.
Also record the expectation contract:
bestEffectBrief: v5.3 auto-expanded best-effect brief, prompt quality, recommended route, Extreme Thin Prompt Fallback state, fixed style, and assumptions;briefMode: visual-tags, codex-guided-intake, source-first, draft-with-assumptions, best-effect-expanded, or best-effect-fixed-style;visualBrief: selected tags, pasted background, special requirements, and reference links;guidedBrief: scenario, audience, purpose, core message, sources, page count, style, asset rules, output format, must-include, and must-avoid;expectationFit: risk level, missing signals, assumptions, conflicts, source adequacy, success criteria, and whether production is ready.Use plain user-facing words in the brief. Avoid exposing specialist labels unless they are useful: say "可编辑正文", "页面角色", "主视觉", "图文分栏", "图表页", "风险页" instead of relying on raster_policy, page_recipe_id, or layout_family in chat. Keep the technical field names inside design_spec.md and spec_lock.md.
For large page counts or bulky sources, add one short split-mode note in the user's language recommending workflows/resume-execute.md after Step 5 by opening a fresh chat and entering 继续生成 projects/<project_name>. For normal scale, continuous mode is the default.
Before finalizing spec_lock.md, enforce the context budget:
python3 ${SKILL_DIR}/scripts/spec_lock_slice.py --check-budget <project_path>
python3 ${SKILL_DIR}/scripts/execution_budget.py --page-count <N>
spec_lock.md line budget: keep spec_lock.md at <=120 lines. If it must grow, Executor uses python3 ${SKILL_DIR}/scripts/spec_lock_slice.py <project_path> PNN before each page instead of rereading the whole lock. Decks over 16 pages must use workflows/resume-execute.md after Step 5; the execution_budget.py result is authoritative.
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 the analyze_images.py script output or the Design Specification's Image Resource List.
Output:
<project_path>/design_spec.md — human-readable design narrative<project_path>/spec_lock.md — machine-readable execution contract (distilled from the decisions in design_spec.md; Executor re-reads this before every page). See templates/spec_lock_reference.md for the skeleton.<project_path>/design-quality-report.md — created or updated during verification; summarizes visual direction fit, page role coverage, assets, repeated-layout risk, and remaining blockers.✅ Checkpoint — Phase deliverables complete, auto-proceed to next step:
## ✅ Strategist Phase Complete
- [x] One delivery brief completed (or assumptions recorded)
- [x] Design Specification & Content Outline generated
- [x] Execution lock (spec_lock.md) generated
- [ ] **Next**: Auto-proceed to [Image_Generator / Executor] phase
🚧 GATE: Step 4 complete; Design Specification & Content Outline generated, and any real blocker has been resolved.
> Trigger condition: at least one Design Spec image row needs Acquire Via: ai and/or Acquire Via: web. If every row is user or placeholder, skip directly to Step 6.
First build or merge the Asset Factory parent contract:
python3 ${SKILL_DIR}/scripts/build_asset_plan.py <project_path>
asset_plan.json is the source of truth. asset-plan.md is only the human-readable view. The builder preserves existing item status, current_generation_evidence, and completed prompt files by id; it must never wipe Generated evidence on a rerun.
Always read the common framework first:
Read references/image-base.md
Then lazy-load only the needed path-specific reference:
| Acquire Via | Load reference | Run |
|---|---|---|
| ai | references/image-generator.md | Default to Codex native GPT image generation (image2 when available); otherwise run python3 ${SKILL_DIR}/scripts/image_gen.py --asset-plan <project_path>/asset_plan.json |
| web | references/image-searcher.md | python3 ${SKILL_DIR}/scripts/image_search.py ... |
| user / placeholder | skip | skip |
Generated asset evidence schema:
{"run_id":"...","timestamp":"...","backend":"...","prompt_sha256":"...","file_sha256":"...","width":1792,"height":1024}
Every Generated asset_plan.json.items[] row must have non-empty current_generation_evidence matching this schema. Run python3 ${SKILL_DIR}/scripts/audit_image_contracts.py <project_path>/asset_plan.json before Step 6.
✅ Checkpoint — Confirm image generation attempted for every row, proceed to Step 6:
## ✅ Image_Generator Phase Complete
- [x] Prompt document created
- [x] Each image: status is either `Generated` (file present in images/) or `Needs-Manual` (reported to user with filename + reason)
- [x] No row remains `Pending`
> On generation failure, do NOT halt — follow the Failure Handling rule in references/image-generator.md: retry once, fall back between Codex/image2 and configured backend when possible, then mark the row Needs-Manual, report filename + reason, and continue to Step 6.
🚧 Needs-Manual image rows block Step 6: if any asset_plan.json item is Needs-Manual, the expected file must exist at project/images/<filename> or the Executor must draw a clearly labeled placeholder box with the expected filename. Do not start SVG generation with silent missing image references.
🚧 GATE: Step 4 (and Step 5 if triggered) complete; asset_plan.json has no unresolved Pending row; any Needs-Manual row has a real file or an explicit labeled-placeholder plan; all prerequisite deliverables are ready.
Read the role definition based on the selected style:
Read references/executor-base.md # REQUIRED: common guidelines
Read references/shared-standards.md # REQUIRED: SVG/PPT technical constraints
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 + shared-standards + 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.
Live Preview Auto-Startup (Mandatory): before generating the first SVG, start the browser editor in live mode and keep it running through Executor + export:
python3 ${SKILL_DIR}/scripts/svg_editor/server.py <project_path> --live
svg_output/ may still be empty.http://localhost:5050; if the port is occupied, use --port <other> and report the actual URL.workflows/live-preview.md after export.Pre-generation Batch Read (Mandatory): before the first SVG, batch-read every distinct layout SVG referenced in spec_lock.page_layouts and every distinct chart SVG referenced in spec_lock.page_charts (plus backup chart references). One read per file, up front.
Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction. When Claude needs to work with professional documents (.docx files) for: (1) Creating new documents, (2) Modifying or editing content, (3) Working with tracked changes, (4) Adding comments, or any other document tasks
Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms. When Claude needs to fill in a PDF form or programmatically process, generate, or analyze PDF documents at scale.
Presentation creation, editing, and analysis. When Claude needs to work with presentations (.pptx files) for: (1) Creating new presentations, (2) Modifying or editing content, (3) Working with layouts, (4) Adding comments or speaker notes, or any other presentation tasks
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.
Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.
Use this skill any time a .pptx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates, layouts, speaker notes, or comments. Trigger whenever the user mentions \"deck,\" \"slides,\" \"presentation,\" or references a .pptx filename, regardless of what they plan to do with the content afterward. If a .pptx file needs to be opened, created, or touched, use this skill.
Create and edit Obsidian Flavored Markdown with wikilinks, embeds, callouts, properties, and other Obsidian-specific syntax. Use when working with .md files in Obsidian, or when the user mentions wikilinks, callouts, frontmatter, tags, embeds, or Obsidian notes.
Take kdnsna/ultimate-ppt-master from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
The instructions reference pip.
Without those the skill loads but fails at the first command.