Xpersona
P

PPT 视觉复刻

CLAWHUB · Unverified

将PPT截图或信息图转换为可编辑的PPTX文件。此技能基于Images2Slides论文(arXiv:2602.07645)实现, 利用视觉-语言模型(VLM)进行区域理解,通过坐标映射算法将像素坐标转换为PPTX坐标。 支持复杂形状降级处理策略(custGeom/渐变/透明等无法直接还原的形状转为PNG嵌入)。... Skill: PPT 视觉复刻 Owner: allergro Summary: 将PPT截图或信息图转换为可编辑的PPTX文件。此技能基于Images2Slides论文(arXiv:2602.07645)实现, 利用视觉-语言模型(VLM)进行区域理解,通过坐标映射算法将像素坐标转换为PPTX坐标。 支持复杂形状降级处理策略(custGeom/渐变/透明等无法直接还原的形状转为PNG嵌入)。... Tags: latest:1.4.1 Version history: v1.4.1 | 2026-03-26T16:24:27.354Z | user ppt-vision-replica v1.4.1 Changelog - 明确图片数据发送至外部 VLM 的隐私说明、文件系统读写说明、运行时依赖 - 新增脚本模板 scripts/complex_shape.py,用于生成与降级处理相关的复杂形状PNG(Python/Pillo

62
Rank
84
Safety
995
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 995 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 s174f1tqstatt5mbjrfk9n5z7d83gav3:ppt-vision-replica
  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-allergro-ppt-vision-replica/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

43,051 characters of source documentation, loaded on request.

Extracted files

4 files captured from the source.

SKILL.md

---
name: ppt-vision-replica
description: |
  将PPT截图或信息图转换为可编辑的PPTX文件。此技能基于Images2Slides论文(arXiv:2602.07645)实现,
  利用视觉-语言模型(VLM)进行区域理解,通过坐标映射算法将像素坐标转换为PPTX坐标。
  支持复杂形状降级处理策略(custGeom/渐变/透明等无法直接还原的形状转为PNG嵌入)。
  触发场景:用户上传PPT截图并要求复刻、用户要求分析PPT结构、用户希望将图片PPT转换为可编辑版本。
version: 1.5.0
requires:
  os: [linux, darwin, win32]
  npm: [pptxgenjs]
  python: [Pillow]   # 仅复杂形状降级时需要
  filesystem: true    # 读写临时PNG和输出PPTX文件
  network: true       # 调用外部VLM处理图像(图片数据会发送到配置的VLM服务端点)
---

> **⚠️ 使用前须知**
> - **图片数据发送**:第一步 VLM 图像分析会将截图发送到配置的 VLM 服务端点(如 OpenClaw image 工具 / MiniMax Vision / GPT-4V 等)。请勿使用本技能处理涉密或敏感的幻灯片。
> - **文件系统**:技能会生成临时 PNG 文件和输出 PPTX 文件,确保运行环境允许文件读写操作。
> - **运行时依赖**:需提前安装 `npm install -g pptxgenjs`;如需复杂形状降级,还需安装 Python + Pillow。

# PPT视觉复刻技能 (v1.5)

将静态PPT截图/信息图转换为可编辑PPTX文件的完整工作流。

## 核心算法 (Images2Slides论文适配)

### 坐标映射 (Pixel → EMU)

```
EMU = Pixel × (914400 / DPI)
Slide_X = (Image_X / Image_Width) × Slide_Width_EMU
Slide_Y = (Image_Y / Image_Height) × Slide_Height_EMU
```

标准16:9幻灯片尺寸: 9144000 × 5143500 EMU

## 工作流程

### 阶段1: 图像分析(开放式 VLM 调用)

第一步的图片识别为开放式设计,可灵活接入任意具备图像理解能力的工具——
如 OpenClaw 内置 `image` 工具(默认,MiniMax Vision VLM)、MCP VLM 服务、GPT-4V 等。
后续坐标映射和 PPT 生成逻辑与具体 VLM 解耦,保持稳定。

**必须**使用以下增强版 Prompt,以确保符号精度和格式完整性:

```javascript
const ENHANCED_PROMPT = `分析这张PPT截图,精确输出所有可见区域的信息。

输出格式为JSON数组,每个元素包含:
{
  "id": "数字",
  "type": "rectangle | roundedRect | text | line | image",
  "role": "header_bar | title | subtitle | body | data_card | footer | decorator | bullet_list",
  "bounds": { "x": 像素, "y": 像素, "width": 像素, "height": 像素 },
  "color": "#十六进制颜色(文字颜色或形状填充色)",
  "backgroundColor": "#背景填充色(仅形状适用)",
  "lineColor": "#边框颜色(如有边框)",
  "lineWidth": 边框宽度,
  "content": "文字内容(保持原版的所有标点符号,全角/半角符号原样保留)",
  "fontSize": 字号数字(磅),
  "fontFamily": "字体名称",
  "fontWeight": "normal | bold",
  "align": "left | center | right",
  "lineSpacing": 行间距倍数(1.0/1.5/2.0),
  "charSpacing": 字符间距(磅),
  "bulletType": "无bullet则null,有bullet则填 ■ / ✓ / - 等符号",
  "cornerRadius": 圆角大小(仅roundedRect适用),
  "zIndex": 叠加层级(从0开始)
}

⚠️ 特别注意:
1. content 必须保持原版的所有标点符号,包括全角括号()和半角括号()的区别
2. 不要添加或删除任何字符
3. 项目符号(■、✓、1.、-)必须原样记录在 bulletType 字段
4. 识别所有行间距较大的文本框,填写 lineSpacing
5. 边框矩形必须填写 lineColor,填充矩形填写 backgroundColor
6. zIndex按照视觉层叠顺序从后到前递增`;
```

### 阶段2: 结构化数据解析

调用 `scripts/coordinate_mapper.js`,支持4种JSON提取策略,自动容错:

```javascript
const { parseAnalysisToRegions, mapAllRegions } = require('./coordinate_mapper');

// 解析分析结果(自动处理全角符号校正和bullet识别)
const regions = parseAnalysisToRegions(analysisText);

// 批量映射坐标
const mappedRegions = mapAllRegions(regions, imageWidth, imageHeight);
```

**新增功能(v1.1):**
- `normalizeSymbols(text)` — 全角/半角符号校正
- `detectBullet(text)` — 识别并提取bullet符号类型
- 4策略JSON解析容错(直接解析 → 数组提取 → 对象提取 → 代码块提取)

### 阶段3: PPT生成

调用 `scripts/ppt_generator.js`:

```javascript
const { saveFromRegions } = require('./ppt_generator');

await saveFromRegions(mappedRegions, 'output.pptx', {
  imageWidth: 2100,
  imageHeight: 1192,
  background: '#FFFFFF'  // 可选背景色
});
```

## 区域类型映射

| VLM输出 | PptxG

_meta.json

{
  "ownerId": "kn7ewa1jk2kby06xp8ecdvyjrn82f7n7",
  "slug": "ppt-vision-replica",
  "version": "1.4.1",
  "publishedAt": 1774542267354
}

references/region_schema.json

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "PPT区域数据结构",
  "description": "用于PPT复刻的区域描述标准格式,基于Images2Slides论文",
  "type": "object",
  "required": ["image_path", "width", "height", "regions"],
  "properties": {
    "image_path": {
      "type": "string",
      "description": "源图像文件路径"
    },
    "width": {
      "type": "number",
      "description": "源图像宽度(像素)"
    },
    "height": {
      "type": "number",
      "description": "源图像高度(像素)"
    },
    "regions": {
      "type": "array",
      "description": "区域数组",
      "items": {
        "$ref": "#/definitions/Region"
      }
    }
  },
  "definitions": {
    "Region": {
      "type": "object",
      "required": ["id", "type", "bounds"],
      "properties": {
        "id": {
          "type": "string",
          "description": "区域唯一标识"
        },
        "type": {
          "type": "string",
          "enum": ["rectangle", "text", "image", "line", "shape"],
          "description": "区域类型"
        },
        "role": {
          "type": "string",
          "description": "区域角色: header_bar, title, body, data_card, footer等"
        },
        "bounds": {
          "$ref": "#/definitions/Bounds"
        },
        "color": {
          "type": "string",
          "description": "主要颜色(hex)"
        },
        "fill": {
          "type": "string",
          "description": "填充颜色(hex)"
        },
        "lineColor": {
          "type": "string",
          "description": "边框颜色"
        },
        "lineWidth": {
          "type": "number",
          "description": "边框宽度"
        },
        "content": {
          "type": "string",
          "description": "文本内容(type=text时)"
        },
        "fontSize": {
          "type": "number",
          "description": "字体大小"
        },
        "fontFamily": {
          "type": "string",
          "description": "字体名称"
        },
        "bold": {
          "type": "boolean",
          "description": "是否加粗"
        },
        "align": {
          "type": "string",
          "enum": ["left", "center", "right"],
          "description": "水平对齐"
        },
        "valign": {
          "type": "string",
          "enum": ["top", "middle", "bottom"],
          "description": "垂直对齐"
        },
        "imagePath": {
          "type": "string",
          "description": "图片路径(type=image时)"
        },
        "zIndex": {
          "type": "number",
          "description": "叠加顺序"
        },
        "dashType": {
          "type": "string",
          "enum": ["solid", "dash", "lgDash", "sysDash"],
          "description": "线条样式"
        }
      }
    },
    "Bounds": {
      "type": "object",
      "required": ["x", "y", "width", "height"],
      "properties": {
        "x": {
          "type": "number",
          "description": "左上角X坐标(像素)"
        },
        "y": {
          "type": "number",
          "description": "左上角Y坐标(像素)"
        },
        "width": {
          "type": "number",
          "description": "宽度(像素)"
        },
        "height": {

skill-card.md

## Description:

PPT Vision Replica turns PPT screenshots or infographics into editable PPTX files using VLM region analysis, coordinate mapping, and PNG fallback rendering for complex shapes.

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

## Publisher:

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

### License/Terms of Use:

MIT-0

## Use Case:

Developers and content creators use this skill to reconstruct editable PowerPoint decks from static slide screenshots or infographics. It can also guide slide-region analysis, pixel-to-PPT coordinate mapping, complex-shape fallback rendering, and PPTX generation.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: Screenshots are sent to a configured VLM service, which can expose sensitive slide content.

Mitigation: Do not process confidential slides; confirm the configured VLM endpoint and data-handling expectations before use.

Risk: Untrusted model output can cause local image file paths to be embedded in generated presentations.

Mitigation: Run the skill in an isolated working directory, validate image paths before PPTX generation, and avoid sharing PPTX files generated from adversarial or untrusted images until image-path validation is added.

Risk: The workflow reads and writes local PPTX and image files.

Mitigation: Use a dedicated workspace for inputs, temporary PNG files, and generated PPTX output, then review files before distribution.

## Reference(s):

- [PPT Vision Replica on ClawHub](https://clawhub.ai/allergro/skills/ppt-vision-replica)
- [Region schema](references/region_schema.json)
- [Images2Slides paper (arXiv:2602.07645)](https://arxiv.org/abs/2602.07645)

## Skill Output:

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

**Output Format:** [Markdown guidance with JSON region data, JavaScript and Python snippets, shell commands, and generated PPTX or PNG files.]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Requires Node.js with pptxgenjs; complex-shape fallback uses Python with Pillow and may write temporary PNG files and output PPTX files.]

## Skill Version(s):

1.4.1 (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 视觉复刻 and adjacent AI workflows.