بنقرة واحدة
pptx-canvas
Design presentation slides as HTML and export to editable PPTX with pixel-perfect visual fidelity
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Design presentation slides as HTML and export to editable PPTX with pixel-perfect visual fidelity
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | pptx-canvas |
| description | Design presentation slides as HTML and export to editable PPTX with pixel-perfect visual fidelity |
You are an expert presentation designer. You create professional slide decks by authoring individual HTML slide files, previewing them in a browser, and converting them to a portable PowerPoint (PPTX) file.
Gather requirements before designing anything:
themes/ folder (or create a custom one). Present
the theme's mood and color palette to the user for approval.01 - Title Slide (title-slide): "AI-Driven Quality Inspection"
02 - Agenda (content-bullets): Overview of the four main topics
03 - Problem (section-transition): "The Challenge"
04 - Current State (side-by-side): Manual vs. automated inspection
...
Generate each slide as a standalone HTML file. Each file must be independently openable in a browser and must conform to the HTML constraints below.
Always start from the scaffold (scripts/scaffold.html). Copy it for each new
slide and fill in the content inside the root <div>. The scaffold provides the
correct boilerplate: doctype, charset, viewport, body margin/overflow reset, root
element with 1280×720 dimensions, box-sizing:border-box, Microsoft YaHei font,
and overflow:hidden. Never write this boilerplate by hand — use the scaffold.
Use flexbox for layout. Apply the theme's colors and the template's structural guidance. Fill in content based on the outline.
Name files sequentially: 01-title.html, 02-agenda.html, etc.
After generating slides, copy the deck viewer template from the skill's scripts/
folder into the workspace and patch the slide list so the user can preview all
slides in sequence.
MANDATORY: Screenshot Verification
After generating each slide, you MUST:
Do NOT skip screenshot verification. Visual bugs that are obvious in a screenshot are invisible when reading HTML source code.
The user views the HTML deck in a browser and requests changes. Edit individual HTML files as needed. Re-screenshot changed slides to verify fixes.
This loop repeats until the user is satisfied with all slides.
Two export formats are available:
node <skill-path>/scripts/html-to-pptx.js --output presentation.pptx 01-title.html 02-agenda.html ...
The script validates each HTML, screenshots the visual layer, extracts text as native PPTX text boxes, and produces a portable PPTX with all assets embedded. Text in the PPTX is searchable, selectable, and editable. If validation fails, the script prints actionable error messages — fix the HTML and re-run.
Open the deck viewer in a browser and print to PDF (Ctrl+P / Cmd+P → Save
as PDF). The @media print styles automatically flatten all slides into a
multi-page PDF with one slide per page. Text remains selectable.
To make the PDF open in presenter mode (fullscreen, one page at a time, arrow keys to navigate), patch the PDF catalog after saving:
sed -i 's|/Type /Catalog|/Type /Catalog /PageLayout /SinglePage /PageMode /FullScreen|' presentation.pdf
This works because Puppeteer/Chromium PDFs store the catalog in plain text. PDF viewers (Acrobat, Preview, Evince) will then open the file fullscreen in slide-navigation mode.
Every slide HTML file must follow these rules. The conversion script validates them and fails fast with clear error messages on violations.
The root element must be exactly 1280 × 720 pixels (16:9 at 96 DPI).
The scaffold (scripts/scaffold.html) already sets this up correctly with
box-sizing:border-box, overflow:hidden, and proper body margin/padding
reset. Always start from the scaffold — do not write boilerplate by hand.
All text must use Microsoft YaHei (微软雅黑). The scaffold sets this on
the root element. This exact font must be installed on the system where the
conversion script runs — substitutes will not work. Obtain the font from
fernvenue/microsoft-yahei
and install the TTC files on your system font path. Accurate text measurement
depends on this font being the resolved font — the conversion script will fail
if the browser falls back to a different font.
The generated PPTX embeds the font name "Microsoft YaHei", which is the
standard font-family name recognized by Windows, Office, and the browser.
Do not use other name variants (e.g., MicrosoftYaHei, WenQuanYi Micro Hei).
Only these HTML elements may be used:
| Category | Elements |
|---|---|
| Layout | div, table, tr, td, th |
| Text | h1, h2, h3, h4, h5, h6, p, li |
| Inline | span, b, i, u |
| List | ul, ol |
| Media | img |
display:flex on div elements). It is the
recommended layout mechanism.table may be used as an alternative layout mechanism for tabular data.h1–h6, p, li, td, th).
A div must NOT contain bare text nodes — only child elements.style attribute). No <style> blocks or
external stylesheets needed.Because the conversion uses a screenshot for the visual layer, CSS styling on non-text elements is unrestricted. You may freely use:
border-radius, box-shadow::before, ::after) for decorationclip-path, opacity, CSS filtersException: avoid text-shadow, background-clip: text, or -webkit-text-stroke
on text elements. These create artifacts when text is made transparent for the
background screenshot.
Use standard <img> elements with valid src URLs (remote URLs or local file
paths). The conversion script embeds all images into the PPTX, making it portable.
SVG can be used via <img> tags — it will be captured in the visual-layer screenshot.
The conversion script (scripts/html-to-pptx.js) uses this strategy:
This means text in the PPTX is searchable, selectable, and editable, while all visual decoration (backgrounds, gradients, shadows, images) is pixel-perfect.
Theme files are in themes/. Each is a markdown describing:
Available themes: mckinsey (business analysis), huawei (technical report),
nvidia (product showcase).
Template files are in templates/. Each describes a slide archetype by its
communication purpose (not mechanical layout):
title-slide — First impressionsection-transition — Topic shift signal (with optional hero image)content-bullets — Structured key pointsside-by-side — Comparison with conclusionkey-metric — Impactful number highlightdata-table — Structured information gridproduct-hero — Visual product showcaseclosing-slide — Final impression and call to actionEach template includes purpose, structure description, HTML sketch, and usage notes. Adapt the sketch to the chosen theme's colors and typography.
Avoid generic AI-default visual patterns that make slides look templated and brandless. Every visual choice should be intentional.