Xpersona
P

PPT from Template

CLAWHUB · Unverified

Generate presentations by extracting visual style from a reference template and recreating slides from scratch using PptxGenJS. Use when: user provides a PPT... Skill: PPT from Template Owner: wujiaming88 Summary: Generate presentations by extracting visual style from a reference template and recreating slides from scratch using PptxGenJS. Use when: user provides a PPT... Tags: latest:2.0.0 Version history: v2.0.0 | 2026-03-25T14:10:35.924Z | user v2.0: Complete rewrite. PDF visual analysis + extract_style.py precision extraction + PptxGenJS generation. Template auto-discove

62
Rank
84
Safety
1.2k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.2K downloads reported by the source. Last updated 10/11/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s171ccng28wdj2n2tdtw8q70zd83ha4q:ppt-from-template
  1. Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-wujiaming88-ppt-from-template/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

17,490 characters of source documentation, loaded on request.

Extracted files

4 files captured from the source.

SKILL.md

---
name: ppt-from-template
description: >-
  Generate presentations by extracting visual style from a reference template and
  recreating slides from scratch using PptxGenJS. Use when: user provides a PPT/PDF
  as style reference and wants new slides in that style; user says "按这个风格做PPT",
  "模仿这个模板", "参考这个PDF做演示", "make slides like this", "use this template",
  "做个PPT", "用这个模板做课件", "帮我做演示文稿"; user uploads a .pptx file as template.
  Supports: template directory auto-discovery, user upload, multi-template selection,
  image/video placeholders, large decks (30-100+ pages via batched generation).
  Requires: pptx skill (PptxGenJS), python-pptx, pdftoppm (poppler-utils).
  NOT for: editing existing PPT (use pptx skill), creating slides without style reference
  (use pptx skill directly).
---

# 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

```bash
# 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:

| Level | Source | What to Capture |
|-------|--------|----------------|
| Global | style_raw.yaml | Colors (hex), typography (font/size/weight), decorations |
| Per-layout | style_raw.yaml + images | Element 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](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 (

_meta.json

{
  "ownerId": "kn778xxhawnk8ayzy5se9s465980pz82",
  "slug": "ppt-from-template",
  "version": "2.0.0",
  "publishedAt": 1774447835924
}

references/style-schema.md

# Style Schema

The `style.yaml` file captures the complete visual identity extracted from a reference PDF, including per-layout element definitions.

## Example

```yaml
source: 培训课模板.pdf
pages_analyzed: 6
slide_size: "16:9"            # 10" x 5.625"

# ── Global Colors ──
colors:
  primary: "2040E0"
  secondary: "E8A020"
  accent: "E02020"
  background: "0A0A0A"
  text_primary: "FFFFFF"
  text_body: "E8A020"
  text_muted: "D4A574"

# ── Global Typography ──
typography:
  title:    { size: 44, weight: bold, font: "Arial Black" }
  subtitle: { size: 28, weight: bold, font: "Arial" }
  body:     { size: 22, weight: bold, font: "Arial" }
  caption:  { size: 14, weight: normal, font: "Arial" }

# ── Layouts with Element Definitions ──
layouts:
  - type: cover
    source_page: 1
    background:
      type: solid              # solid | image | gradient
      color: "0A0A0A"
    elements:
      - id: title
        type: text
        role: title            # title | subtitle | body | label | tagline
        x: 0.6                # inches from left
        y: 0.4
        w: 5.0
        h: 1.2
        style:
          fontSize: 48
          fontFace: "Arial Black"
          color: "FFFFFF"
          bold: true
          align: left

      - id: keyword_tags
        type: tag_group        # special: row of filled rectangles with text
        x: 6.2
        y: 0.55
        items_per_row: 3
        tag_w: 1.15
        tag_h: 0.55
        gap: 0.15
        style:
          fill: "2040E0"
          fontSize: 16
          color: "FFFFFF"
          bold: true

      - id: divider
        type: line
        x: 0.6
        y: 2.0
        w: 8.8
        style:
          color: "E8A020"
          width: 1.5

      - id: hero_title
        type: text
        role: title
        x: 0.6
        y: 2.3
        w: 8.8
        h: 2.5
        style:
          fontSize: 56
          fontFace: "Arial Black"
          color: "E8A020"
          bold: true

      - id: tagline
        type: text
        role: tagline
        x: 0.6
        y: 4.8
        w: 8.8
        h: 0.5
        style:
          fontSize: 18
          color: "D4A574"

  - type: content
    source_page: 5
    background:
      type: solid
      color: "0A0A0A"
    elements:
      - id: title_block
        type: shape
        shape: rectangle
        x: 4.5
        y: 0.3
        w: 3.5
        h: 0.8
        style:
          fill: "E8A020"

      - id: title_text
        type: text
        role: title
        x: 4.5
        y: 0.3
        w: 3.5
        h: 0.8
        style:
          fontSize: 32
          fontFace: "Arial Black"
          color: "0A0A0A"
          bold: true
          align: center
          valign: middle

      - id: left_image
        type: image
        role: illustration      # illustration | photo | mockup | icon | decorative
        x: 0.3
        y: 1.5
        w: 3.8
        h: 3.5
        placeholder: true       # AI should generate or user provides
        description: "Phone m

skill-card.md

## Description:

Generate presentations by extracting visual style from a reference template and recreating slides from scratch using PptxGenJS.

This skill is ready for commercial/non-commercial use.

## Publisher:

[wujiaming88](https://clawhub.ai/user/wujiaming88)

### License/Terms of Use:

MIT-0

## Use Case:

Developers and presentation authors use this skill to create new PPTX decks that match a supplied PPTX or PDF template's visual style, including template discovery, style extraction, placeholder handling, and large-deck generation.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: The skill scans the workspace template folder and may reuse saved PPTX templates.

Mitigation: Use templates from trusted sources and confirm the selected template when a generic PPT request could match template-based generation.

Risk: The skill runs local document-conversion tools on presentation files.

Mitigation: Process only trusted PPTX/PDF inputs and keep conversion dependencies available and maintained.

## Reference(s):

- [Style Schema](artifact/references/style-schema.md)
- [ClawHub Skill Page](https://clawhub.ai/wujiaming88/skills/ppt-from-template)

## Skill Output:

**Output Type(s):** [text, markdown, code, shell commands, configuration, files, guidance]

**Output Format:** [Markdown guidance with inline shell commands, YAML style configuration, JavaScript/PptxGenJS code, and generated PPTX files.]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Template files are limited to 50 MB and generated PPTX output targets less than 20 MB.]

## Skill Version(s):

2.0.0 (source: server release metadata)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.

Sponsored

Ads related to PPT from Template and adjacent AI workflows.