SSkill 广场
Skill 广场/ 文档/ svg-pptx-gen

svg-pptx-gen

SVG 转 PPTX 生成器

下载技能包
精选 自研 文档 v1.0.0
15 次下载热度 28更新 2026-09-08 3 个文件 9.5 KB MIT 许可
描述

Generate professional presentation slides (.pptx) by creating SVG visuals with AI and packaging them into PowerPoint files. Use when the user wants to create presentations, slide decks, PPT, or PPTX files with AI-generated visuals. Triggers on requests like "make a presentation", "create slides", "生成PPT", "制作幻灯片", or when producing .pptx output with visual SVG content.

SKILL.md 正文

SVG-PPTX Generator

Generate professional presentations by creating SVG slide visuals and packaging them into .pptx files.

Core Workflow

User Input (topic/outline) → Parse into per-slide content → Generate SVG per slide → Package into .pptx

Step 1: Parse User Input into Slide Outlines

If the user provides:

  • A topic: Decompose into 4-8 slides covering introduction, key points, and conclusion
  • An outline: Use each section as a slide
  • Bullet points: Group into logical slides (1 main idea per slide)
  • A document/article: Extract key sections as slide content

For each slide, produce a concise Chinese content summary (50-100 chars) that captures the core message.

Step 2: Select Style

Default to Style 01 unless user specifies otherwise. See reference.md for all 10 style presets.

Quick reference:

IDNameBest For
01Standard VisualGeneral purpose, balanced layout
02Structured DetailContent-heavy, hierarchical info
03Clean AestheticMinimalist, elegant presentations
04Data & ChartsNumbers, statistics, comparisons
05Text & ImageMixed media, illustrated content
06Timeline FlowChronological, process sequences
07Grid LayoutCategorized, modular content
08ComparisonSide-by-side contrasts
09Highlight FocusKey metrics, important takeaways
10Process StepsStep-by-step workflows

Step 3: Generate SVG for Each Slide

For each slide, generate an SVG following these mandatory rules:

SVG Specification:

  • ViewBox: 0 0 960 540 (16:9 aspect ratio)
  • Background: white (#FFFFFF)
  • Font: Use system sans-serif fonts (font-family="system-ui, -apple-system, sans-serif")
  • All text must use <text> elements (NOT <foreignObject>)
  • No external images or resources
  • Embed all styles inline (no <style> blocks with classes)

Prompt Construction (replicate original app logic):

Build the prompt as: GLOBAL_PROMPT_PREFIX + STYLE_PROMPT + SLIDE_CONTENT

Where:

  • GLOBAL_PROMPT_PREFIX = "请你生成SVG代码,要求尺寸:16:9,内容附后面n"
  • STYLE_PROMPT = the prompt text from the selected style preset (see reference.md)
  • SLIDE_CONTENT = the concise content summary for this slide

Quality Skills (apply 3-5 randomly per slide): Pick from: 版式规划, 层级梳理, 标题统一, 文案压缩, 留白校准, 字号优化, 色彩平衡, 边界防溢出, 箭头克制, 重叠排查

Incorporate these skill directives into your SVG generation process mentally — ensure the output adheres to the selected skills.

Critical SVG Quality Rules:

  1. Title bar at top: consistent design across all slides in the deck
  2. Text must not overlap — verify x/y coordinates leave sufficient spacing
  3. Font sizes: titles ≥ 28px, body ≥ 16px, annotations ≥ 12px
  4. Use rounded rectangles, subtle shadows, and soft gradients for modern aesthetics
  5. Color palette: pick 2-3 accent colors and use them consistently across the deck
  6. Adequate whitespace: margins ≥ 40px from edges, ≥ 20px between elements
  7. Charts/diagrams use simple geometric shapes (rect, circle, line, polygon)
  8. Chinese text: ensure sufficient character spacing and line height (1.5x font size minimum)

Step 4: Package into .pptx

After generating all SVGs, use the pptx skill to create the final .pptx file:

  1. Save each SVG to a temporary .svg file
  2. Invoke the pptx skill to create a presentation with one slide per SVG
  3. Each slide should embed the SVG as a full-bleed image covering the entire slide area
  4. Set slide dimensions to 13.33" × 7.5" (standard 16:9 widescreen)
  5. Deliver the final .pptx file to the user

Fallback: If the pptx skill is unavailable, save SVGs individually and instruct the user to import them into PowerPoint manually.

Refinement Workflow

After initial generation, the user may request changes:

  1. Style change: Regenerate the specific slide(s) with a different style preset
  2. Content edit: Modify the slide content and regenerate the SVG
  3. Visual tweak: Adjust specific visual aspects (colors, layout, fonts) and regenerate

For refinement, include the existing SVG code in context and provide targeted modifications.

Multi-language Support

  • If user writes in Chinese → generate content in Chinese
  • If user writes in English → generate content in English (but keep the GLOBAL_PROMPT_PREFIX in Chinese as it guides SVG structure)
  • Mixed content: follow the dominant language of user input

Output Checklist

Before delivering, verify:

  • [ ] All SVGs have correct viewBox 0 0 960 540
  • [ ] No text overlaps in any slide
  • [ ] Consistent title bar design across slides
  • [ ] Color palette is coherent across the deck
  • [ ] .pptx file is generated and saved successfully