sjht-ppt-delivery
Convert HTML slide deck to PDF and send to Feishu user. Use when the user asks to generate a PPT/presentation and deliver it as a PDF file via Feishu message...
MIT-0 · Free to use, modify, and redistribute. No attribution required.
⭐ 0 · 64 · 0 current installs · 0 all-time installs
by@aowind
MIT-0
Security Scan
OpenClaw
Suspicious
medium confidencePurpose & Capability
The skill's name/description (HTML→PDF + Feishu delivery) matches the included scripts: html2pdf.cjs produces screenshots->PDF and send_file_feishu.py uploads via Feishu API. However, the registry metadata declares no required env vars or config paths, while the runtime actually depends on Chromium, global npm packages (puppeteer-core, pdf-lib) and reading ~/.openclaw/openclaw.json for Feishu credentials. That undeclared dependency is a mismatch.
Instruction Scope
SKILL.md instructs running the included scripts and to pull the recipient id from inbound metadata — that is reasonable. But the instructions also assume an OpenClaw config file (openclaw.json) exists with Feishu APP_ID/APP_SECRET and do not document that this file will be read. The runtime will load the entire config file from the user's home directory (~/ .openclaw/openclaw.json), which is broader access than the skill's metadata claims.
Install Mechanism
No install spec (instruction-only + included scripts). The scripts rely on locally installed Chromium and global npm packages (puppeteer-core, pdf-lib) and Python requests — these are plausible for the task. No external downloads or archive extraction are performed by the skill bundle itself.
Credentials
The skill did not declare required env vars or config paths, yet send_file_feishu.py reads ~/.openclaw/openclaw.json (and will fall back to FEISHU_APP_ID / FEISHU_APP_SECRET env vars if present). Reading a full config file can expose unrelated secrets stored there. Requesting Feishu credentials is reasonable for delivering files, but the skill's metadata should have declared that it needs access to that config path or to explicit env vars.
Persistence & Privilege
The skill does not request always:true, does not modify other skills or system configuration, and does not persist new credentials. It runs on demand and has no elevated persistence behavior.
What to consider before installing
This skill appears to do what it says, but it reads your OpenClaw config file (~/.openclaw/openclaw.json) to find Feishu APP_ID/APP_SECRET even though the registry entry declared no required config or env vars. Before installing or running: (1) review ~/.openclaw/openclaw.json contents to ensure it doesn't contain unrelated secrets you don't want read; (2) consider providing FEISHU_APP_ID and FEISHU_APP_SECRET as environment variables instead of relying on the config file, or modify the script to accept explicit credentials; (3) verify the Feishu bot permissions and that the app credentials are scoped appropriately; (4) ensure chromium-browser and global npm packages (puppeteer-core, pdf-lib) are installed in a controlled environment; (5) if you require higher assurance, ask the publisher to update the skill metadata to declare the config path and required credentials, or to accept credentials via parameters rather than reading your whole config file.Like a lobster shell, security has layers — review code before you run it.
Current versionv1.0.0
Download ziplatest
License
MIT-0
Free to use, modify, and redistribute. No attribution required.
SKILL.md
PPT Delivery — HTML 演示文稿转 PDF 并发送飞书
完整流程:生成 HTML 幻灯片 → 放大字体 → 转 PDF → 上传飞书发送给用户。
前置依赖
chromium-browser(已安装)puppeteer-core(全局 npm 包)pdf-lib(全局 npm 包)- Python 3 +
requests(已安装) - 飞书机器人已配置(openclaw.json 中有 APP_ID/SECRET)
工作流程
Step 1: 生成 HTML 幻灯片
使用 frontend-slides 或 jobs-style-ppt-generator skill 生成 HTML 文件。
Step 2: 字体放大(必须)
用户通常反馈字体太小,默认执行两轮放大:
第一轮放大(CSS 修改):
- body font-size →
22px - 所有 ≤1rem → ×1.25
- 所有 1~1.5rem → ×1.35
- 所有 clamp() 值 → ×1.2
- 卡片 padding → ×1.2
第二轮放大(如用户仍嫌小):
- body font-size →
26px - 所有字号 → 再 ×1.2
- clamp() 值 → 再 ×1.15
- 卡片 padding → 再 ×1.15
始终保持标题/正文层级关系。
Step 3: HTML 转 PDF
使用脚本逐 slide 截图嵌入 PDF,保证视觉一致性:
NODE_PATH=$(npm root -g) node <skill_dir>/scripts/html2pdf.cjs <input.html> <output.pdf>
参数:
--width 1920(默认)--height 1080(默认)
输出:多页 PDF(每页一张幻灯片截图)。
Step 4: 发送飞书文件
将 PDF 通过飞书 Bot API 发送给用户:
python3 <skill_dir>/scripts/send_file_feishu.py <pdf_path> <user_open_id>
user_open_id 从消息的 inbound metadata sender_id 获取。
完整示例
1. UI agent 生成 /root/projects/report.html
2. 字体放大(两轮)
3. NODE_PATH=$(npm root -g) node ppt-delivery/scripts/html2pdf.cjs /root/projects/report.html /root/projects/report.pdf
4. python3 ppt-delivery/scripts/send_file_feishu.py /root/projects/report.pdf ou_xxxxx
5. 回复用户:"PDF 已发送 📎"
注意事项
- PDF 文件大小通常 1-3MB(5-10 页)
- 如果 chromium 截图有渲染问题,检查字体是否加载完成(脚本内置 3 秒等待)
- 飞书发送需要 bot 有
im:message:send_as_bot权限 - 文件类型支持:pdf、doc、xls、ppt、mp4、opus
Files
3 totalSelect a file
Select a file to preview.
Comments
Loading comments…
