Creating Slides Skill
Provides complete HTML slide creation capabilities, including project creation, content design, technical specifications, workflows, and best practices.
Core Capabilities
- Project Creation - Create complete slide project structure
- Page Creation - Create slide pages conforming to specifications
- Content Research - Obtain reference materials and data
- Image Search - Batch search high-quality image materials
- Data Analysis - Support Python scripts for data analysis and processing
- Project Management - Support editing, refactoring, moving, and renaming slide projects
Code Execution Method (Critical)
All Python code examples in this skill must be executed via the run_sdk_snippet tool in Agent environment.
Correct example:
# Correct! Must use run_sdk_snippet to execute
run_sdk_snippet(
python_code="""
from sdk.tool import tool
result = tool.call('create_slide_project', {
"project_path": "my-project",
"slides_array": []
})
"""
)
All code blocks in this document starting with from sdk.tool import tool follow this rule: pass them via the python_code parameter of run_sdk_snippet for execution.
Default Requirements
When user has no explicit requirements, follow these defaults:
- Page count: Determine appropriate page count based on content, each page ≤100 lines of code
- Content density: One key point per page, text ≤150 words, images ≤1
- Slide mindset: 1920×1080 fixed canvas, prioritize horizontal layout, avoid vertical overflow
- Business minimalist style, follow font size specifications, Tailwind mandatory priority
Technical Specifications
Size and Implementation
- Fixed size: 1920px×1080px, strictly no overflow, width and height must be explicitly set in html and body tags
- Implementation: HTML + CSS + JavaScript
- Static fixed page: Same effect on any device size, no adaptation, responsive design prohibited
- Must include
<script src="slide-bridge.js"></script> at bottom of page for inter-page communication
CSS Frameworks and Resources
Technical Constraints
- File generation: Only generate static HTML files
- Responsive design prohibited: Strictly no media queries, pages don't change with screen size
- Content overload prohibited: Avoid excessively long text, too many list items, oversized images; split into multiple pages when single page has too much content
- Dynamic effects prohibited: Page switching controlled by outer system, single pages focus on static display; disable transition, keyframes, dynamic data display animations; disable sound effects, only keep static visuals (CSS hover, shadows, gradients, borders and other style effects can be used normally)
- Don't use server-side code, local file resources, complex interactive features
- Unless user requests, don't use unverified external images
- JavaScript code inline at
<body> bottom, CSS inline in <head>, SVG graphics inline directly
- Chart implementation: Charts, dashboards and any ECharts-supported content must use ECharts implementation, prohibited to write HTML, CSS, SVG code yourself
Tailwind Mandatory Specification
- Maximize use of Tailwind classes: Layout flex/grid, spacing p-/m-, font size text-, colors text-/bg-, decoration rounded-/shadow-*, etc.
- Minimize custom CSS: Limited to complex gradients, pseudo-elements and other scenarios Tailwind cannot implement
Font Size Specification (1920×1080 canvas requires large fonts)
- Page main title: 64-72px (text-6xl/7xl) - Prefer 64px and above
- Section title/Card main title: 40-52px (text-5xl) - Don't go below 40px
- Subtitle/Card subtitle: 30-36px (text-3xl/4xl) - Prefer 32px and above
- Body text/List item: 22-26px (text-2xl) - Minimum 22px, prefer 24px
- Auxiliary label: 20px (text-xl) - Only for tiny labels
- Strictly prohibit 18px (text-lg) and below, unless user explicitly requires
- Principle: Prefer large fonts with less content split into more pages, not small fonts cramming into one page
Visual Hierarchy
Font size contrast (main title differs from body by 3-4 levels) + weight contrast (title font-bold/black) + color contrast (title text-gray-900, body text-gray-600/700) + spatial contrast (important elements mb-8/10/12) + decorative elements (number labels, color blocks, vertical bars)
Design Principles
Content Design Mindset
- One key point per page: Each slide conveys only one core message, maintain focused attention
- Information hierarchy: Establish clear information hierarchy through font size, color depth, spatial position, create depth through shadows and transforms
- Visual expression: Use FontAwesome or Emoji icons to enhance visual expression
Image Requirements
- Image ratio: 70% of slides must contain high-quality images, e.g., 7 out of 10 slides must contain images
- When an image is the main visual anchor, make it part of the layout rather than a tiny corner illustration. It should usually occupy about one third to one half of the main content area.
- Slides without images still need a strong visual anchor, such as a chart, matrix, color block, large number, geometric decoration, card grid, or flow diagram. Avoid pages with only a title and sparse body text.
- Search keywords: Must contain at least one subject keyword, prohibited to use abstract, general, non-specific keywords
- Search format:
[Subject keyword] [Specific scene description]
- Extract at least 1-3 subject keywords related to slide content
- Keyword examples:
- Correct: "IShowSpeed China tour Beijing Great Wall" Wrong: "Beijing Great Wall"
- Correct: "Elon Musk portrait" Wrong: "Tech giant portrait"
- Correct: "Zuckerberg astronomical talent poaching" (specific event) Wrong: "AI talent competition" (abstract, general, non-specific)
- Prohibited to use placeholder images, must use high-quality images returned by image_search tool
Design Style
Default style: Minimalist business style
- Primary colors: Black/white/gray (text-gray-*)
- Accent colors: Orange/red/green/blue (max 1-2 per page)
- Background: Mainly white/light gray, dark background for contrast
- Prohibited: Excessive use of blue, purple, gradients
Style selection: Based on content theme and target audience, derive from minimalist business style, imitate popular PPT design styles including but not limited to:
- Tech: Apple Keynote, Google Material Design, Microsoft Fluent Design
- Business: McKinsey Consulting, Huawei Enterprise, Alibaba Enterprise
- Consumer brands: Xiaomi, Netflix, Nike
- Design-driven: Minimalism, Flat Design
- Media publishing: TED Talks, National Geographic
- Education academia: Stanford University, MIT
Layout Design Core Principles
- Precise zoning planning: Precise zoning planning based on 1920×1080 canvas
- Priority layout modes: Single column centered, left-right split, three-point grid, standard three-section, card-style, timeline (only horizontal timeline allowed), comparison split-screen and dashboard classic PPT layout modes
- Especially recommend left-right split layout (like 60/40 or 50/50), fully utilize horizontal space, avoid vertical stacking causing height overflow
- Zoning planning:
- Header area: Fixed height about 10% (like h-24)
- Middle content area: Occupies main space, can flexibly divide into 2×2, 3×3 grid, max 9-grid
- Footer area: Fixed height about 5% (below h-16), images not allowed
- Horizontal division: Max 6 columns per row, avoid overly fragmented division causing content crowding
- Vertical infinite extension prohibited: Maximize horizontal space use, e.g., horizontal timeline not vertical timeline
Use predefined grid (grid-cols-2/3, grid-rows-2) with gap-4/6/8 unified spacing, flexibly control element space occupation through col-span-2, row-span-2, avoid pixel values defining grid size, use fr units or percentages; Flex layout uses TailwindCSS proportional width classes (w-1/2, w-1/3, w-2/3) prohibited hardcoded pixels, leverage flex-1, justify-between, items-center to achieve responsive layout and balanced content distribution.
Height Control Technique (Critical)
[Hard Requirement] Page height must strictly not exceed 1080px, this is a non-negotiable specification!
If content is too much for a single page, must split into multiple pages, absolutely not allowed to let single page exceed 1080px height.
Reasonable slide height control is extremely important. A simple effective approach is using Grid horizontal card layout, maximize horizontal space use, control similar left-right content amounts, aligned arrangement, overall neat typography.
During conception, page preceding elements should choose height-sensitive elements (usually need sufficient space), subsequent elements/content use height-insensitive elements (usually can adapt to remaining space, like charts), so only need to consider preceding element heights, set subsequent element/content heights to fill remaining height.
While ensuring page is visually full, absolutely don't cram too much readable substantive content in one page.
Please think through above points step by step during design, ensure perfect page layout and height control. Unless user has conflicting requirements, must default to this approach for page layout and height control.
Image Usage Technique
Images are very dangerous, hard-to-control elements in slide creation. Need to plan space with similar aspect ratio to place images, carry images through container elements, let images fill container. Container width and height should use relative units (like percentages, fr units) or Grid layout's automatic allocation mechanism, not fixed, often miscalculated pixel values, otherwise images often overflow canvas causing layout chaos.
Content-related images may also be used as local section backgrounds to add depth. Put an independent overlay layer above the background image and keep text/cards in a separate foreground layer. Do not apply opacity to a container that also holds text.
<div
class="relative"
style="background-image:url('images/xxx.jpg');
background-size:cover;background-position:center;"
>
<div class="absolute inset-0" style="background:rgba(14,20,32,0.60);"></div>
<div class="relative z-10"><!-- content --></div>
</div>
Use background images selectively. Avoid repeating the same full-image treatment on most consecutive slides; alternate with charts, cards, diagrams, or clean graphic pages.
Default Design Mindset
Slides overall have premium feel, use rich decorative elements, conform to industry mainstream aesthetic practices, but don't introduce too much complexity. Note slide height control and neat typography, don't cram too much content in one page, this is key.
ECharts Configuration Requirements
- All ECharts charts must ensure echarts.init() only after HTML content and CSS styles are fully parsed (window.onload). Note: window.onload, not DOMContentLoaded.
- When page contains ECharts charts, must listen to window.resize event. When resize triggers, call resize() method on all charts.
- Chart containers should fully utilize available space, reserve margins to ensure complete text display.
Multi-axis alignment:
- Ensure same-direction axes have consistent tick counts to avoid grid line misalignment.
- Use min, max, interval parameters to achieve tick alignment.
Visual requirements:
- Keep axes, grid lines, labels aligned.
- Avoid text overlap and dense data display issues.
- Harmonious and unified color scheme, reasonable layout not obscuring key data.
Data Analysis Processing
When scenarios involve data analysis, write Python scripts for analysis:
- Python scripts are solely for data analysis processing, not data visualization. Use ECharts for visualization. Strictly prohibited to write chart rendering code in Python scripts.
- For data files like Excel, CSV, use read_files to read first 10 lines to understand structure, then use Python scripts for data analysis.
- For Excel files with multiple sheets or large size, always use Python scripts for analysis. First use script to view data structure and sheet structure, then perform analysis.
- Python script processing results should be refined. Script's role is to calculate and distill core data, not return large amounts of process data, typically hundreds to thousands of characters, max 5000 characters.
- Follow latest mainstream Python programming practices. Ensure code robustness, aim for one-time successful execution.
Slide HTML Template
Reference the following template to create slide pages. Each page is an independent HTML file, style should be consistent but can have appropriate variations, comments are for your understanding only, omit in actual development.
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8" />
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
<title>Slide Title</title>
<script src="https://cdn.tailwindcss.com/3.4.17"></script>
<link
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css"
rel="stylesheet"
/>
<link
href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700&display=swap"
rel="stylesheet"
/>
<style>
html,
body {
width: 1920px;
height: 1080px; /* DO NOT set height or max-height, allow extreme cases to exceed */
font-family:
"Noto Sans SC",
-apple-system,
BlinkMacSystemFont,
"Segoe UI",
"PingFang SC",
"Hiragino Sans GB",
"Microsoft YaHei",
sans-serif;
/* more styles can be added here... */
}
.slide-container {
width: 1920px;
height: 1080px;
/* padding: Adjust according to design needs */
/* more styles can be added here... */
}
</style>
</head>
<body>
<div class="slide-container">
<!-- Page content goes here -->
</div>
<!--
IMPORTANT: This script must be included in every generated slide page.
Simply copy this line as-is - no need to read or understand the script content.
It enables keyboard navigation and title synchronization with the parent page.
-->
<script src="slide-bridge.js"></script>
</body>
</html>
Quick Start
Reminder: All code examples below must be executed via run_sdk_snippet(python_code="..."). Refer to the "Code Execution Method" section at the top of this document.
Create Slide Project
from sdk.tool import tool
# Create empty project (add pages later)
result = tool.call('create_slide_project', {
"project_path": "ChatGPT-Evolution-Report",
"slides_array": [],
"slide_images_content": "",
"todo_list": ""
})
# Create complete project (with images and outline)
result = tool.call('create_slide_project', {
"project_path": "Product-Launch",
"slides_array": ["cover.html", "product-intro.html", "key-features.html"],
"slide_images_content": """# Slide Image Library
## Project Info
- Search topic: Product Launch
- Collected at: 2025-01-22 10:30:00
- Total images: 5
## Image Categories
### Cover / Hero

- Index: 1
- Size: 1920x1080px (16:9, horizontal)
- Visual Analysis: Modern tech product close-up, white background, professional lighting
- Use Case: Cover hero image
- Search Keywords: product hero image modern technology
""",
"todo_list": """# Slide Production Plan
## Project Info
- Project name: Product Launch
- Theme: New product release and feature showcase
- Pages: 3
- Keywords: product, technology, innovation
## Content Outline
### Cover (cover.html)
Display product name and hero visual
### Product Introduction (product-intro.html)
Introduce product background and core value
### Key Features (key-features.html)
Showcase the three core product features
"""
})
Create Single Slide Page
from sdk.tool import tool
result = tool.call('create_slide', {
"file_path": "ChatGPT-Evolution-Report/OpenAI-Milestones.html",
"content": """<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
<title>OpenAI Milestones</title>
<script src="https://cdn.tailwindcss.com/3.4.17"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css" rel="stylesheet"/>
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700&display=swap" rel="stylesheet"/>
<style>
html, body {
width: 1920px;
height: 1080px;
font-family: 'Noto Sans SC', sans-serif;
}
.slide-container {
width: 1920px;
height: 1080px;
}
</style>
</head>
<body>
<div class="slide-container bg-gradient-to-br from-blue-50 to-white flex items-center justify-center">
<div class="text-center">
<h1 class="text-7xl font-bold text-gray-900 mb-8">OpenAI Milestones</h1>
<p class="text-3xl text-gray-600">Key moments in AI development</p>
</div>
</div>
<script src="slide-bridge.js"></script>
</body>
</html>""",
"max_width": 1920,
"max_height": 1080,
"analysis_js": """
const issues = [];
const container = document.querySelector('.slide-container');
if (container) {
const {x, y, width, height} = container.getBoundingClientRect();
if (y + height > maxHeight) {
issues.push(`Container bottom overflow: ${Math.round(y+height)} > ${maxHeight}`);
}
}
return issues.length > 0 ? issues.join(', ') : 'Layout check passed';
""",
"insert_after_slide": ""
})
# Second page
result = tool.call('create_slide', {
"file_path": "ChatGPT-Evolution-Report/Development-Timeline.html",
"content": """...""",
"max_width": 1920,
"max_height": 1080,
"analysis_js": """...""",
"insert_after_slide": "OpenAI-Milestones.html"
})
# Third page
result = tool.call('create_slide', {
"file_path": "ChatGPT-Evolution-Report/Technical-Breakthroughs.html",
"content": """...""",
"max_width": 1920,
"max_height": 1080,
"analysis_js": """...""",
"insert_after_slide": "Development-Timeline.html"
})
Search Image Materials
from sdk.tool import tool
result = tool.call('image_search', {
"topic_id": "ChatGPT-Evolution-Report",
"requirements_xml": """<requirements>
<requirement>
<name>Musk Portrait</name>
<query>Elon Musk portrait professional</query>
<visual_understanding_prompt>Verify this is a clear portrait of Elon Musk</visual_understanding_prompt>
<requirement_explanation>Need a professional portrait photo of Musk for the person introduction page</requirement_explanation>
<expected_aspect_ratio>3:4</expected_aspect_ratio>
<count>3</count>
</requirement>
<requirement>
<name>ChatGPT Interface</name>
<query>ChatGPT interface screenshot 2025</query>
<visual_understanding_prompt>Confirm this is a real ChatGPT interface screenshot</visual_understanding_prompt>
<requirement_explanation>Need a real ChatGPT interface screenshot to showcase product features</requirement_explanation>
<expected_aspect_ratio>16:9</expected_aspect_ratio>
<count>5</count>
</requirement>
<requirement>
<name>Tech Background</name>
<query>AI technology abstract background</query>
<visual_understanding_prompt>Assess whether this is suitable as a technology-themed background</visual_understanding_prompt>
<requirement_explanation>Need an abstract tech-style background image for slide backgrounds</requirement_explanation>
<expected_aspect_ratio>16:9</expected_aspect_ratio>
<count>3</count>
</requirement>
</requirements>"""
})
Web Content Retrieval
from sdk.tool import tool
# Search web pages
search_result = tool.call('web_search', {
"topic_id": "ChatGPT-Research",
"requirements_xml": """<requirements>
<requirement>
<name>ChatGPT History</name>
<query>ChatGPT development history 2025</query>
<limit>10</limit>
</requirement>
<requirement>
<name>GPT-4 Breakthroughs</name>
<query>OpenAI GPT-4 technical breakthroughs</query>
<limit>10</limit>
<time_period>month</time_period>
</requirement>
<requirement>
<name>Commercialization</name>
<query>ChatGPT commercialization progress</query>
<limit>10</limit>
</requirement>
</requirements>"""
})
# Read high-value webpages (refer to separate documentation for this tool)
# read_result = tool.call('read_webpages_as_markdown', {...})
Core Tools and Parameters
create_slide_project - Create Slide Project
| Parameter |
Required |
Type |
Description |
project_path |
Yes |
string |
Project relative path (folder name), e.g., "ChatGPT-Development-Report" |
slide_count |
No |
number |
Slide page count, default 0 (empty project or determined by slides_array) |
slides_array |
Yes |
array |
List of slide filenames, can be empty array [] |
slide_images_content |
No |
string |
Image material library content (Markdown format), empty means not creating file |
todo_list |
No |
string |
Task planning content (Markdown format), empty means not creating file |
Tool Functions:
- Create project folder structure
- Auto-generate
index.html (presentation controller)
- Auto-generate
magic.project.js (project config)
- Auto-generate
slide-bridge.js (inter-page communication script)
- Create
images/ folder
- If
slide_images_content is provided, automatically download images to images/ folder
create_slide - Create Slide Page
| Parameter |
Required |
Type |
Description |
file_path |
Yes |
string |
Slide file path (relative to working directory), e.g., "project-name/page.html" |
content |
Yes |
string |
Complete HTML content |
max_width |
Yes |
number |
Expected max width (usually 1920) |
max_height |
Yes |
number |
Expected max height (usually 1080) |
analysis_js |
Yes |
string |
Layout analysis JavaScript function body (without function declaration) |
insert_after_slide |
Yes |
string |
Insert position: "" for first page, filename to insert after that file |
Tool Functions:
- Write HTML file
- Load via browser and execute
analysis_js for quality check
- Detect layout issues, height overflow, image stretch, small fonts
- Auto-update slides array based on
insert_after_slide
analysis_js Instructions:
- Function body content (without
function() declaration)
- Can access
maxWidth, maxHeight
- Use
return for result
- Focus on detecting element overflow
insert_after_slide Instructions:
"" for first page, filename to insert after
- Auto-updates slides array
image_search - Batch Search Images
| Parameter |
Required |
Type |
Description |
topic_id |
Yes |
string |
Search topic identifier for deduplication |
requirements_xml |
Yes |
string |
XML format search requirements configuration |
requirements_xml Format:
Each <requirement> contains:
name - Requirement name (required)
query - Search keywords (required)
visual_understanding_prompt - Visual analysis prompt (required)
requirement_explanation - Requirement explanation (required)
expected_aspect_ratio - Expected aspect ratio, e.g., 16:9, 9:16, 1:1 (required)
count - Image count (optional, default 20, max 50)
Key Principles:
- Each requirement must provide clear search keywords
- Keywords must include subject words, prohibit pure generic terms
- Choose language based on search intent (Chinese/English/mixed)
- Visual analysis cannot assess clarity, only content
web_search - Web Search
| Parameter |
Required |
Type |
Description |
topic_id |
Yes |
string |
Search topic identifier for deduplication |
requirements_xml |
Yes |
string |
XML format search requirements configuration |
requirements_xml Format:
Each <requirement> contains:
name - Requirement name (required)
query - Search keywords (required)
limit - Result count (optional, default 10, max 20)
offset - Pagination offset (optional, default 0)
language - Search language (optional, default zh-CN)
region - Search region (optional, default CN)
time_period - Time range (optional): day/week/month/year
Project Architecture
Slide projects use separated architecture design:
Project Name/
├── index.html # Presentation controller - handles page navigation, keyboard control, scaling adaptation
├── magic.project.js # Project config - stores slides array and other config info
├── slide-bridge.js # Inter-slide communication script
├── images/ # Image resource folder
├── Slide Page 1.html # Specific slide page
├── Slide Page 2.html # Specific slide page
└── ...
Architecture Working Principles:
index.html is the core controller of presentation system, containing:
- Navigation logic: handles keyboard events, page switching
- Display engine: iframe loading, 16:9 scaling adaptation
create_slide_project tool auto-generates index.html and magic.project.js files, no need to read these files
magic.project.js stores project config, including slides array defining slide page path list
slide-bridge.js is inter-slide communication script, auto-generated by create_slide_project tool, no need to read
- Each HTML file in project root is a completely independent slide page:
- Self-contained design: independent styles, content, scripts
- Standard size: based on 1920×1080 design
- Each slide project must be a complete self-contained project, therefore:
- Slide pages prohibited from referencing images or resources outside project folder. All images must be stored in images folder, otherwise cannot render correctly
- User-uploaded images need to be copied to images folder via shell_exec(command="cp src_path dst_path") command to be correctly referenced
Tool Usage Principles
Tool Restrictions for Slide Creation
Primary Tools (use when creating slides):
web_search - Internet content retrieval
read_webpages_as_markdown - Read high-value webpage content
create_slide_project - Create slide project
create_slide - Create individual slide page
image_search - Batch search image materials
Prohibited Tools (don't use when creating slides):
- File writing tools - No quality checks
- File editing tools - Only when user explicitly requests partial edits
shell_exec with mkdir - create_slide_project auto-creates
Exceptions:
- Non-slide tasks (e.g., "write Python script"), can use other file tools
- User explicitly requests partial edits, can use file editing tools
Tool Selection Principles
Creating Pages: Always use create_slide
create_slide = file writing + quality check + auto-registration
- Don't use file writing tools (no quality checks)
Editing Pages:
- Small-scale (≤100 chars): Use file editing tools
- Large-scale (>100 chars): Use
create_slide to recreate
Project Initialization: Use create_slide_project
- Don't manually
mkdir directories
- Don't manually create
magic.project.js and slide-bridge.js
create_slide_project completes all initialization in one go
Magic Project Mechanism
Core Concept: Folder containing magic.project.js = Frontend recognizes as Magic Project
magic.project.js Operation Constraints:
- Format is JSONP (not JSON), generated by dedicated tools (e.g., setup_audio_project)
- Never create this file directly
- Allowed to edit and modify parameters inside (e.g., metadata.speakers)
Frontend Rendering Differentiation:
- Regular folder: Shows folder icon, click to expand file list
- Magic Project: Shows project icon, click to open dedicated panel (loads index.html visualization interface)
User Operations:
- Click project icon: Open project panel (not entering folder, not opening index.html file)
- Click arrow next to project name: Expand to see internal raw files (like expanding regular folder)
Project Types: type options include audio, slide, etc. Entire folder called "super deliverable".
Tool Parameter Format Specifications
create_slide_project Parameter Formats
slide_images_content Format Requirements
The slide_images_content parameter should contain complete slide-images.md file content, formatted as follows:
# Slide Image Material Library
## Project Information
- Search Topic: ChatGPT Evolution and Technological Breakthroughs
- Collection Time: 2025-01-22 10:30:00
- Total Images: 15
## Image Categories
### Cover/Hero Images

- Index: 1
- Size: {width}x{height}px ({ratio}, {horizontal/vertical/square})
- Visual Analysis: {AI analysis result, excluding size info, describe in detail with minimum words, at least 50 characters}
- Use Case: {recommended usage scenario}
- Search Keywords: {keywords used}

- Index: 2
- Size: {width}x{height}px ({ratio}, {horizontal/vertical/square})
- Visual Analysis: {AI analysis result, excluding size info, describe in detail with minimum words, at least 50 characters}
- Use Case: {recommended usage scenario}
- Search Keywords: {keywords used}
### Background Images

- Index: 3
[Each image follows same format, use standard Markdown image syntax with sequential numbering...]
### Product/Content Display Images

- Index: N
[Continue with same format, ensure index increments sequentially...]
### Icon/Decorative Images

- Index: N+1
[Continue with same format, ensure index increments sequentially...]
Important Notes:
- Use standard Markdown image format:

- filename serves as image alt text and also as filename when downloading
- filename must include file extension, e.g., .jpg, .png, .webp, etc.
- filename should prioritize user's preferred language, be concise and clear, e.g., "trump-assassination-attempt.jpg", "chatgpt-viral-phenomenon.png", "tesla-q4-earnings.jpg"
todo_list Format Requirements
The todo_list parameter should contain complete slide-todo.md file content for recording slide content planning and task breakdown.
Recommended format:
# Slide Production Task Planning
## Project Information
- Project Name: ChatGPT Development Report
- Theme: ChatGPT Evolution and Impact Analysis
- Pages: 10
- Key Keywords: ChatGPT, OpenAI, GPT-4, Artificial Intelligence
## Content Outline
### Cover (OpenAI Milestones.html)
Introduce OpenAI's important development nodes and breakthrough achievements
### Table of Contents (AI Revolution Timeline.html)
Display key time points and milestone events in artificial intelligence development
### GPT Series Evolution (GPT-4 Technological Breakthrough.html)
Detail GPT-4's technical innovations and performance improvements compared to previous generations
### Commercialization Process (ChatGPT Business Miracle.html)
Analyze how ChatGPT reached billion-level user scale in short time
...
magic.project.js Format Description (slide type)
magic.project.js is a JSONP format project configuration file that defines slide project structure and page list.
File Structure:
window.magicProjectConfig = {
version: "1.0.0",
type: "slide",
name: "Project Name",
slides: ["cover.html", "contents.html", "content-page.html"],
};
window.magicProjectConfigure(window.magicProjectConfig);
Field Descriptions:
- version: Configuration file version number, fixed as "1.0.0"
- type: Project type, fixed as "slide" (slide type)
- name: Project name, usually folder name
- slides: Slide page path array, relative to project root, defines page order
slides Array Characteristics:
- Array elements are strings, each string is a relative path to an HTML file
- Array order is the slide playback order
- Can be empty array
[] (empty project), add page paths later via edit_file
- Frontend loads and navigates slide pages based on this array
Modification Examples:
Use edit_file tool to modify slides array content:
- Add page: Append new file path to end of array
- Remove page: Remove specified path from array
- Adjust order: Rearrange array element order
Note: Ensure valid JSONP syntax after modification (valid JavaScript code)
image_search Keyword Strategy
Basic Principles
When using image_search tool, query keywords must be diversified, try 2-3 different keyword combinations for each requirement.
Keyword Language Selection Principles
Judge language based on search intent and information source, try multilingual combinations:
- Search foreign websites/international reports → Use English or original language
- Search local websites → Use local language
- Uncertain about source → Mix multiple languages for comprehensive results
- Same topic can use different languages to get different perspectives
Search Strategy Framework
- Core word: Most direct topic word
- Qualifier: Core word + attribute/function/scenario
- Combination: Multiple related elements combined
- Variant: Synonym/abbreviation/colloquialism/multilingual variant
Search Examples
Search iPhone official images:
- "iPhone", "iPhone 17 Pro Max", "iPhone official"
Search Chinese netizens' comments about Musk (screenshots):
- "Musk Weibo", "Musk comments Chinese", "Musk social media China"
Search international news images about Musk:
- "Elon Musk", "Musk Tesla", "Musk 2025"
Search WeChat function interface:
- "WeChat app", "WeChat interface", "WeChat Pay"
Search international reports about WeChat:
- "WeChat", "WeChat China", "WeChat report"
Search Tesla Shanghai factory (mixed):
- "Tesla Shanghai", "Tesla Shanghai Gigafactory", "Tesla China factory"
Wrong Examples (Avoid)
- Use "collaboration software" → Too generic, should use "Figma", "Figma collaboration" etc.
- Use "database tool" → No subject, should use "Notion database", "Airtable" etc.
- Prohibit generic searches: No using only generic industry terms (software/platform/tool), pure function terms (payment/chat), pure adjectives (modern/advanced)
Keyword Diversification Principles
- From core to specific: Subject name → Subject+attribute → Subject+scenario+time
- Try different expressions: Choose language based on source/abbreviation/full name/multilingual variants
- Combine different elements: Subject/action/time/location
- At least 2-3 different angles per requirement
Create Specific Slide Workflow
If user requests creating specific slides or requests imitating/referencing to generate slides, reference partial workflow of complete creation workflow to flexibly complete user's creation needs.
Best Practices
1. Use create_slide_project to Create Project
- When user has no image requirements: slide_images_content can be empty
- When user already provided images: No need to use image_search tool to search images, instead use visual_understanding tool to analyze image info, write image info into slide_images_content per format requirements
- When user already provided outline or specific text: No need to use web_search tool to search webpages, directly extract todo_list content
2. Directly Use create_slide to Create Slides
- Create slides based on user-provided information
- Insist on using create_slide tool, use analysis_js to analyze layout
- Don't use file writing tools
3. Special Handling for Imitate/Reference Scenarios
- Remember to copy original images: Copy original images to new project's images folder, ensure complete slide project architecture
- Use shell_exec(command="cp src_path dst_path") command to copy images
Complete Creation Workflow
If user has no special requirements, follow this workflow step by step to complete slide creation task:
1. Internet Search
- Understand task description and user needs
- Round 1 search (required): Generate 3 keyword sets for web_search tool, search relevant pages
- Round 2 search (optional): If search results differ from expectations (common in current events scenarios), generate 3+ keyword sets again, conduct second round search with web_search
- Select high-value pages, eliminate duplicates and irrelevant pages. If user doesn't specify count, default to 5 high-value pages, use read_webpages_as_markdown to get high-value page content
2. Image Search and Content Planning
- Batch image search: Use image_search tool to batch search image materials, default minimum batch search 5+ requirements at once, all different, covering large, medium, small, horizontal, vertical various sizes or different scenarios for later use, set topic_id to project name (ensure deduplication)
- One-time batch search: Speculate various types of image needs potentially needed later, initiate batch search in one go, common examples: search background large images, character portraits, product close-ups, icons in different sizes and scenarios
- Avoid duplicates: Don't repeatedly use visual analysis on similar content images, ensure similar content images only used once
- Content planning: Based on user needs and reference materials, analyze and plan slide content:
- Analyze user specific needs and background
- Extract core content points from reference files
- Determine slide page count (determine appropriate page count based on content)
- Identify target audience and usage scenarios
- Choose appropriate design style: Select most suitable style direction from design style list based on content theme
- Prepare content: Prepare complete slide_images_content and todo_list content
…(truncated)
1---2name: creating-slides3description: Slide/PPT creation skill that provides complete slide creation, editing, and management capabilities. Use when users need to create slides, make presentations, edit slide content, or manage slide projects. CRITICAL - When user message contains [@slide_project:...] mention, you MUST load this skill first before any operations.4---5
6# Creating Slides Skill
7
8Provides complete HTML slide creation capabilities, including project creation, content design, technical specifications, workflows, and best practices.
9
10## Core Capabilities
11
12- **Project Creation** - Create complete slide project structure
13- **Page Creation** - Create slide pages conforming to specifications
14- **Content Research** - Obtain reference materials and data
15- **Image Search** - Batch search high-quality image materials
16- **Data Analysis** - Support Python scripts for data analysis and processing
17- **Project Management** - Support editing, refactoring, moving, and renaming slide projects
18
19---
20
21## Code Execution Method (Critical)
22
23All Python code examples in this skill **must be executed via the `run_sdk_snippet` tool** in Agent environment.
24
25**Correct example**:
26
27```python
28# Correct! Must use run_sdk_snippet to execute
29run_sdk_snippet(
30 python_code="""
31from sdk.tool import tool
32result = tool.call('create_slide_project', {
33 "project_path": "my-project",
34 "slides_array": []
35})
36"""
37)
38```
39
40All code blocks in this document starting with `from sdk.tool import tool` follow this rule: pass them via the `python_code` parameter of `run_sdk_snippet` for execution.
41
42---
43
44## Default Requirements
45
46When user has no explicit requirements, follow these defaults:
47
48- **Page count**: Determine appropriate page count based on content, each page ≤100 lines of code
49- **Content density**: One key point per page, text ≤150 words, images ≤1
50- **Slide mindset**: 1920×1080 fixed canvas, prioritize horizontal layout, avoid vertical overflow
51- **Business minimalist style**, follow font size specifications, Tailwind mandatory priority
52
53---
54
55## Technical Specifications
56
57### Size and Implementation
58
59- **Fixed size**: 1920px×1080px, strictly no overflow, width and height must be explicitly set in html and body tags
60- **Implementation**: HTML + CSS + JavaScript
61- **Static fixed page**: Same effect on any device size, no adaptation, responsive design prohibited
62- **Must include** `<script src="slide-bridge.js"></script>` at bottom of page for inter-page communication
63
64### CSS Frameworks and Resources
65
66- **TailwindCSS**: https://cdn.tailwindcss.com/3.4.17 (required, note: this CDN uses JIT browser compilation mode, returns JS code, use `<script>` tag)
67- **FontAwesome**: https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css (required)
68- **Google Fonts**: https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700&display=swap (required)
69- **ECharts**: https://cdnjs.cloudflare.com/ajax/libs/echarts/5.6.0/echarts.min.js (use when necessary)
70
71### Technical Constraints
72
73- **File generation**: Only generate static HTML files
74- **Responsive design prohibited**: Strictly no media queries, pages don't change with screen size
75- **Content overload prohibited**: Avoid excessively long text, too many list items, oversized images; split into multiple pages when single page has too much content
76- **Dynamic effects prohibited**: Page switching controlled by outer system, single pages focus on static display; disable transition, keyframes, dynamic data display animations; disable sound effects, only keep static visuals (CSS hover, shadows, gradients, borders and other style effects can be used normally)
77- **Don't use server-side code, local file resources, complex interactive features**
78- **Unless user requests, don't use unverified external images**
79- **JavaScript code inline at `<body>` bottom, CSS inline in `<head>`, SVG graphics inline directly**
80- **Chart implementation**: Charts, dashboards and any ECharts-supported content must use ECharts implementation, prohibited to write HTML, CSS, SVG code yourself
81
82### Tailwind Mandatory Specification
83
84- **Maximize use of Tailwind classes**: Layout flex/grid, spacing p-_/m-_, font size text-_, colors text-_/bg-_, decoration rounded-_/shadow-\*, etc.
85- **Minimize custom CSS**: Limited to complex gradients, pseudo-elements and other scenarios Tailwind cannot implement
86
87### Font Size Specification (1920×1080 canvas requires large fonts)
88
89- **Page main title**: 64-72px (text-6xl/7xl) - Prefer 64px and above
90- **Section title/Card main title**: 40-52px (text-5xl) - Don't go below 40px
91- **Subtitle/Card subtitle**: 30-36px (text-3xl/4xl) - Prefer 32px and above
92- **Body text/List item**: 22-26px (text-2xl) - Minimum 22px, prefer 24px
93- **Auxiliary label**: 20px (text-xl) - Only for tiny labels
94- **Strictly prohibit 18px (text-lg) and below**, unless user explicitly requires
95- **Principle**: Prefer large fonts with less content split into more pages, not small fonts cramming into one page
96
97### Visual Hierarchy
98
99Font size contrast (main title differs from body by 3-4 levels) + weight contrast (title font-bold/black) + color contrast (title text-gray-900, body text-gray-600/700) + spatial contrast (important elements mb-8/10/12) + decorative elements (number labels, color blocks, vertical bars)
100
101---
102
103## Design Principles
104
105### Content Design Mindset
106
107- **One key point per page**: Each slide conveys only one core message, maintain focused attention
108- **Information hierarchy**: Establish clear information hierarchy through font size, color depth, spatial position, create depth through shadows and transforms
109- **Visual expression**: Use FontAwesome or Emoji icons to enhance visual expression
110
111### Image Requirements
112
113- **Image ratio**: 70% of slides must contain high-quality images, e.g., 7 out of 10 slides must contain images
114- When an image is the main visual anchor, make it part of the layout rather than a tiny corner illustration. It should usually occupy about one third to one half of the main content area.
115- Slides without images still need a strong visual anchor, such as a chart, matrix, color block, large number, geometric decoration, card grid, or flow diagram. Avoid pages with only a title and sparse body text.
116- **Search keywords**: Must contain at least one subject keyword, prohibited to use abstract, general, non-specific keywords
117 - Search format: `[Subject keyword] [Specific scene description]`
118 - Extract at least 1-3 subject keywords related to slide content
119 - Keyword examples:
120 - Correct: "IShowSpeed China tour Beijing Great Wall" Wrong: "Beijing Great Wall"
121 - Correct: "Elon Musk portrait" Wrong: "Tech giant portrait"
122 - Correct: "Zuckerberg astronomical talent poaching" (specific event) Wrong: "AI talent competition" (abstract, general, non-specific)
123- **Prohibited to use placeholder images**, must use high-quality images returned by image_search tool
124
125### Design Style
126
127**Default style**: Minimalist business style
128
129- **Primary colors**: Black/white/gray (text-gray-\*)
130- **Accent colors**: Orange/red/green/blue (max 1-2 per page)
131- **Background**: Mainly white/light gray, dark background for contrast
132- **Prohibited**: Excessive use of blue, purple, gradients
133
134**Style selection**: Based on content theme and target audience, derive from minimalist business style, imitate popular PPT design styles including but not limited to:
135
136- **Tech**: Apple Keynote, Google Material Design, Microsoft Fluent Design
137- **Business**: McKinsey Consulting, Huawei Enterprise, Alibaba Enterprise
138- **Consumer brands**: Xiaomi, Netflix, Nike
139- **Design-driven**: Minimalism, Flat Design
140- **Media publishing**: TED Talks, National Geographic
141- **Education academia**: Stanford University, MIT
142
143### Layout Design Core Principles
144
145- **Precise zoning planning**: Precise zoning planning based on 1920×1080 canvas
146- **Priority layout modes**: Single column centered, left-right split, three-point grid, standard three-section, card-style, timeline (only horizontal timeline allowed), comparison split-screen and dashboard classic PPT layout modes
147- **Especially recommend left-right split layout** (like 60/40 or 50/50), fully utilize horizontal space, avoid vertical stacking causing height overflow
148- **Zoning planning**:
149 - Header area: Fixed height about 10% (like h-24)
150 - Middle content area: Occupies main space, can flexibly divide into 2×2, 3×3 grid, max 9-grid
151 - Footer area: Fixed height about 5% (below h-16), images not allowed
152- **Horizontal division**: Max 6 columns per row, avoid overly fragmented division causing content crowding
153- **Vertical infinite extension prohibited**: Maximize horizontal space use, e.g., horizontal timeline not vertical timeline
154
155Use predefined grid (grid-cols-2/3, grid-rows-2) with gap-4/6/8 unified spacing, flexibly control element space occupation through col-span-2, row-span-2, avoid pixel values defining grid size, use fr units or percentages; Flex layout uses TailwindCSS proportional width classes (w-1/2, w-1/3, w-2/3) prohibited hardcoded pixels, leverage flex-1, justify-between, items-center to achieve responsive layout and balanced content distribution.
156
157### Height Control Technique (Critical)
158
159**[Hard Requirement] Page height must strictly not exceed 1080px, this is a non-negotiable specification!**
160
161If content is too much for a single page, **must split into multiple pages**, absolutely not allowed to let single page exceed 1080px height.
162
163**Reasonable slide height control is extremely important**. A simple effective approach is using Grid horizontal card layout, maximize horizontal space use, control similar left-right content amounts, aligned arrangement, overall neat typography.
164
165During conception, **page preceding elements should choose height-sensitive elements (usually need sufficient space), subsequent elements/content use height-insensitive elements (usually can adapt to remaining space, like charts)**, so only need to consider preceding element heights, set subsequent element/content heights to fill remaining height.
166
167While ensuring page is visually full, **absolutely don't cram too much readable substantive content in one page**.
168
169Please think through above points step by step during design, ensure perfect page layout and height control. Unless user has conflicting requirements, must default to this approach for page layout and height control.
170
171### Image Usage Technique
172
173Images are very dangerous, hard-to-control elements in slide creation. Need to plan space with similar aspect ratio to place images, carry images through container elements, let images fill container. Container width and height should use relative units (like percentages, fr units) or Grid layout's automatic allocation mechanism, not fixed, often miscalculated pixel values, otherwise images often overflow canvas causing layout chaos.
174
175Content-related images may also be used as local section backgrounds to add depth. Put an independent overlay layer above the background image and keep text/cards in a separate foreground layer. Do not apply `opacity` to a container that also holds text.
176
177```html
178<div
179 class="relative"
180 style="background-image:url('images/xxx.jpg');
181 background-size:cover;background-position:center;"
182>
183 <div class="absolute inset-0" style="background:rgba(14,20,32,0.60);"></div>
184 <div class="relative z-10"><!-- content --></div>
185</div>
186```
187
188Use background images selectively. Avoid repeating the same full-image treatment on most consecutive slides; alternate with charts, cards, diagrams, or clean graphic pages.
189
190### Default Design Mindset
191
192Slides overall have premium feel, use rich decorative elements, conform to industry mainstream aesthetic practices, but don't introduce too much complexity. Note slide height control and neat typography, don't cram too much content in one page, this is key.
193
194---
195
196## ECharts Configuration Requirements
197
198- All ECharts charts must ensure echarts.init() only after HTML content and CSS styles are fully parsed (window.onload). Note: window.onload, not DOMContentLoaded.
199- When page contains ECharts charts, must listen to window.resize event. When resize triggers, call resize() method on all charts.
200- Chart containers should fully utilize available space, reserve margins to ensure complete text display.
201
202**Multi-axis alignment:**
203
204- Ensure same-direction axes have consistent tick counts to avoid grid line misalignment.
205- Use min, max, interval parameters to achieve tick alignment.
206
207**Visual requirements:**
208
209- Keep axes, grid lines, labels aligned.
210- Avoid text overlap and dense data display issues.
211- Harmonious and unified color scheme, reasonable layout not obscuring key data.
212
213---
214
215## Data Analysis Processing
216
217When scenarios involve data analysis, write Python scripts for analysis:
218
219- **Python scripts are solely for data analysis processing, not data visualization**. Use ECharts for visualization. Strictly prohibited to write chart rendering code in Python scripts.
220- For data files like Excel, CSV, use read_files to read first 10 lines to understand structure, then use Python scripts for data analysis.
221- For Excel files with multiple sheets or large size, always use Python scripts for analysis. First use script to view data structure and sheet structure, then perform analysis.
222- Python script processing results should be refined. Script's role is to calculate and distill core data, not return large amounts of process data, typically hundreds to thousands of characters, max 5000 characters.
223- Follow latest mainstream Python programming practices. Ensure code robustness, aim for one-time successful execution.
224
225---
226
227## Slide HTML Template
228
229Reference the following template to create slide pages. Each page is an independent HTML file, style should be consistent but can have appropriate variations, comments are for your understanding only, omit in actual development.
230
231```html
232<!DOCTYPE html>
233<html lang="zh">
234 <head>
235 <meta charset="utf-8" />
236 <meta content="width=device-width, initial-scale=1.0" name="viewport" />
237 <title>Slide Title</title>
238 <script src="https://cdn.tailwindcss.com/3.4.17"></script>
239 <link
240 href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css"
241 rel="stylesheet"
242 />
243 <link
244 href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700&display=swap"
245 rel="stylesheet"
246 />
247 <style>
248 html,
249 body {
250 width: 1920px;
251 height: 1080px; /* DO NOT set height or max-height, allow extreme cases to exceed */
252 font-family:
253 "Noto Sans SC",
254 -apple-system,
255 BlinkMacSystemFont,
256 "Segoe UI",
257 "PingFang SC",
258 "Hiragino Sans GB",
259 "Microsoft YaHei",
260 sans-serif;
261 /* more styles can be added here... */
262 }
263
264 .slide-container {
265 width: 1920px;
266 height: 1080px;
267 /* padding: Adjust according to design needs */
268 /* more styles can be added here... */
269 }
270 </style>
271 </head>
272 <body>
273 <div class="slide-container">
274 <!-- Page content goes here -->
275 </div>
276 <!--
277 IMPORTANT: This script must be included in every generated slide page.
278 Simply copy this line as-is - no need to read or understand the script content.
279 It enables keyboard navigation and title synchronization with the parent page.
280 -->
281 <script src="slide-bridge.js"></script>
282 </body>
283</html>
284```
285
286---
287
288## Quick Start
289
290> **Reminder**: All code examples below must be executed via `run_sdk_snippet(python_code="...")`. Refer to the "Code Execution Method" section at the top of this document.
291
292### Create Slide Project
293
294```python
295from sdk.tool import tool
296
297# Create empty project (add pages later)
298result = tool.call('create_slide_project', {
299 "project_path": "ChatGPT-Evolution-Report",
300 "slides_array": [],
301 "slide_images_content": "",
302 "todo_list": ""
303})
304
305# Create complete project (with images and outline)
306result = tool.call('create_slide_project', {
307 "project_path": "Product-Launch",
308 "slides_array": ["cover.html", "product-intro.html", "key-features.html"],
309 "slide_images_content": """# Slide Image Library
310
311## Project Info
312- Search topic: Product Launch
313- Collected at: 2025-01-22 10:30:00
314- Total images: 5
315
316## Image Categories
317
318### Cover / Hero
319
320
321- Index: 1
322- Size: 1920x1080px (16:9, horizontal)
323- Visual Analysis: Modern tech product close-up, white background, professional lighting
324- Use Case: Cover hero image
325- Search Keywords: product hero image modern technology
326""",
327 "todo_list": """# Slide Production Plan
328
329## Project Info
330- Project name: Product Launch
331- Theme: New product release and feature showcase
332- Pages: 3
333- Keywords: product, technology, innovation
334
335## Content Outline
336### Cover (cover.html)
337Display product name and hero visual
338
339### Product Introduction (product-intro.html)
340Introduce product background and core value
341
342### Key Features (key-features.html)
343Showcase the three core product features
344"""
345})
346```
347
348### Create Single Slide Page
349
350```python
351from sdk.tool import tool
352
353result = tool.call('create_slide', {
354 "file_path": "ChatGPT-Evolution-Report/OpenAI-Milestones.html",
355 "content": """<!DOCTYPE html>
356<html lang="en">
357<head>
358 <meta charset="utf-8"/>
359 <meta content="width=device-width, initial-scale=1.0" name="viewport"/>
360 <title>OpenAI Milestones</title>
361 <script src="https://cdn.tailwindcss.com/3.4.17"></script>
362 <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css" rel="stylesheet"/>
363 <link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700&display=swap" rel="stylesheet"/>
364 <style>
365 html, body {
366 width: 1920px;
367 height: 1080px;
368 font-family: 'Noto Sans SC', sans-serif;
369 }
370 .slide-container {
371 width: 1920px;
372 height: 1080px;
373 }
374 </style>
375</head>
376<body>
377 <div class="slide-container bg-gradient-to-br from-blue-50 to-white flex items-center justify-center">
378 <div class="text-center">
379 <h1 class="text-7xl font-bold text-gray-900 mb-8">OpenAI Milestones</h1>
380 <p class="text-3xl text-gray-600">Key moments in AI development</p>
381 </div>
382 </div>
383 <script src="slide-bridge.js"></script>
384</body>
385</html>""",
386 "max_width": 1920,
387 "max_height": 1080,
388 "analysis_js": """
389const issues = [];
390const container = document.querySelector('.slide-container');
391if (container) {
392 const {x, y, width, height} = container.getBoundingClientRect();
393 if (y + height > maxHeight) {
394 issues.push(`Container bottom overflow: ${Math.round(y+height)} > ${maxHeight}`);
395 }
396}
397return issues.length > 0 ? issues.join(', ') : 'Layout check passed';
398""",
399 "insert_after_slide": ""
400})
401
402# Second page
403result = tool.call('create_slide', {
404 "file_path": "ChatGPT-Evolution-Report/Development-Timeline.html",
405 "content": """...""",
406 "max_width": 1920,
407 "max_height": 1080,
408 "analysis_js": """...""",
409 "insert_after_slide": "OpenAI-Milestones.html"
410})
411
412# Third page
413result = tool.call('create_slide', {
414 "file_path": "ChatGPT-Evolution-Report/Technical-Breakthroughs.html",
415 "content": """...""",
416 "max_width": 1920,
417 "max_height": 1080,
418 "analysis_js": """...""",
419 "insert_after_slide": "Development-Timeline.html"
420})
421```
422
423### Search Image Materials
424
425```python
426from sdk.tool import tool
427
428result = tool.call('image_search', {
429 "topic_id": "ChatGPT-Evolution-Report",
430 "requirements_xml": """<requirements>
431 <requirement>
432 <name>Musk Portrait</name>
433 <query>Elon Musk portrait professional</query>
434 <visual_understanding_prompt>Verify this is a clear portrait of Elon Musk</visual_understanding_prompt>
435 <requirement_explanation>Need a professional portrait photo of Musk for the person introduction page</requirement_explanation>
436 <expected_aspect_ratio>3:4</expected_aspect_ratio>
437 <count>3</count>
438 </requirement>
439 <requirement>
440 <name>ChatGPT Interface</name>
441 <query>ChatGPT interface screenshot 2025</query>
442 <visual_understanding_prompt>Confirm this is a real ChatGPT interface screenshot</visual_understanding_prompt>
443 <requirement_explanation>Need a real ChatGPT interface screenshot to showcase product features</requirement_explanation>
444 <expected_aspect_ratio>16:9</expected_aspect_ratio>
445 <count>5</count>
446 </requirement>
447 <requirement>
448 <name>Tech Background</name>
449 <query>AI technology abstract background</query>
450 <visual_understanding_prompt>Assess whether this is suitable as a technology-themed background</visual_understanding_prompt>
451 <requirement_explanation>Need an abstract tech-style background image for slide backgrounds</requirement_explanation>
452 <expected_aspect_ratio>16:9</expected_aspect_ratio>
453 <count>3</count>
454 </requirement>
455</requirements>"""
456})
457```
458
459### Web Content Retrieval
460
461```python
462from sdk.tool import tool
463
464# Search web pages
465search_result = tool.call('web_search', {
466 "topic_id": "ChatGPT-Research",
467 "requirements_xml": """<requirements>
468 <requirement>
469 <name>ChatGPT History</name>
470 <query>ChatGPT development history 2025</query>
471 <limit>10</limit>
472 </requirement>
473 <requirement>
474 <name>GPT-4 Breakthroughs</name>
475 <query>OpenAI GPT-4 technical breakthroughs</query>
476 <limit>10</limit>
477 <time_period>month</time_period>
478 </requirement>
479 <requirement>
480 <name>Commercialization</name>
481 <query>ChatGPT commercialization progress</query>
482 <limit>10</limit>
483 </requirement>
484</requirements>"""
485})
486
487# Read high-value webpages (refer to separate documentation for this tool)
488# read_result = tool.call('read_webpages_as_markdown', {...})
489```
490
491---
492
493## Core Tools and Parameters
494
495### create_slide_project - Create Slide Project
496
497| Parameter | Required | Type | Description |
498| ---------------------- | -------- | ------ | ------------------------------------------------------------------------------- |
499| `project_path` | Yes | string | Project relative path (folder name), e.g., `"ChatGPT-Development-Report"` |
500| `slide_count` | No | number | Slide page count, default 0 (empty project or determined by slides_array) |
501| `slides_array` | Yes | array | List of slide filenames, can be empty array `[]` |
502| `slide_images_content` | No | string | Image material library content (Markdown format), empty means not creating file |
503| `todo_list` | No | string | Task planning content (Markdown format), empty means not creating file |
504
505**Tool Functions:**
506
507- Create project folder structure
508- Auto-generate `index.html` (presentation controller)
509- Auto-generate `magic.project.js` (project config)
510- Auto-generate `slide-bridge.js` (inter-page communication script)
511- Create `images/` folder
512- If `slide_images_content` is provided, automatically download images to `images/` folder
513
514### create_slide - Create Slide Page
515
516| Parameter | Required | Type | Description |
517| -------------------- | -------- | ------ | --------------------------------------------------------------------------------- |
518| `file_path` | Yes | string | Slide file path (relative to working directory), e.g., `"project-name/page.html"` |
519| `content` | Yes | string | Complete HTML content |
520| `max_width` | Yes | number | Expected max width (usually 1920) |
521| `max_height` | Yes | number | Expected max height (usually 1080) |
522| `analysis_js` | Yes | string | Layout analysis JavaScript function body (without function declaration) |
523| `insert_after_slide` | Yes | string | Insert position: `""` for first page, filename to insert after that file |
524
525**Tool Functions:**
526
527- Write HTML file
528- Load via browser and execute `analysis_js` for quality check
529- Detect layout issues, height overflow, image stretch, small fonts
530- Auto-update slides array based on `insert_after_slide`
531
532**analysis_js Instructions:**
533
534- Function body content (without `function()` declaration)
535- Can access `maxWidth`, `maxHeight`
536- Use `return` for result
537- Focus on detecting element overflow
538
539**insert_after_slide Instructions:**
540
541- `""` for first page, filename to insert after
542- Auto-updates slides array
543
544### image_search - Batch Search Images
545
546| Parameter | Required | Type | Description |
547| ------------------ | -------- | ------ | -------------------------------------------- |
548| `topic_id` | Yes | string | Search topic identifier for deduplication |
549| `requirements_xml` | Yes | string | XML format search requirements configuration |
550
551**requirements_xml Format:**
552Each `<requirement>` contains:
553
554- `name` - Requirement name (required)
555- `query` - Search keywords (required)
556- `visual_understanding_prompt` - Visual analysis prompt (required)
557- `requirement_explanation` - Requirement explanation (required)
558- `expected_aspect_ratio` - Expected aspect ratio, e.g., `16:9`, `9:16`, `1:1` (required)
559- `count` - Image count (optional, default 20, max 50)
560
561**Key Principles:**
562
563- Each requirement must provide clear search keywords
564- Keywords must include subject words, prohibit pure generic terms
565- Choose language based on search intent (Chinese/English/mixed)
566- Visual analysis cannot assess clarity, only content
567
568### web_search - Web Search
569
570| Parameter | Required | Type | Description |
571| ------------------ | -------- | ------ | -------------------------------------------- |
572| `topic_id` | Yes | string | Search topic identifier for deduplication |
573| `requirements_xml` | Yes | string | XML format search requirements configuration |
574
575**requirements_xml Format:**
576Each `<requirement>` contains:
577
578- `name` - Requirement name (required)
579- `query` - Search keywords (required)
580- `limit` - Result count (optional, default 10, max 20)
581- `offset` - Pagination offset (optional, default 0)
582- `language` - Search language (optional, default zh-CN)
583- `region` - Search region (optional, default CN)
584- `time_period` - Time range (optional): day/week/month/year
585
586---
587
588## Project Architecture
589
590Slide projects use separated architecture design:
591
592```
593Project Name/
594├── index.html # Presentation controller - handles page navigation, keyboard control, scaling adaptation
595├── magic.project.js # Project config - stores slides array and other config info
596├── slide-bridge.js # Inter-slide communication script
597├── images/ # Image resource folder
598├── Slide Page 1.html # Specific slide page
599├── Slide Page 2.html # Specific slide page
600└── ...
601```
602
603**Architecture Working Principles:**
604
6051. `index.html` is the core controller of presentation system, containing:
606 - Navigation logic: handles keyboard events, page switching
607 - Display engine: iframe loading, 16:9 scaling adaptation
608 - `create_slide_project` tool auto-generates index.html and magic.project.js files, no need to read these files
6092. `magic.project.js` stores project config, including slides array defining slide page path list
6103. `slide-bridge.js` is inter-slide communication script, auto-generated by `create_slide_project` tool, no need to read
6114. Each HTML file in project root is a completely independent slide page:
612 - Self-contained design: independent styles, content, scripts
613 - Standard size: based on 1920×1080 design
6145. Each slide project must be a complete self-contained project, therefore:
615 - Slide pages prohibited from referencing images or resources outside project folder. All images must be stored in images folder, otherwise cannot render correctly
616 - User-uploaded images need to be copied to images folder via shell_exec(command="cp src_path dst_path") command to be correctly referenced
617
618---
619
620## Tool Usage Principles
621
622### Tool Restrictions for Slide Creation
623
624**Primary Tools** (use when creating slides):
625
626- `web_search` - Internet content retrieval
627- `read_webpages_as_markdown` - Read high-value webpage content
628- `create_slide_project` - Create slide project
629- `create_slide` - Create individual slide page
630- `image_search` - Batch search image materials
631
632**Prohibited Tools** (don't use when creating slides):
633
634- File writing tools - No quality checks
635- File editing tools - Only when user explicitly requests partial edits
636- `shell_exec` with `mkdir` - `create_slide_project` auto-creates
637
638**Exceptions**:
639
640- Non-slide tasks (e.g., "write Python script"), can use other file tools
641- User explicitly requests partial edits, can use file editing tools
642
643### Tool Selection Principles
644
645**Creating Pages:** Always use `create_slide`
646
647- `create_slide` = file writing + quality check + auto-registration
648- Don't use file writing tools (no quality checks)
649
650**Editing Pages:**
651
652- Small-scale (≤100 chars): Use file editing tools
653- Large-scale (>100 chars): Use `create_slide` to recreate
654
655**Project Initialization:** Use `create_slide_project`
656
657- Don't manually `mkdir` directories
658- Don't manually create `magic.project.js` and `slide-bridge.js`
659- `create_slide_project` completes all initialization in one go
660
661---
662
663## Magic Project Mechanism
664
665**Core Concept**: Folder containing magic.project.js = Frontend recognizes as Magic Project
666
667**magic.project.js Operation Constraints**:
668
669- Format is JSONP (not JSON), generated by dedicated tools (e.g., setup_audio_project)
670- Never create this file directly
671- Allowed to edit and modify parameters inside (e.g., metadata.speakers)
672
673**Frontend Rendering Differentiation**:
674
675- Regular folder: Shows folder icon, click to expand file list
676- Magic Project: Shows project icon, click to open dedicated panel (loads index.html visualization interface)
677
678**User Operations**:
679
680- Click project icon: Open project panel (not entering folder, not opening index.html file)
681- Click arrow next to project name: Expand to see internal raw files (like expanding regular folder)
682
683**Project Types**: type options include audio, slide, etc. Entire folder called "super deliverable".
684
685---
686
687## Tool Parameter Format Specifications
688
689### create_slide_project Parameter Formats
690
691#### slide_images_content Format Requirements
692
693The `slide_images_content` parameter should contain complete slide-images.md file content, formatted as follows:
694
695```markdown
696# Slide Image Material Library
697
698## Project Information
699
700- Search Topic: ChatGPT Evolution and Technological Breakthroughs
701- Collection Time: 2025-01-22 10:30:00
702- Total Images: 15
703
704## Image Categories
705
706### Cover/Hero Images
707
708
709
710- Index: 1
711- Size: {width}x{height}px ({ratio}, {horizontal/vertical/square})
712- Visual Analysis: {AI analysis result, excluding size info, describe in detail with minimum words, at least 50 characters}
713- Use Case: {recommended usage scenario}
714- Search Keywords: {keywords used}
715
716
717
718- Index: 2
719- Size: {width}x{height}px ({ratio}, {horizontal/vertical/square})
720- Visual Analysis: {AI analysis result, excluding size info, describe in detail with minimum words, at least 50 characters}
721- Use Case: {recommended usage scenario}
722- Search Keywords: {keywords used}
723
724### Background Images
725
726
727
728- Index: 3
729 [Each image follows same format, use standard Markdown image syntax with sequential numbering...]
730
731### Product/Content Display Images
732
733
734
735- Index: N
736 [Continue with same format, ensure index increments sequentially...]
737
738### Icon/Decorative Images
739
740
741
742- Index: N+1
743 [Continue with same format, ensure index increments sequentially...]
744```
745
746**Important Notes**:
747
7481. Use standard Markdown image format: ``
7492. filename serves as image alt text and also as filename when downloading
7503. filename must include file extension, e.g., .jpg, .png, .webp, etc.
7514. filename should prioritize user's preferred language, be concise and clear, e.g., "trump-assassination-attempt.jpg", "chatgpt-viral-phenomenon.png", "tesla-q4-earnings.jpg"
752
753#### todo_list Format Requirements
754
755The `todo_list` parameter should contain complete slide-todo.md file content for recording slide content planning and task breakdown.
756
757Recommended format:
758
759```markdown
760# Slide Production Task Planning
761
762## Project Information
763
764- Project Name: ChatGPT Development Report
765- Theme: ChatGPT Evolution and Impact Analysis
766- Pages: 10
767- Key Keywords: ChatGPT, OpenAI, GPT-4, Artificial Intelligence
768
769## Content Outline
770
771### Cover (OpenAI Milestones.html)
772
773Introduce OpenAI's important development nodes and breakthrough achievements
774
775### Table of Contents (AI Revolution Timeline.html)
776
777Display key time points and milestone events in artificial intelligence development
778
779### GPT Series Evolution (GPT-4 Technological Breakthrough.html)
780
781Detail GPT-4's technical innovations and performance improvements compared to previous generations
782
783### Commercialization Process (ChatGPT Business Miracle.html)
784
785Analyze how ChatGPT reached billion-level user scale in short time
786...
787```
788
789#### magic.project.js Format Description (slide type)
790
791magic.project.js is a JSONP format project configuration file that defines slide project structure and page list.
792
793**File Structure**:
794
795```javascript
796window.magicProjectConfig = {
797 version: "1.0.0",
798 type: "slide",
799 name: "Project Name",
800 slides: ["cover.html", "contents.html", "content-page.html"],
801};
802window.magicProjectConfigure(window.magicProjectConfig);
803```
804
805**Field Descriptions**:
806
807- **version**: Configuration file version number, fixed as "1.0.0"
808- **type**: Project type, fixed as "slide" (slide type)
809- **name**: Project name, usually folder name
810- **slides**: Slide page path array, relative to project root, defines page order
811
812**slides Array Characteristics**:
813
814- Array elements are strings, each string is a relative path to an HTML file
815- Array order is the slide playback order
816- Can be empty array `[]` (empty project), add page paths later via edit_file
817- Frontend loads and navigates slide pages based on this array
818
819**Modification Examples**:
820Use edit_file tool to modify slides array content:
821
822- Add page: Append new file path to end of array
823- Remove page: Remove specified path from array
824- Adjust order: Rearrange array element order
825
826Note: Ensure valid JSONP syntax after modification (valid JavaScript code)
827
828---
829
830## image_search Keyword Strategy
831
832### Basic Principles
833
834When using image_search tool, query keywords must be diversified, try 2-3 different keyword combinations for each requirement.
835
836### Keyword Language Selection Principles
837
838Judge language based on search intent and information source, try multilingual combinations:
839
840- Search foreign websites/international reports → Use English or original language
841- Search local websites → Use local language
842- Uncertain about source → Mix multiple languages for comprehensive results
843- Same topic can use different languages to get different perspectives
844
845### Search Strategy Framework
846
8471. **Core word**: Most direct topic word
8482. **Qualifier**: Core word + attribute/function/scenario
8493. **Combination**: Multiple related elements combined
8504. **Variant**: Synonym/abbreviation/colloquialism/multilingual variant
851
852### Search Examples
853
854**Search iPhone official images**:
855
856- "iPhone", "iPhone 17 Pro Max", "iPhone official"
857
858**Search Chinese netizens' comments about Musk (screenshots)**:
859
860- "Musk Weibo", "Musk comments Chinese", "Musk social media China"
861
862**Search international news images about Musk**:
863
864- "Elon Musk", "Musk Tesla", "Musk 2025"
865
866**Search WeChat function interface**:
867
868- "WeChat app", "WeChat interface", "WeChat Pay"
869
870**Search international reports about WeChat**:
871
872- "WeChat", "WeChat China", "WeChat report"
873
874**Search Tesla Shanghai factory (mixed)**:
875
876- "Tesla Shanghai", "Tesla Shanghai Gigafactory", "Tesla China factory"
877
878### Wrong Examples (Avoid)
879
880- Use "collaboration software" → Too generic, should use "Figma", "Figma collaboration" etc.
881- Use "database tool" → No subject, should use "Notion database", "Airtable" etc.
882- **Prohibit generic searches**: No using only generic industry terms (software/platform/tool), pure function terms (payment/chat), pure adjectives (modern/advanced)
883
884### Keyword Diversification Principles
885
886- From core to specific: Subject name → Subject+attribute → Subject+scenario+time
887- Try different expressions: Choose language based on source/abbreviation/full name/multilingual variants
888- Combine different elements: Subject/action/time/location
889- At least 2-3 different angles per requirement
890
891---
892
893## Create Specific Slide Workflow
894
895If user requests creating specific slides or requests imitating/referencing to generate slides, reference partial workflow of complete creation workflow to flexibly complete user's creation needs.
896
897### Best Practices
898
899#### 1. Use create_slide_project to Create Project
900
901- **When user has no image requirements**: slide_images_content can be empty
902- **When user already provided images**: No need to use image_search tool to search images, instead use visual_understanding tool to analyze image info, write image info into slide_images_content per format requirements
903- **When user already provided outline or specific text**: No need to use web_search tool to search webpages, directly extract todo_list content
904
905#### 2. Directly Use create_slide to Create Slides
906
907- Create slides based on user-provided information
908- Insist on using create_slide tool, use analysis_js to analyze layout
909- Don't use file writing tools
910
911#### 3. Special Handling for Imitate/Reference Scenarios
912
913- **Remember to copy original images**: Copy original images to new project's images folder, ensure complete slide project architecture
914- Use shell_exec(command="cp src_path dst_path") command to copy images
915
916---
917
918## Complete Creation Workflow
919
920If user has no special requirements, follow this workflow step by step to complete slide creation task:
921
922### 1. Internet Search
923
924- Understand task description and user needs
925- **Round 1 search (required)**: Generate 3 keyword sets for web_search tool, search relevant pages
926- **Round 2 search (optional)**: If search results differ from expectations (common in current events scenarios), generate 3+ keyword sets again, conduct second round search with web_search
927- Select high-value pages, eliminate duplicates and irrelevant pages. If user doesn't specify count, default to 5 high-value pages, use read_webpages_as_markdown to get high-value page content
928
929### 2. Image Search and Content Planning
930
931- **Batch image search**: Use image_search tool to batch search image materials, default minimum batch search 5+ requirements at once, all different, covering large, medium, small, horizontal, vertical various sizes or different scenarios for later use, set topic_id to project name (ensure deduplication)
932- **One-time batch search**: Speculate various types of image needs potentially needed later, initiate batch search in one go, common examples: search background large images, character portraits, product close-ups, icons in different sizes and scenarios
933- **Avoid duplicates**: Don't repeatedly use visual analysis on similar content images, ensure similar content images only used once
934- **Content planning**: Based on user needs and reference materials, analyze and plan slide content:
935 - Analyze user specific needs and background
936 - Extract core content points from reference files
937 - Determine slide page count (determine appropriate page count based on content)
938 - Identify target audience and usage scenarios
939 - Choose appropriate design style: Select most suitable style direction from design style list based on content theme
940- **Prepare content**: Prepare complete slide_images_content and todo_list content
941-
942
943…(truncated)