Install
openclaw skills install @yaodongcheng/pptxgenjs-compatThis skill should be used when generating PPT files with pptxgenjs (Node.js library). It provides a complete workflow for creating PowerPoint-compatible PPTX files that won't trigger the "PowerPoint found a problem with content" repair dialog. Covers: safe API usage patterns, post-processing fixes for known pptxgenjs defects, and compatibility verification. Trigger when: creating PPT with pptxgenjs, fixing pptxgenjs-generated PPTX files, or whenever "pptxgenjs" or "PPT" generation is mentioned.
openclaw skills install @yaodongcheng/pptxgenjs-compatGenerate PowerPoint-compatible PPTX files using pptxgenjs without triggering repair dialogs.
pptxgenjs has 6 known defects (GitHub Issue #1449) that cause PowerPoint to show the "problem with content" repair dialog. The defects are baked into the library's XML generation and cannot be avoided at the JavaScript level. A mandatory post-processing step is required after every PPTX generation.
When writing pptxgenjs code, follow these rules to minimize (but not eliminate) compatibility issues:
❌ shadow — generates complex OOXML effect chains unsupported in many PowerPoint versions
❌ transparency — inconsistent behavior across PowerPoint/WPS/LibreOffice versions
❌ String shape names like "oval", "roundedRectangle" — writes invalid prstGeom values
✅ Use line borders instead of shadow for visual depth
✅ Use pre-mixed colors instead of transparency (calculate blended colors on dark backgrounds)
✅ Pre-render dimmed icon variants (dark PNG) instead of runtime image transparency
✅ Always use enum constants: pres.shapes.OVAL, pres.shapes.ROUNDED_RECTANGLE
To replace transparency on a dark background, calculate the blended color:
background #1A1A2E + white at 20% opacity → approximately #3A3A4E
For dimmed icons, render at design time with a dark color:
const iconDim = await iconToBase64Png(FaShield, "3A4450", 256); // dark variant
This step is MANDATORY. Even with perfect API usage, pptxgenjs generates invalid XML that must be fixed.
Run the bundled script:
python scripts/fix_pptx_compatibility.py <input.pptx> [output.pptx]
If output is omitted, the input file is overwritten in place.
The script fixes all 6 known defects:
[Content_Types].xml — the #1 cause of repair dialogs. pptxgenjs registers non-existent slideMaster2~N.xml for every slide+mn-lt, +mn-ea, +mn-cs, +mj-lt, +mj-ea, +mj-cs with Microsoft YaHeicx="0" cy="0", <a:t></a:t>, <a:ln />Open the PPTX in PowerPoint to confirm no repair dialog appears. For automated verification, check:
[Content_Types].xml point to existing files+mn-lt style font references remaindirty= attributes remainp14: namespace prefixes remain in slide XMLsmax() fallback to 0 for -1 values — This causes false positives in element order checksre.DOTALL flagFor the complete list of pptxgenjs defects with examples and fixes, see references/pptxgenjs-pitfalls.md.