Master PPT
Master PPT generates a static HTML horizontally paged PPT. When using this skill, first organize the user's natural language requirements into a JSON plan, then call the local project generator to output index.html and assets/.
Version
Current version: 0.4.1
Before completing each user request and preparing the final reply, run:
node <skill-root>/scripts/check_latest_version.mjs
If the script produces output, append the output content at the end of the final reply to remind the user to update; if the script produces no output or the check fails, remain silent and do not mention the version check.
Skill Directory
The current directory where SKILL.md is located is the Skill root directory, referred to below as <skill-root>.
Built-in generator directory:
<skill-root>/project
Rendering script:
<skill-root>/scripts/render_goal_deck.sh
Version check script:
<skill-root>/scripts/check_latest_version.mjs
Safe rework script:
<skill-root>/project/scripts/revise-goal.mjs
Modes and Task Routing
- For each task, first determine whether it is
new(new creation) orrevise(rework). The user's explicit request in this session always takes priority. - If the user says "make a / create a new / redo / make another / generate a PPT" and does not specify a locatable existing finished product or
goal.json, always enternew. The fact that a PPT was made in historical conversations cannot be a reason to reuse an old draft. newis a complete capability retained permanently: each new creation creates an independent output directory, independentgoal.json, and an independent PPT; it must not become limited to only modifying old drafts because rework capability was added.- Only enter
goal.jsonwhen the user explicitly points out which existing PPT, which page, or whichreviseto modify. When the target is not unique, locate or ask first, and do not arbitrarily treat "the latest one" as the target. - When the user provides a knowledge base, material directory, or reference files, read only the content explicitly specified and actually existing for this task; do not guess local paths or apply business materials that were not provided.
Generation Principles
This Skill is a template orchestrator. The default goal is to quickly and stably fit user requirements into registered page components and output an HTML PPT that can be opened offline.
The default mode is "lock template, fill copy": retain the original visuals, structure, quantity, visibility, emphasis, color scheme, chart type, and image slots of the selected page components, and replace only the visible text content. Unless the user explicitly requests adjusting page properties, do not change any non-copy props.
By default, do not perform visual refinement, do not make screenshot aesthetic judgments, and do not repeatedly rework because of ordinary line breaks or imperfect local layout. Only when the user explicitly requests "visual refinement", "100% inspection", or "help me tune it until satisfied" should the visual QA process be entered.
Usage Rules
- Running the generator requires Node.js 20+ and npm; on first generation, the rendering script will install dependencies in the Skill's built-in
project/directory. - Style selection is a mandatory gate before
newmode generation: after understanding the current topic, audience, tone, information density, and media needs, first match and rank the 12 styles in the library, and take the 9 most suitable ones; unless the user explicitly says "you also decide the style" or "skip style confirmation", do not choose the final style on the user's behalf. Even if the user has already given a style preference, place that style at the top and ask the user to confirm.revisemode only changes the copy or data, continue using the original theme; only re-run the gate when the user explicitly requests a style change. - The matching of the 9 candidates must comprehensively consider the content domain, target audience, degree of formality/energy, data density, and image dependency, not just a single keyword match; arrange them from high to low by fit, and when tied, retain effective differences in light/dark and serious vs. energetic directions. Do not claim that the style library has only 9 sets; it should be stated as "9 sets intelligently matched from 12 sets."
- Use
node <skill-root>/project/scripts/build-theme-style-grid.mjs --themes <themeA,...,themeI> --out <current-workdir>/output/<deck-name>/theme-style-grid.pngto generate this session's exclusive 3×3 nine-grid in ranking order. The user-visible reply must embed the image using the expanded absolute path, and list in the same order1-9ofthemeXX + 风格名 + 一句适配理由, mark the top-ranked "First Choice Recommendation," and ask the user to choose by number or style name. The nine-grid is only for reply display and must not be written intogoal.jsonor any media field. - After sending the nine-grid selection request, you must pause and wait for the user's answer; when
themePackhas not been selected, you must not creategoal.json, runlayout:query, generate media, or render the PPT. - Confirm two things before starting work: theme style, and whether images/videos are needed. The theme style is confirmed according to the above nine-grid gate; when the media requirement is unclear, ask briefly at the same time. Only in environments where questions cannot be asked (scripts/batch processing) should you choose on your own, and list the top-ranked style and reason in the delivery notes.
- Delegation mode: when the user only says "you decide everything" or "no need to ask, just start" about the content or the whole thing, still execute the nine-grid style gate; only when the user explicitly delegates the "final style" as well to the agent or explicitly requests skipping confirmation may you directly choose the top-ranked theme. When the user only says the copy is "whatever" or "make it up yourself," only make up the content yourself; the style, page count, media, etc. that have already been given must not be changed without authorization.
- In non-interactive/one-time execution (when follow-up questions are impossible): if no style is specified, choose an accepted theme on your own according to the content topic; when there is no real material and images cannot be generated, prioritize media-free pages and do not call image-gen; explain all assumptions in the final notes.
- Deck language follows the user's communication language: for non-Chinese users, add
goal.jsonat the top level of"language": "en"; write all copy fields in the target language, and overwrite all default Chinese copy built into the pages (including decorative fields such as "Thank you for reading" on the ending page), with no Chinese remaining. The editor interface language automatically follows the system language of the person opening it, and can be switched manually in the upper-right corner, with no need to handle it during generation. - Delivery format: by default, deliver an editable PPTX, while retaining the HTML preview source for continued modification. When the user explicitly wants only HTML, PDF, or images, deliver according to their request; the general new PPT capability is not affected by this default value.
- PPTX files: still first generate HTML and start the local preview service, then call the local HTTP export service; in the end, provide only the PPTX file path or download result.
- Currently available styles:
theme01soft neumorphic style,theme02dazzling purple-green glow style,theme03deep-light code style,theme04glass candy style,theme05spectrum chart style,theme06dark atlas style,theme07cool white research style,theme08black-gold experimental style,theme09deep blue magazine style,theme10golden index style,theme11high-energy growth style,theme12sonic neon style. - Ordinary automatic selection does not choose
theme10; use it only when the user explicitly specifies it, or when the finance/investment index content is strongly related and inspect confirms it can be filled. <!-- theme-choice-hints:start -->theme01Soft Neumorphic Style | Suitable for: Product Introduction / Corporate Reporting | Audience: Startup Teams / Product Managerstheme02Neon Purple-Green Style | Suitable for: Tech Launch Events / AI / Autonomous Driving / Robotics Themes | Audience: Tech Company Founders / Technical Leadstheme03Dark-Light Code Style | Suitable for: Technical Solutions / Developer Conferences | Audience: Engineers / Technical Managerstheme04Glass Candy Style | Suitable for: Youthful Brands / Consumer Products | Audience: Brand Teams / Designerstheme05Spectrum Chart Style | Suitable for: Data Reports / Market Analysis | Audience: Data Analysts / Consulting Advisorstheme06Dark Graph Style | Suitable for: High-Density Data Display / Strategic Analysis | Audience: Strategy Teams / Investorstheme07Cool White Research Style | Suitable for: Research Reports / White Papers | Audience: Research Institutions / Consulting Teamstheme08Black-Gold Experimental Style | Suitable for: High-End Launches / Brand Proposals | Audience: High-End Brands / Creative Directorstheme09Deep Blue Magazine Style | Suitable for: Brand Stories / Interviews | Audience: PR Teams / Media Editorstheme10Golden Index Style | Suitable for: Financial Data / Investment Reports | Audience: Investment Institutions / Financial Analyststheme11High-Energy Growth Style | Suitable for: Growth Retrospectives / Business Plans | Audience: Entrepreneurs / Growth Teamstheme12Soundwave Neon Style | Suitable for: Music & Entertainment / Trend Events | Audience: Entertainment Brands / Event Planners <!-- theme-choice-hints:end -->
- Do not use old tokens, old themes, old media slots, old style branches, or old entrance animation controls.
- For page selection, first use
npm --prefix <skill-root>/project run layout:query -- --theme <themePack> --role <role> --limit 8; when media slots are needed, add--needs-media、--planned-images <n>、--provided-images <n>or--image-gen. The candidate order is randomized each time; choose any suitable one from them, do not always use only the first item in the list. - If fields are unclear, objects/arrays/count, images/media: first run
npm --prefix <skill-root>/project run inspect:layout -- --compact <layout...>; to write objects, arrays, counts, or image props: runprops:safe, for the entire goal useprops:safe -- --goal <file> --write. - When piping
layout:query/inspect:layout's JSON to a program for parsing, switch tonode <skill-root>/project/scripts/layout-query.mjs/node <skill-root>/project/scripts/inspect-layout.mjs:npm runwill print a lifecycle banner before stdout, polluting the JSON. - Long deck: first use
npm --prefix <skill-root>/project run goal:scaffold -- --title <title> --goal <goal> --theme <themePack> --pages <n> --chunk-size 5 --out output/<deck-name>/goal.jsonto generate a unique layout skeleton andgoal.fill-plan.json, then fill in props segment by segment according tofillPlan. - Copy length and array counts: prefer to write according to
fillPlan.text[].maxChars、fillPlan.arrays[].visibleCount、fillPlan.arrays[].nestedArrays;display/metricfields should only contain short words, short phrases, or numbers. - Html fields (such as
headlineHtml/quoteHtml): to write copy, only use<br>for line breaks plus<b>/<em>for inline emphasis; free HTML such as<span>is prohibited;<span class>in theme defaults depends on the theme CSS and is only a placeholder, do not copy it verbatim.validate:goal-specwill block free HTML. - Visible array items must contain actual copy; trailing items hidden by count/visibility controls may keep the placeholder "请输入文本".
- Element entrance animations use the native effects built into the page component.
- Page transition animations can be adjusted in the preview control panel.
- User-facing delivered decks do not show style/theme switching options by default; style switching is retained only in internal debugging demo pages. When the user explicitly requests keeping theme switching, write
preview: {"themeSwitcher": true}at the top level of the goal. - Do not hand-write free HTML slides; every page delivered to users must write
layout+props。roleOnly allowed to assist in page selection during the draft stage; must be replaced with concretelayoutbefore rendering. - The first 5 pages of each theme set
themeXX_page001tothemeXX_page005are all cover candidates. A deck can only select 1 page from the first 5 pages as the cover; do not use multiple cover pages at the same time; body pages are selected from page 6 onward. - Do not allow duplicate page components in the same PPT set: the final
slides[].layoutmust be unique. When selecting pages, record the usedlayout; different content pages should switch to other candidates in the same theme, and do not reuse the same layout by changing the copy. - A deck delivered to users cannot only write
roleand then rely on the page default copy. Unless the user explicitly wants the default demo, every visible content on each page must be written withpropscopy corresponding to the user's topic. - Prefer to write only the copy fields exposed by
layout:query/inspect:layout. When a field is an object or array, fill the internal key according tofillPlanandpropShapes.copyKeyshas already expanded nested paths (such ascopy.quote、items[].label); fill directly according to the listed paths. inspect:layoutpages markedcontentLocked: truehave body text fixed by the component and props cannot fill it in: switch to a layout whose body text can be filled, or use it only when the user accepts its default body text. Arrays should be filled to the visible items according tofillPlan.arrays[].visibleCount;decorativeKeysis a decorative slot, do not fill it.- Do not modify page metadata, component source code, className, CSS, style fields, or the default visual structure to complete content filling. Only fill content within
propsand the page attributes explicitly requested by the user. - It is allowed to use top-level
textto override visible text slots, but only for replacing text content. Do not launch a browser in ordinary generation to batch extract all page text slots; only do runtime slot extraction when the user explicitly requests "thoroughly clear all template default copy/proofread visible copy page by page". newmode prohibits reusing oldoutput/ingoal.jsonor old HTML; each request must create a new output directory for this run and a new JSON plan for this run.revisemode must use the target file specified by the user; first usegoal:reviseto generate a snapshot and change report, and do not manually modify the targetgoal.jsonbefore the snapshot.- The output directory is written in the current session working directory; when the user explicitly specifies another directory, follow their requirement. Do not write to
<skill-root>/project/outputin any mode. - HTML delivery: the preview address given to the user is only
http://127.0.0.1:<port>/(do not give https or .local variants); local HTTP can export HTML/PDF/PPTX, while local HTML orfile://cannot export editable PPTX. Do not returntheme-preview. When generating in an Agent APP with its own browser (such as Codex), remind the user to open this address in the system browser before exporting PDF/PPTX. - PPTX delivery: call
/api/export-editable-pptx; in the end only give the PPTX file path or download result. - When there is no browser session, direct script call, or the preview export interface returns 403/5xx: switch to
npm run export:pptx -- <deck>/ppt <out.pptx>(for PDF useexport:pdf) to directly produce the file, without needing to start a browser session first. - If default copy unrelated to the user's topic appears in the output body, such as AI Capital / investment and financing / SoundWave / sound wave / Key Metrics / Roadmap / End of Report, etc., the JSON must be rewritten and re-rendered, and it cannot be delivered.
Media Workflow
- Media fields only write the slots of
mediaSlots[].canPresetMedia: true, according to that slotpresetProp/fieldPathWrite path;goal.jsonOnly reference relative media paths within the deck; do not reference temporary directories, external absolute paths,file://or remote URLs. - For visual asset tasks, first determine intent: when there is no image but visual assets are needed, first ask whether to reserve an image slot; when there are no real assets and images cannot be generated, prioritize selecting media-free pages. If the user provides an asset library/asset directory path, treat it as image intent: select at least 2 pages with media slots and fill them with suitable assets. If the asset path is inaccessible, switch to media-free pages and inform in the delivery notes, without leaving placeholder prompt text in the page. The user agrees to use
--planned-images <n>/--needs-media, the user provides assets using--provided-images <n>/--provided-media, when the user explicitly requests original visual images/image generation, in the Codex environment use image-gen to generate images and add--image-gen; if image generation is not explicitly requested, ask the user first.plannedImages/needsVisual/imageGenonly indicates page selection intent; unless the user explicitly chooses to reserve empty slots, real media paths must be written before delivery, and empty media slots or fabricated paths must not be delivered. - For the user's local images/videos, first run
npm --prefix <skill-root>/project run media:stage -- <deck-output-dir-or-ppt-dir> <media-file...>, use the returnedrelativepath; AVIF will be converted to a browser-usable format. image-gen output must also first be placed in this deck's directory. - After rendering, verify each image/video referenced by the goal:
ppt/<relative>exists and the HTML contains the file name; if missing, only supplement the finalppt/assetsand rerun validation. Each image/video asset may be used at most once; after assets are used up, leave media slots empty or switch to pages with no media slots; unless the user explicitly requests it, do not repeatedly fill the same asset. - When image-gen needs to generate 2 or more independent images, use multiple subagents to generate in parallel, do not wait serially one by one; each image must be generated independently, do not use one collage/asset board and then split it. subagents are only used for image generation, not for topic selection, copywriting, page selection, or validation.
New Workflow (must be preserved)
As long as the task is determined to be new, this section must be executed completely. Even if the user says "make a new one following the previous style," only the style preferences may be reused; the previous content,goal.json or output directory must not be reused.
- Refine the user's goal:
title、goal、audience、owner, page count, content focus, and final deliverable format. When the user does not specify the page count, a normal long deck defaults to about 10 pages; when the user explicitly requests a single page, 1 page must be generated. - Execute the 3x3 style gate: match and rank the 12 style sets, take the top 9, run
build-theme-style-grid.mjs, embed a 3×3 image in the user-visible reply and list 9 reasons, then pause and wait for selection. After the user selects, then setthemePackand generaterandomSeed, for example<主题>-<日期>-<3位随机词>, to ensure random page selection is reproducible. - Determine image intent: when there is no image but visual assets are needed, first ask whether to reserve an image slot; if the user provides local assets, first
media:stage; when image generation is explicit, use image-gen. - Use
layout:queryto select candidates; for objects/arrays/count/image props useinspect:layout+props:safe. - Each page carries only one primary information role. For pages that cannot be safely covered, prioritize changing the layout; do not force it by modifying style fields.
- Write the JSON into this working directory's
output/<deck-name>/goal.json; if the user explicitly specifies another output directory, follow their requirement. Before rendering, runnpm --prefix <skill-root>/project run props:safe -- --goal <goal-file> --writeand the goal spec validation.--writeThen verify the output'slayoutChanges; if the replacement is not approved, change it back and switch pages. - After filling chart pages with your own data, the in-page insight/chart-reading/conclusion copy fields must be rewritten according to the new data, and default conclusions must not be retained.
- Run the rendering script to output
<deck-output-dir>/ppt/index.html; the script will use the Skill's built-in generator, do not switch back to an external project directory. - After rendering, verify the asset paths, and when missing, add the final
<deck-output-dir>/ppt/assets. - Confirm that the script completes the
validate:swissandvalidate:goal-copyvalidation. - Run
node <skill-root>/scripts/check_latest_version.mjsto do a silent version check. - The render script will start a local HTTP preview service and output
http://127.0.0.1:<port>/; when a port needs to be specified, setDASHI_PPT_PREVIEW_PORTbefore running the script (use the 5200-5999 range for ports; 4178/4300/4400 are user-reserved ports and unavailable). You may only use this preview service, and must not use static servers such aspython -m http.server、npx serveas a substitute: static servers do not have export and autosave interfaces. Edits under the preview service are automatically saved to theindex.htmlitself;file://local files that are opened are not automatically saved, and must be exported before delivery. - Reply according to the delivery format: by default call
/api/export-editable-pptxto deliver the editable PPTX file path, and keep the HTML preview source; when the user explicitly wants only HTML, give onlyhttp://127.0.0.1:<port>/.
Safe Rework Workflow
Use only when the user explicitly specifies an existing finished product, page, or goal.json . If only "make a change" is received but the target is not unique, first locate the target, and do not mistakenly modify other PPTs.
- Record the target
goal.json, the corresponding output directory, and the user's requirements. If there is only a PPTX and nogoal.json/ HTML source from this Skill, do not pretend that a lossless minimal modification can be made; you should explain that the source file is needed, or handle it separately as an import-rebuild task. - Treat "everything else unchanged" as a hard constraint: by default lock the
themePack、pageCount、slidescount, each page'slayout, each page'srole, and all content not named. First write this change as a JSON Patch file, for example:
{
"note": "第 4 页标题改为年度重点项目,其余不变",
"changes": [
{"op": "replace", "path": "/slides/3/props/title", "value": "年度重点项目"}
]
}
- Execute
npm --prefix <skill-root>/project run goal:revise -- --goal <goal.json> --patch <patch.json>. The script will save a pre-modification snapshot and a change report under the target directory'srevisions/, and will reject structural modifications to theme, page count, whole pages, layout, and roles. - Only when the user explicitly requests changing the theme, page count, or layout are structural reworks allowed. When changing the theme, still first run the 9-grid style gate and wait for confirmation; after confirmation, use
--allow-structure, then recheck all layout and props contracts. - After rework, run
props:safe、validate:goal-specand render validation, and check thechangedPathsin the change report item by item against the user's requirements. If extra field changes appear, restore from the snapshot and regenerate the minimal patch. - When delivering, explain the modification target, the actual change path, and the snapshot location; new tasks still return to "New Workflow (must be retained)", and must not continue to use this rework target.
Quality Repair and Browser Check
Rework only in the following situations: rendering failure,validate:swiss failure,validate:goal-copy failure, obvious template copy in the output that does not belong to the user's theme, or the user clearly points out that a page's content has a problem.
By default, repair at most 2 rounds. If it still fails, explain the blocking reason and do not continue with unbounded attempts.
By default, do not open a browser, do not create a Chrome profile, and do not extract all text slots. Only do one browser smoke check when the generator/preview template/export logic has been modified, the user explicitly requests checking the page effect, or a problem occurred in the previous round where props were overwritten by default values after running.
The browser smoke check only confirms that the page can open, the page count is correct, and the first and last pages are not blank. Do not take screenshots for fine-tuning by default, and do not repeatedly revise drafts because of ordinary line-break issues.
Example command:
<skill-root>/scripts/render_goal_deck.sh \
output/client-review/goal.json \
output/client-review/ppt/index.html
JSON Structure
{
"title": "美国 AI 融资调研",
"goal": "面向投资团队汇报 2024-2026 年美国 AI 大额融资结构、资本流向和后续判断",
"audience": "投资团队 / 产业研究团队",
"owner": "研究团队",
"randomSeed": "ai-funding-20260609-a7k",
"pageCount": 8,
"themePack": "theme01",
"slides": [
{"layout": "theme01_page001", "props": {"kicker": "融资调研 · VOL.01", "titleTop": "美国 AI", "titleBottom": "融资调研", "lead": "从资本体量、赛道结构和典型公司拆解本轮 AI 融资周期。"}},
{"layout": "theme01_page006", "props": {"kicker": "核心数字", "value": "970", "unit": "亿美元", "sub": "2024 年美国 AI 风险投资规模创历史新高。"}},
{"layout": "theme01_page010", "props": {"kicker": "# 研究方法", "title": "横纵分析法", "cn": "用时间维度和赛道维度交叉识别融资变化。"}},
{"layout": "theme01_page030", "props": {"kicker": "# 典型案例", "title": "里程碑 · 头部公司融资节奏"}},
{"layout": "theme01_page084", "props": {"kicker": "# 附录", "title": "数据来源与研究说明"}}
]
}
If slides is empty,pageCount is only suitable for temporary draft previews. Before user-facing delivery, it must be changed to a specific layout + corresponding props.
Page Roles
role is only for draft page selection; the final JSON must land on a specific layout. For role descriptions see references/layout-roles.md; the real candidates are based on what layout:query outputs.
cover can only be chosen from the first 5 pages of the current theme.image / media candidates are based on real mediaSlots, not page title keywords. Dynamic background pages can use ambient as an atmosphere page or section page.
You can specify pages directly:
{"layout": "theme01_page030", "props": {"title": "典型案例"}}
Delivery Capabilities
Newly generated presentations use embedded OPPO Sans 4.0 as the title and body font by default. The generated preview page supports page turning, opening the sidebar to edit text, replacing the global font across the three categories of title/body/monospace text, turning off the global font switch and then clicking any text to set a dedicated font or a custom local font, adjusting page props, replacing image/video media slots exposed by components, individually adjusting image slot width, height and shape, switching page transition animations, and exporting HTML/PDF/PPTX. Global font, dedicated font and image slot settings are written into deck state, and under the preview service they are automatically written back to the HTML; when exporting editable PPTX, objects are generated according to the browser's final computed styles. Pages delivered to users do not show page number indicators, page turning guides, dot navigation or index hints at the bottom.
Page Property Contract
For ordinary generation do not read layout-manifest.json. First use the candidate summaries output by layout:query . Only when a more detailed contract is needed, then use npm --prefix <skill-root>/project run inspect:layout -- --compact <layout...> to look at the page contract:
copyKeys: text/data fields that can be safely rewritten.copyBudgets: text length budget;display/metricthat is too long will be blocked by the goal spec.propShapes:copyKeys/ the internal shape of array fields; when writing object fields such ascopy、cells、items、rows, use only the keys listed here.mediaSlots: fields for writing images/videos, count key, default count and maximum count.countBindings: the binding of quantity parameters to array fields.fillPlanfor numeric fields seenumericBoundsto fill in numbers:enforced:falseis a hint, real data may exceed it,enforced:truemust be obeyed,semantics:'normalized'fill in a 0-1 ratio; for fixed-length nested arrays seefixedLength/fixedLengthsand fill by index, do not trial and error.controlKeys: fields operable in the right panel, not a plain content filling checklist; use only when the user explicitly requests adjusting page properties. By default only fillcopyKeys, visible arrays and real media slots.
Validation
- Before rendering you must run
validate:goal-spec. - After output you must run
validate:swiss. - After output you must run
validate:goal-copy. - After changing the display demo, run
npm run showcase:update。