Morph
Generate visually compelling PPTs with smooth Morph animations.
Philosophy: Trust yourself to learn through practice. This skill provides workflow and references — you bring creativity and judgment.
Use when
- - User wants to generate a INLINECODE0
What is Morph?
PowerPoint's Morph transition creates smooth animations by matching shapes with identical names across adjacent slides.
CODEBLOCK0
Three core concepts:
- - Scene Actors: Persistent shapes with
!! prefix that evolve across slides - Ghosting: Move shapes to
x=36cm (off-screen) instead of deleting - Content: Text/data added fresh per slide, previous content ghosted first
For details: reference/pptx-design.md
Workflow
Phase 1: Understand the Topic
Ask only when topic is unclear, otherwise proceed directly.
Phase 2: Plan the Story
FIRST: Read the thinking framework
→ Open and read reference/decision-rules.md — it provides the structured approach for planning compelling presentations (Pyramid Principle, SCQA, page types).
Then create brief.md with:
- - Context: Topic, audience, purpose, narrative structure (SCQA or Problem-Solution)
- Outline: Conclusion first + slide-by-slide summary
- Page briefs: For each slide:
- Objective (what should this slide achieve?)
- Content (specific text/data to include)
- Page type (title | evidence | transition | conclusion)
- Design notes (visual emphasis, scene actor behavior)
Phase 3: Design and Generate
Before generation starts, always remind the user:
- - The PPT file may be rewritten multiple times during build.
- Once the PPT file appears in the workspace, the user can preview the live generation progress directly in AionUi.
- Do not click "Open with system app" during generation, to avoid file lock / write conflicts.
- Use clear, direct language and make this a concrete warning, not an optional suggestion.
FIRST: Ensure latest officecli version
Follow the installation check in reference/officecli-pptx-min.md section 0 (checks version and upgrades only if needed).
IMPORTANT: Use morph-helpers for reliable workflow
Generate a Python script that uses reference/morph-helpers.py — this provides helper functions with built-in verification. Python works cross-platform (Mac / Windows / Linux).
Shape naming rules (for best results):
Use these naming patterns for clear code and reliable verification:
- 1. Scene actors (persistent across slides):
- Format:
name=!!actor-name
- Examples:
name=!!ring-1,
name=!!dot-accent,
name=!!line-top
- Behavior: Modify position/size/color, NEVER ghost
- 2. Content shapes (unique per slide):
- Format:
name=#sN-description
- Pattern:
# +
s + slide_number +
- + description
- Examples:
name=#s1-title,
name=#s2-card1,
name=#s3-stats
- Behavior: Ghost (x=36cm) when moving to next slide
Why this naming matters:
- - ✅ Better detection: Primary method (
#sN- pattern matching) is fastest and most accurate - ✅ Readable code: Anyone can tell
#s1-title is slide 1's title - ✅ Easy debugging:
grep "#s1-" finds all slide 1 content quickly - ⚠️ Backup detection exists: Even without
# prefix, duplicate text detection will catch most issues (but has edge cases)
Bottom line: Follow these patterns in your code examples, and verification will work smoothly.
Then proceed with pattern:
CODEBLOCK1
Key advantages of using helpers:
- - ✅ Fewer steps:
morph_clone_slide = clone + transition + list + verify (4 steps → 1 function) - ✅ Instant feedback: Each helper shows ✅ or ❌ immediately
- ✅ Can't forget: Transition and verification are automatic
- ✅ Clear errors: If something is wrong, you'll know exactly what and where
- ✅ Dual detection: Catches unghosted content by both naming pattern AND duplicate text detection
- Even if you forget
# prefix, duplicate detection will still catch the problem!
Essential rules:
- - Naming: Scene actors use
!! prefix, content uses #sN- prefix (best practice for verification and readability) - Transition: Every slide after the first MUST have
transition=morph (without this, no animation!) - Ghosting: Before adding new slide content, ghost ALL previous content shapes to
x=36cm (don't delete) - Motion: Adjust scene actor (
!!-*) positions between slides for animation - Variety: Create spatial variety between adjacent slides
- Text Width: Use generous widths to prevent text wrapping:
- Centered titles (64-72pt):
28-30cm width
- Centered subtitles (28-40pt):
25-28cm width
- Left-aligned titles:
20-25cm width
- Body text: 8-12cm (single-column), 16-18cm (double-column)
-
When in doubt, make it wider! See
reference/pptx-design.md for details
Design resources:
- -
reference/pptx-design.md — Design principles (Canvas, Fonts, Colors, Scene Actors, Page Types, Style References) - INLINECODE32 — Command syntax
- INLINECODE33 — Visual style examples (optional inspiration, browse by use case in
styles/INDEX.md)
Phase 4: Deliver
Outputs (3 files):
- 1. INLINECODE35
- Build script (complete, re-runnable — bash/python/powershell/etc.)
- INLINECODE36
Verification (your build script already includes this):
If you used morph-helpers.py, verification is already done! The build script calls helper("verify", ...) and helper("final-check", ...) automatically.
Just validate the final structure:
CODEBLOCK2
If verification fails, see Troubleshooting section below.
Final delivery message requirements:
- - Tell the user the deck with polished Morph animations is ready.
- Explicitly recommend opening the generated PPT now to preview the motion effects.
- Use affirmative wording (e.g., "ready now", "open it now to preview the animation quality").
Troubleshooting
If morph_verify_slide or morph_final_check reports issues:
- 1. Missing transition:
CODEBLOCK3
- 2. Unghosted content:
CODEBLOCK4
- 3. Visual issues:
CODEBLOCK5
Note: Scene actors (!!-prefixed) should appear on all slides — that's normal. Only content shapes (#sN- prefix) need ghosting.
Phase 5: Iterate
Ask user for feedback, support quick adjustments.
References
- -
reference/decision-rules.md — Planning logic, Pyramid Principle - INLINECODE45 — Design principles (Canvas, Fonts, Colors, Scene Actors, Page Types)
- INLINECODE46 — Tool syntax
- INLINECODE47 — Visual style examples organized by use case
First time? Read "Understanding Morph" above, skim one style reference for inspiration, then generate. Always use
morph-helpers.py workflow. You'll learn by doing.
Trust yourself. You have vision, design sense, and the ability to iterate. These tools enable you — your creativity makes it excellent.
变形
通过流畅的变形动画生成视觉震撼的PPT。
理念:相信自己能在实践中学习。本技能提供工作流程和参考——你带来创意和判断力。
使用场景
什么是变形?
PowerPoint的变形过渡通过匹配相邻幻灯片中名称相同的形状来创建流畅动画。
幻灯片1:形状名称=!!circle x=5cm 宽度=8cm
幻灯片2:形状名称=!!circle x=20cm 宽度=12cm
↓
结果:圆形平滑移动并放大
三个核心概念:
- - 场景演员:带有!!前缀的持久形状,在幻灯片之间演变
- 幽灵化:将形状移动到x=36cm(屏幕外)而非删除
- 内容:每张幻灯片新增文本/数据,先幽灵化前一内容
详情请见:reference/pptx-design.md
工作流程
阶段一:理解主题
仅在主题不明确时提问,否则直接进行。
阶段二:规划故事
首先:阅读思考框架
→ 打开并阅读reference/decision-rules.md——它提供了规划引人入胜演示文稿的结构化方法(金字塔原理、SCQA、页面类型)。
然后创建brief.md,包含:
- - 背景:主题、受众、目的、叙事结构(SCQA或问题-解决方案)
- 大纲:结论优先 + 逐页摘要
- 页面简报:每张幻灯片包含:
- 目标(这张幻灯片要实现什么?)
- 内容(要包含的具体文本/数据)
- 页面类型(标题 | 证据 | 过渡 | 结论)
- 设计说明(视觉重点、场景演员行为)
阶段三:设计与生成
在开始生成前,始终提醒用户:
- - PPT文件在构建过程中可能会被多次重写。
- 一旦PPT文件出现在工作区,用户可以直接在AionUi中预览实时生成进度。
- 不要在生成过程中点击使用系统应用打开,以避免文件锁定/写入冲突。
- 使用清晰直接的语言,将其作为具体警告而非可选建议。
首先:确保最新版officecli
按照reference/officecli-pptx-min.md第0节中的安装检查执行(仅检查版本并在需要时升级)。
重要提示:使用morph-helpers确保工作流程可靠
生成一个使用reference/morph-helpers.py的Python脚本——该脚本提供带有内置验证的辅助函数。Python支持跨平台(Mac / Windows / Linux)。
形状命名规则(为获得最佳效果):
使用以下命名模式以确保代码清晰和验证可靠:
- 1. 场景演员(跨幻灯片持久存在):
- 格式:name=!!actor-name
- 示例:name=!!ring-1、name=!!dot-accent、name=!!line-top
- 行为:修改位置/大小/颜色,绝不幽灵化
- 2. 内容形状(每张幻灯片唯一):
- 格式:name=#sN-description
- 模式:# + s + 幻灯片编号 + - + 描述
- 示例:name=#s1-title、name=#s2-card1、name=#s3-stats
- 行为:移动到下一张幻灯片时幽灵化(x=36cm)
为什么这种命名很重要:
- - ✅ 更好的检测:主要方法(#sN-模式匹配)最快最准确
- ✅ 代码可读性:任何人都能看出#s1-title是幻灯片1的标题
- ✅ 易于调试:grep #s1-能快速找到所有幻灯片1的内容
- ⚠️ 存在备用检测:即使没有#前缀,重复文本检测也能捕获大多数问题(但存在边界情况)
底线:在代码示例中遵循这些模式,验证将顺利进行。
然后按以下模式进行:
python
#!/usr/bin/env python3
import subprocess, sys, os
def run(*args):
result = subprocess.run(list(args))
if result.returncode != 0:
sys.exit(result.returncode)
加载辅助函数(提供morphcloneslide、morphghostcontent、morphverifyslide)
SCRIPT_DIR = os.path.dirname(os.path.abspath(
file))
def helper(*args):
run(sys.executable, os.path.join(SCRIPT_DIR, reference, morph-helpers.py), *[str(a) for a in args])
OUTPUT = deck.pptx
run(officecli, create, OUTPUT)
============ 幻灯片1 ============
print(正在构建幻灯片1...)
run(officecli, add, OUTPUT, /, --type, slide)
run(officecli, set, OUTPUT, /slide[1], --prop, background=1A1A2E)
场景演员(!!前缀,将在幻灯片间持久存在并变形)
run(officecli, add, OUTPUT, /slide[1], --type, shape,
--prop, name=!!ring-1, --prop, preset=ellipse, --prop, fill=E94560,
--prop, opacity=0.3, --prop, x=5cm, --prop, y=3cm, --prop, width=8cm, --prop, height=8cm)
run(officecli, add, OUTPUT, /slide[1], --type, shape,
--prop, name=!!dot-accent, --prop, preset=ellipse, --prop, fill=0F3460,
--prop, x=28cm, --prop, y=15cm, --prop, width=1cm, --prop, height=1cm)
内容形状(#s1-前缀,将在下一张幻灯片被幽灵化)
使用宽裕的宽度(标题25-30cm)以避免文本换行!
run(officecli, add, OUTPUT, /slide[1], --type, shape,
--prop, name=#s1-title, --prop, text=主标题,
--prop, font=Arial Black, --prop, size=64, --prop, bold=true,
--prop, color=FFFFFF, --prop, x=10cm, --prop, y=8cm,
--prop, width=28cm, --prop, height=3cm, --prop, fill=none)
============ 幻灯片2 ============
print(正在构建幻灯片2...)
使用辅助函数:自动克隆 + 设置过渡 + 列出形状 + 验证
helper(clone, OUTPUT, 1, 2)
使用辅助函数:幽灵化幻灯片1的所有内容(形状索引3 = #s1-title)
helper(ghost, OUTPUT, 2, 3)
为幻灯片2添加新内容
run(officecli, add, OUTPUT, /slide[2], --type, shape,
--prop, name=#s2-title, --prop, text=第二张幻灯片,
--prop, font=Arial Black, --prop, size=64, --prop, bold=true,
--prop, color=FFFFFF, --prop, x=10cm, --prop, y=8cm,
--prop, width=28cm, --prop, height=3cm, --prop, fill=none)
调整场景演员以创建运动效果
run(officecli, set, OUTPUT, /slide[2]/shape[1], --prop, x=15cm, --prop, y=5cm) # !!ring-1移动
run(officecli, set, OUTPUT, /slide[2]/shape[2], --prop, x=5cm, --prop, y=10cm) # !!dot-accent移动
使用辅助函数:验证幻灯片是否正确(过渡 + 幽灵化)
helper(verify, OUTPUT, 2)
============ 幻灯片3 ============
print(正在构建幻灯片3...)
helper(clone, OUTPUT, 2, 3)
helper(ghost, OUTPUT, 3, 4) # 幽灵化#s2-title(现在位于索引4)
run(officecli, add, OUTPUT, /slide[3], --type, shape,
--prop, name=#s3-title, --prop, text=第三张幻灯片,
--prop, font=Arial Black, --prop, size=64, --prop, bold=true,
--prop, color=FFFFFF, --prop, x=10cm, --prop, y=8cm,
--prop, width=28cm, --prop, height=3cm, --prop,