Token导航 LogoToken导航TokenDH.com
研究检索只读clawhub未标认证来源可访问clear审计通过

ppt-from-template模板中的 ppt

Agent Skill

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

总安装

4,349

周安装

189

GitHub Stars

公开资料未说明

下载量

1,542
OpenClaw

安装说明

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

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

ClawHubOpenClaw
openclaw skills install ppt-from-template

简介

基于参考模板提取样式并重新创建幻灯片。

  • 使用 PptxGenJS 实现视觉一致性生成。
  • 适用于需要统一品牌风格的演示文稿制作。
  • 需提供模板文件和内容大纲。ppt-from-template 属于研究检索类 Skill,可作为该场景下的辅助能力补充。
  • 建议核对模板版权和使用许可。适用宿主包括 OpenClaw,接入前应确认版本、权限和运行环境要求。

SKILL.md

name
ppt-from-template
description
>-
Supports
template directory auto-discovery, user upload, multi-template selection,
Requires
pptx skill (PptxGenJS), python-pptx, pdftoppm (poppler-utils).

PPT from Template

Generate presentations by extracting style from a reference template, then building fresh slides with PptxGenJS.

Core principle: Never modify existing PPT XML. Look at the style, then draw from scratch.

Template Management

Template Directory

Default template directory: {workspaceDir}/template/

On every invocation:

  1. Scan {workspaceDir}/template/ for *.pptx files.
  2. If one template found → use it automatically.
  3. If multiple templates found → list them and ask user to choose.
  4. If none found → tell user to upload a .pptx file or provide a path.

User Upload

Accept .pptx files uploaded by user. Before processing:

  • Size check: reject files > 50 MB with message: "模板文件超过 50MB 限制,请压缩后重试"
  • Save to {workspaceDir}/template/ for reuse.

Workflow

Phase 1: Extract Style

# If .pptx, convert to PDF for visual analysis:
python3 {baseDir}/scripts/pptx_to_pdf.py template.pptx /tmp/ppt_style/template.pdf

# Extract page images:
bash {baseDir}/scripts/extract_pages.sh /tmp/ppt_style/template.pdf /tmp/ppt_style/ 150

# Precision extraction from PPTX XML:
python3 {baseDir}/scripts/extract_style.py template.pptx -o /tmp/ppt_style/style_raw.yaml

Read style_raw.yaml for exact data (hex colors, font names, font sizes in pt, positions in inches, fill types, line styles). Then read 3-5 page images for semantic understanding (element roles, layout classification).

Extract two levels:

LevelSourceWhat to Capture
Globalstyle_raw.yamlColors (hex), typography (font/size/weight), decorations
Per-layoutstyle_raw.yaml + imagesElement inventory: type, role, x/y/w/h, style properties

Element types: text, image, video, shape, line, numbered_list, step_list, tag_group, chart, table.

For images/videos: set placeholder: true with description for user replacement.

Write results to style.yaml. Schema: references/style-schema.md.

Phase 2: Generate PPT

Use the pptx skill (PptxGenJS) to create slides:

  1. Read style.yaml for visual parameters.
  2. Combine with user content (topic, page count, outline).
  3. Generate PptxGenJS JavaScript applying extracted style.
  4. Run JS to produce .pptx.
  5. QA: convert to images, verify style fidelity.

Large Deck Strategy (>15 pages)

PptxGenJS generation is fast (seconds), but writing the JS code for many slides can hit context/time limits. Mitigate:

PagesStrategy
≤15Single generation pass
16-30Split into 2 JS files: slides 1-15, slides 16-30. Generate sequentially, merge via pptx-merge or generate in one pres object across two code blocks
31-100+Generate a slide factory function per layout type, then loop over a content array. One JS file, data-driven

Slide factory pattern for large decks:

// Define layout factories from style.yaml
function makeCover(pres, content) { /* ... */ }
function makeContent(pres, content) { /* ... */ }
function makeSection(pres, content) { /* ... */ }

// Content array — easy to extend
const slides = [
  { layout: "cover", title: "...", subtitle: "..." },
  { layout: "content", title: "...", items: [...] },
  // ... 50+ entries
];

slides.forEach(s => layoutFactories[s.layout](pres, s));

This keeps code size O(layouts) not O(pages).

Output Size Control

Target output < 20 MB. PptxGenJS output is typically small (100-500 KB for text-only decks). Large files come from embedded images. If output approaches 20 MB:

  1. Reduce image resolution/quality in PptxGenJS options.
  2. Use placeholders instead of embedded images.
  3. Split into multiple files if unavoidable.
  4. Warn user: "PPT 接近 20MB 限制,已使用图片占位符,请手动替换"

Placeholder Convention

  • Image: Dark rectangle + dashed gray border + 🖼️ + label + suggestion
  • Video: Dark rectangle + dashed red border + ▶️ + label + suggestion

Key Rules

  • Never modify existing PPT XML — always generate from scratch.
  • style.yaml is reusable — once extracted, generate unlimited PPTs in the same style.
  • Use shrinkText: true in PptxGenJS to auto-fit long text.
  • Match slide dimensions exactly from style_raw.yaml (not hardcoded 16:9).

File Convention

{workspaceDir}/
├── template/              ← .pptx templates (auto-discovered)
│   └── *.pptx             ← max 50 MB each
├── output/                ← generated PPTs
│   └── *.pptx             ← max 20 MB each
/tmp/ppt_style/            ← working directory (ephemeral)
├── template.pdf
├── page-*.jpg
├── style_raw.yaml         ← from extract_style.py
└── style.yaml             ← merged (exact + semantic)

Troubleshooting

ProblemSolution
Template > 50 MBAsk user to compress or remove embedded media
Output > 20 MBUse placeholders, reduce image count/resolution
>30 pages timeoutUse slide factory pattern, data-driven generation
No template foundPrompt user to upload .pptx or specify path
Multiple templatesList options, ask user to choose
Fonts not availableFall back to Arial/sans-serif; note in output
Complex gradientsDescribe in style.yaml; use background image

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

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

04

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

能力 5

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

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

平台分布

OpenClaw

98.92%
按下载量换算1,525

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

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

来源信息

继续浏览同类 Skills