scripts/generate_ppt.py - Generate PPT with specific template (uses real style_id and tpl_id from API)
Key Features
Smart categorization: Analyzes topic content to suggest appropriate style
Fallback logic: If template not found, automatically uses random selection
Complete parameters: Properly passes both style_id and tpl_id to API
Usage Examples
# List all templates with IDs
python3 scripts/ppt_theme_list.py
# Smart automatic selection (recommended for most users)
python3 scripts/random_ppt_theme.py --query "人工智能发展趋势报告"
# Specific template with proper style_id
python3 scripts/generate_ppt.py --query "儿童英语课件" --tpl_id 106
# Specific template with auto-suggested category
python3 scripts/random_ppt_theme.py --query "企业年度总结" --category "企业商务"
Agent Steps
Get PPT topic from user
Ask: "Want to choose a template style?"
If user says YES:
Run ppt_theme_list.py to show available templates
User selects a template (note the tpl_id)
Run generate_ppt.py --query "TOPIC" --tpl_id ID
If user says NO:
Run random_ppt_theme.py --query "TOPIC"
Script will auto-select appropriate template based on topic
Set timeout to 300 seconds (PPT generation takes 2-5 minutes)
Monitor output, wait for is_end: true to get final PPT URL
API integration: Fetches real style_id from Baidu API for each template
Error handling: If template not found, falls back to random selection
Timeout: Generation takes 2-5 minutes, set sufficient timeout
Streaming: Uses streaming API, wait for is_end: true before considering complete
1---2name: ai-ppt-generator3description: AI PPT Generator4---5# AI PPT Generator67Generate PPT using Baidu AI with intelligent template selection.89## Smart Workflow101. **User provides PPT topic**112. **Agent asks**: "Want to choose a template style?"123. **If yes** → Show styles from `ppt_theme_list.py` → User picks → Use `generate_ppt.py` with chosen `tpl_id` and real `style_id`134. **If no** → Use `random_ppt_theme.py` (auto-selects appropriate template based on topic content)1415## Intelligent Template Selection16`random_ppt_theme.py` analyzes the topic and suggests appropriate template:17- **Business topics** → 企业商务 style18- **Technology topics** → 未来科技 style 19- **Education topics** → 卡通手绘 style20- **Creative topics** → 创意趣味 style21- **Cultural topics** → 中国风 or 文化艺术 style22- **Year-end reports** → 年终总结 style23- **Minimalist design** → 扁平简约 style24- **Artistic content** → 文艺清新 style2526## Scripts27- `scripts/ppt_theme_list.py` - List all available templates with style_id and tpl_id28- `scripts/random_ppt_theme.py` - Smart template selection + generate PPT29- `scripts/generate_ppt.py` - Generate PPT with specific template (uses real style_id and tpl_id from API)3031## Key Features32- **Smart categorization**: Analyzes topic content to suggest appropriate style33- **Fallback logic**: If template not found, automatically uses random selection34- **Complete parameters**: Properly passes both style_id and tpl_id to API3536## Usage Examples37```bash38# List all templates with IDs39python3 scripts/ppt_theme_list.py4041# Smart automatic selection (recommended for most users)42python3 scripts/random_ppt_theme.py --query "人工智能发展趋势报告"4344# Specific template with proper style_id45python3 scripts/generate_ppt.py --query "儿童英语课件" --tpl_id 1064647# Specific template with auto-suggested category48python3 scripts/random_ppt_theme.py --query "企业年度总结" --category "企业商务"49```5051## Agent Steps521. Get PPT topic from user532. Ask: "Want to choose a template style?" 543. **If user says YES**:55 - Run `ppt_theme_list.py` to show available templates56 - User selects a template (note the tpl_id)57 - Run `generate_ppt.py --query "TOPIC" --tpl_id ID`584. **If user says NO**:59 - Run `random_ppt_theme.py --query "TOPIC"`60 - Script will auto-select appropriate template based on topic615. Set timeout to 300 seconds (PPT generation takes 2-5 minutes)626. Monitor output, wait for `is_end: true` to get final PPT URL6364## Output Examples65**During generation:**66```json67{"status": "PPT生成中", "run_time": 45}68```6970**Final result:**71```json72{73 "status": "PPT导出结束", 74 "is_end": true, 75 "data": {"ppt_url": "https://image0.bj.bcebos.com/...ppt"}76}77```7879## Technical Notes80- **API integration**: Fetches real style_id from Baidu API for each template81- **Error handling**: If template not found, falls back to random selection82- **Timeout**: Generation takes 2-5 minutes, set sufficient timeout83- **Streaming**: Uses streaming API, wait for `is_end: true` before considering complete
Run npx skillmds@latest add comeonoliver/ai-ppt-generator in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
AI PPT Generator It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
ComeOnOliver (@comeonoliver) published this skill. Their other Agent Skills are listed on their SkillMD profile.