Token导航 LogoToken导航TokenDH.com
研究检索需要联网clawhub未标认证来源可访问clear审计提醒

pptxgenjs-compatpptxgenjs 兼容

Agent Skill

pptxgenjs-compat 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

2,281

周安装

98

GitHub Stars

公开资料未说明

下载量

1,054
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:pptxgenjs-compat(pptxgenjs 兼容)
来源仓库:https://github.com/yaodongcheng/pptxgenjs-compat
安装命令:
openclaw skills install pptxgenjs-compat
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install pptxgenjs-compat

简介

使用 pptxgenjs 库生成兼容 PowerPoint 的 PPTX 文件。

  • 适用于 Node.js 环境下自动化创建演示文稿的开发场景。
  • 提供完整工作流程,包括模板应用与内容填充能力。
  • 需通过 clawhub 安装,注意配置环境变量与依赖项完整性。
  • 生成的文件可直接在主流办公软件中打开,但需测试版本兼容性。

SKILL.md

name
pptxgenjs-compat
description
>
Covers
safe API usage patterns, post-processing fixes for known pptxgenjs defects,

pptxgenjs Compatibility Skill

Generate PowerPoint-compatible PPTX files using pptxgenjs without triggering repair dialogs.

The Core Problem

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.

Workflow

Step 1: Generate PPTX with Safe API Patterns

When writing pptxgenjs code, follow these rules to minimize (but not eliminate) compatibility issues:

Forbidden APIs (will cause cross-version 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

Safe Alternatives

✅ 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

Pre-mixed Color Calculation

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

Step 2: Post-Process with fix_pptx_compatibility.py

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:

  1. Phantom slideMaster overrides in [Content_Types].xml — the #1 cause of repair dialogs. pptxgenjs registers non-existent slideMaster2~N.xml for every slide
  2. Invalid theme font references — replaces +mn-lt, +mn-ea, +mn-cs, +mj-lt, +mj-ea, +mj-cs with Microsoft YaHei
  3. dirty= attribute — removes non-standard pptxgenjs attribute
  4. p14:modId elements — removes non-standard namespace elements
  5. Notes Slides/Masters — removes broken notes files and their relationship references
  6. Zero-extent shapes and empty elements — fixes cx="0" cy="0", <a:t></a:t>, <a:ln />

Step 3: Verify

Open the PPTX in PowerPoint to confirm no repair dialog appears. For automated verification, check:

  • All Override PartNames in [Content_Types].xml point to existing files
  • No +mn-lt style font references remain
  • No dirty= attributes remain
  • No p14: namespace prefixes remain in slide XMLs

Common Mistakes to Avoid (Lessons from Real Incidents)

  1. Don't assume shadow/transparency fixes are enough — The real root cause is usually phantom slideMaster overrides in Content_Types.xml, not visual effects
  2. Don't write validation scripts with max() fallback to 0 for -1 values — This causes false positives in element order checks
  3. Don't use single-line regex for XML that spans multiple lines — Use re.DOTALL flag
  4. Don't skip post-processing — Even if the PPTX looks fine in your version of PowerPoint, it may break in others
  5. Search for known issues FIRST — Before diagnosing compatibility problems from scratch, check GitHub Issues for the library

Reference

For the complete list of pptxgenjs defects with examples and fixes, see references/pptxgenjs-pitfalls.md.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

93.88%
按下载量换算989

安全审计

VirusTotal

通过

ClawScan

可疑

Static analysis

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills