universal-pptx-generator

ajaxhe/universal-pptx-generator-skill · updated Apr 8, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/ajaxhe/universal-pptx-generator-skill --skill universal-pptx-generator
0 commentsdiscussion
summary

此技能可以根据任意用户指定的 PPT 模板,结合提供的图文素材(文档、图片等),自动生成一份风格统一的演示文稿。

skill.md

通用 PPT 生成技能

概述

此技能可以根据任意用户指定的 PPT 模板,结合提供的图文素材(文档、图片等),自动生成一份风格统一的演示文稿。

⭐⭐⭐ 核心理念:每个模板都是独特的,必须针对性分析!

不同 PPT 模板使用的字体、对齐方式、字号、颜色、位置、背景样式都完全不同。绝不能将一个模板的配置直接应用到另一个模板!每次使用新模板时,都必须重新分析 XML 提取精确参数。

核心能力:

  1. 模板分析 - 自动解析 PPTX 模板结构、配色、字体、背景图/背景色、对齐方式
  2. ⭐⭐⭐ 分页面类型分析 - 针对封面、目录、章节、内容、结束页分别提取背景和样式
  3. 素材处理 - 从 DOCX/PDF/图片等素材中提取内容
  4. 智能排版 - 根据模板风格自动排版生成内容
  5. 批量生成 - 支持生成多页完整演示文稿
  6. ⭐ 图表展示 - 支持柱状图、折线图、饼图、雷达图等多种数据可视化图表

关键词: PPT生成、模板分析、演示文稿、幻灯片、图文排版、自动化、pptxgenjs、图表、数据可视化


⭐⭐⭐ 页面类型与背景处理 (关键!)

五种核心页面类型

不同类型的页面可能使用不同的背景处理方式:

页面类型 典型特征 背景处理方式
封面页 (Cover) 主标题 + 副标题 + Logo 背景图/渐变/斜切形状
目录页 (TOC) 目录列表 + 装饰元素 纯色背景 + 装饰形状
章节页 (Chapter) 大号章节编号 + 章节标题 纯色背景 + 装饰形状
内容页 (Content) 标题 + 正文/图片/图表 纯色背景/背景图
结束页 (Thanks) 感谢语 + 联系方式 纯色背景 + 装饰形状

⭐⭐⭐ 背景类型分析

PPT 背景有三种主要类型:

1. 纯色背景 (SolidFill)

<!-- XML 特征 -->
<p:bg>
  <p:bgPr>
    <a:solidFill>
      <a:schemeClr val="tx2"/>  <!-- 使用主题色 -->
    </a:solidFill>
  </p:bgPr>
</p:bg>

<!-- 或直接指定颜色 -->
<a:solidFill>
  <a:srgbClr val="0D1E43"/>  <!-- 直接 RGB 值 -->
</a:solidFill>

pptxgenjs 对应代码:

slide.background = { color: '0D1E43' };  // 深蓝色

2. 背景图片 (BlipFill)

<!-- XML 特征 -->
<p:bg>
  <p:bgPr>
    <a:blipFill>
      <a:blip r:embed="rId2"/>  <!-- 引用图片资源 -->
    </a:blipFill>
  </p:bgPr>
</p:bg>

<!-- 或在形状中作为图片填充 -->
<p:pic>
  <p:blipFill>
    <a:blip r:embed="rId2"/>
  </p:blipFill>
</p:pic>

pptxgenjs 对应代码:

slide.background = { path: 'workspace/backgrounds/cover-bg.png' };

3. 渐变背景 (GradFill)

<!-- XML 特征 -->
<a:gradFill>
  <a:gsLst>
    <a:gs pos="0">
      <a:srgbClr val="0052D9"><a:alpha val="50000"/></a:srgbClr>
    </a:gs>
    <a:gs pos="100000">
      <a:srgbClr val="0D1E43"/>
    </a:gs>
  </a:gsLst>
  <a:lin ang="5400000"/>  <!-- 角度:5400000/60000 = 90° -->
</a:gradFill>

pptxgenjs 对应代码:

slide.background = {
  color: '0D1E43',  // 基础色
  // 注:pptxgenjs 对渐变背景支持有限,通常用形状模拟
};

// 用形状模拟渐变
slide.addShape('rect', {
  x: 0, y: 0, w: '100%', h: '100%',
  fill: {
    type: 'gradient',
    gradientType: 'linear',
    degrees: 90,
    stops: [
      { position: 0, color: '0052D9', alpha: 50 },
      { position: 100, color: '0D1E43' }
    ]
  }
});

主题色映射

很多模板使用主题色(schemeClr)而非直接颜色值:

schemeClr 值 含义 典型颜色
dk1 深色1 (主要文字) 000000
lt1 / bg1 浅色1 (背景) FFFFFF
dk2 / tx2 深色2 (次要背景) 0060FF / 0D1E43
lt2 浅色2 E7E6E6
accent1 强调色1 0060F0
accent2 强调色2 A736FF

从 theme1.xml 提取主题色映射:

cat workspace/template-analysis/ppt/theme/theme1.xml | grep -E "dk1|lt1|dk2|lt2|accent" | head -20

⭐⭐⭐ 分页面类型完整分析流程

# 完整的页面背景分析脚本
import re
import os

def analyze_slide_background(slide_path, rels_path):
    """分析单页幻灯片的背景类型"""
    
    with open(slide_path, 'r', encoding='utf-8') as f:
        content = f.read()
    
    result = {
        'background_type': None,
        'background_color': None,
        'background_image': None,
        'decorative_shapes': [],
        'scheme_color': None
    }
    
    # 1. 检查是否有 <p:bg> 背景定义
    bg_match = re.search(r'<p:bg>(.*?)</p:bg>', content, re.DOTALL)
    if bg_match:
        bg_content = bg_match.group(1)
        
        # 纯色背景
        if '<a:solidFill>' in bg_content:
            result['background_type'] = 'solid'
            # 直接颜色
            color = re.search(r'srgbClr va
how to use universal-pptx-generator

How to use universal-pptx-generator on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add universal-pptx-generator
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/ajaxhe/universal-pptx-generator-skill --skill universal-pptx-generator

The skills CLI fetches universal-pptx-generator from GitHub repository ajaxhe/universal-pptx-generator-skill and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/universal-pptx-generator

Reload or restart Cursor to activate universal-pptx-generator. Access the skill through slash commands (e.g., /universal-pptx-generator) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

User Story & Requirements Generation

Create detailed user stories, acceptance criteria, and feature specs

Example

Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios

Reduce spec writing time by 50%, ensure comprehensive coverage

Competitive Analysis

Research competitors, compare features, identify gaps

Example

Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities

Complete competitive research in 2 hours instead of 2 days

Roadmap Prioritization

Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs

Example

Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale

Make data-driven prioritization decisions faster

Stakeholder Communication

Draft PRDs, status updates, and stakeholder presentations

Example

Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement

Save 3-5 hours/week on communication overhead

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client
  • Access to product documentation and roadmap tools (Jira, Notion, etc.)
  • Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
  • Stakeholder contact information and communication channels

Time Estimate

30-60 minutes to see productivity improvements

Installation Steps

  1. 1.Install product management skill
  2. 2.Start with user story generation for known feature
  3. 3.Progress to competitive analysis: research 2-3 competitors
  4. 4.Use for roadmap prioritization: apply RICE/ICE scoring
  5. 5.Draft stakeholder communications and refine based on feedback
  6. 6.Build template library for recurring PM tasks
  7. 7.Share effective prompts with product team

Common Pitfalls

  • Not validating competitive research—verify facts before sharing
  • Accepting user stories without involving engineering team
  • Over-relying on frameworks without qualitative judgment
  • Not customizing outputs to company culture and communication style
  • Skipping stakeholder validation of generated requirements

Best Practices

✓ Do

  • +Validate research and competitive analysis with real data
  • +Collaborate with engineering when generating technical requirements
  • +Customize frameworks and templates to your company context
  • +Use skill for first drafts, refine with stakeholder input
  • +Document successful prompt patterns for PM tasks
  • +Combine AI efficiency with human judgment and intuition

✗ Don't

  • Don't publish competitive analysis without fact-checking
  • Don't finalize user stories without engineering review
  • Don't make prioritization decisions solely on AI scoring
  • Don't skip customer validation of generated requirements
  • Don't ignore company-specific context and culture

💡 Pro Tips

  • Provide context: company goals, constraints, customer feedback
  • Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
  • Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
  • Use skill for 70% generation + 30% customization to company needs

When to Use This

✓ Use When

Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.

✗ Avoid When

Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.

Learning Path

  1. 1Basic: user stories, feature specs, status updates
  2. 2Intermediate: competitive analysis, prioritization frameworks, PRDs
  3. 3Advanced: product strategy, go-to-market planning, OKR setting
  4. 4Expert: product vision, market positioning, business model innovation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.573 reviews
  • Li Jain· Dec 24, 2024

    Keeps context tight: universal-pptx-generator is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Aisha Diallo· Dec 20, 2024

    universal-pptx-generator has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Ganesh Mohane· Dec 16, 2024

    Keeps context tight: universal-pptx-generator is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Hassan Farah· Dec 12, 2024

    universal-pptx-generator fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Li Chawla· Dec 4, 2024

    universal-pptx-generator is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Isabella Wang· Nov 23, 2024

    universal-pptx-generator reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Isabella Robinson· Nov 15, 2024

    Registry listing for universal-pptx-generator matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Emma Brown· Nov 11, 2024

    universal-pptx-generator fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Rahul Santra· Nov 7, 2024

    Registry listing for universal-pptx-generator matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Aisha Khan· Nov 7, 2024

    Useful defaults in universal-pptx-generator — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

showing 1-10 of 73

1 / 8