The user wants me to create a skill that converts PPT to HTML. Let me first load the skill-creator skill to follow its instructions for creating a new skill.
好的,在创建这个技能之前,我想先了解清楚你的具体需求。
明白了!你需要一个完整的幻灯片播放器式 PPT 转 HTML 技能,支持动画过渡、完整元素还原和响应式适配。让我来创建它。
先初始化技能骨架:
/Applications/WorkBuddy.app/Contents/Resources/app.asar.unpacked/resources/builtin-skills/skill-creator/scripts/init_skill.py ppt-to-html --path /Users/demo/.workbuddy/skills/ppt-to-html
先清理示例文件,然后开始编写核心转换脚本:
现在编写核心转换脚本:
验证脚本语法:
描述中有 <> 符号,修复一下:
I see! The regex for description is r'description:\s*(.+)' which with . (not DOTALL) only matches the first line after description:. So the description captured is > (the YAML folded block indicator), which contains >! That's the issue.
The YAML > folded block scalar means the description only captures > as the first line. I need to either:
- Use a single-line description
- Use
|instead of> - Write a proper YAML description without the multiline
Let me rewrite the frontmatter to use a single line or use | instead:
I will keep the description concise so the validator can read the complete value without treating the YAML block marker as content.
After updating the frontmatter, I will run the skill validator again, inspect the generated package, and confirm the trigger description is parsed correctly.
If validation passes, the cleaned skill folder can be packaged without changing the conversion script or its HTML output.
问题是 > 作为 YAML 折叠块指示符,被正则捕获为描述内容。改写为单行格式:
重新打包干净的版本:
ppt-to-html 技能已创建完成!
技能结构
~/.workbuddy/skills/ppt-to-html/
├── SKILL.md # 技能说明文档
└── scripts/
└── ppt2html.py # 核心转换脚本核心能力
使用方式
当你说「把 xxx.pptx 转成 HTML」时,技能会自动触发,执行:
python scripts/ppt2html.py input.pptx [--theme dark] [--transition zoom] [--autoplay 5]
生成的 HTML 播放器支持快捷键: 翻页、Space 播放/暂停、F 全屏。
打包文件