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, configure slide transitions, or manage slide projects. CRITICAL - When user message contains [@slide_project:...] mention, you MUST load this skill first before any operations.
77%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Low
Low-risk findings worth noting
Fix and improve this skill with Tessl
tessl review fix ./backend/super-magic/agents/skills/creating-slides/SKILL.mdProvides complete HTML slide creation capabilities, including project creation, content design, technical specifications, workflows, and best practices.
All Python code examples in this skill must be executed via the run_sdk_snippet tool in Agent environment.
create_slide_project and create_slide are Code Mode only. Call them with
sdk.tool.call, never as directly mounted tools. Before executing, read
slide tool contracts for overwrite behavior, notes,
page registration, and the difference between a saved file and successful layout QA.
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.
When user has no explicit requirements, follow these defaults:
When the user requests click-controlled reveals, read in-page-builds.md. Builds are optional and never required: the default is no builds. Only when several substantial content blocks on a page are best presented one at a time may you consider adding them yourself, or offer them to the user, following the "Proactive use" section there (which also covers remembering the user's habit). Use only its declarative element attributes; keep HTML static and preserve the existing slide creation/editing workflow. Proactive builds must follow its "Proactive use" rules: original element animations take priority, attributes must be exactly as documented, and the user is told what was added. Never promise native PowerPoint animations.
When the user requests page transitions, read slide-transitions.md
and the current magic.project.js, then call update_slide_transitions through
sdk.tool.call inside run_sdk_snippet (Code Mode only). Collect default and page settings
in one operations batch and save once. An unknown outcome requires rereading before further
writes to that configuration. Keep slide HTML static.
Do not add transitions without a request. Preserve existing settings, including explicit none,
during content editing, template replacement, and regeneration. These settings apply to the
online player; do not promise native PowerPoint transitions or standalone index.html playback.
<script src="slide-bridge.js"></script> at bottom of page for inter-page communicationEvery generated slide must contain one inert speaker-notes block outside the visual slide DOM:
<template data-magic-slide-notes data-format="plain-text" data-version="1">
Speaker notes for this page.
</template>Generate concise, presentation-ready notes from the page purpose, visible content, audience, and narrative flow. Keep the block outside the rendered canvas. When editing an existing slide, preserve the block and update it whenever the page's message changes. Do not place speaker notes in visible slide elements or remove an existing block unless the user explicitly asks to clear it.
<a> element with a path relative to the current slide HTML file's directory. For example, when the current page is slides/slide-1.html, use <a href="slide-2.html">查看第二页</a>; use ../ when crossing directories.magic.project.js's slides array. Do not use page numbers, display titles, hash conventions, custom routes, or absolute local paths.postMessage, iframe manipulation, or navigation code for same-deck links; the PPT runtime handles ordinary links specially.<script> tag)<body> bottom, CSS inline in <head>, SVG graphics inline directlyFont 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)
[Subject keyword] [Specific scene description]Default style: Minimalist business style
Style selection: Based on content theme and target audience, derive from minimalist business style, imitate popular PPT design styles including but not limited to:
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.
[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.
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.
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.
Multi-axis alignment:
Visual requirements:
When scenarios involve data analysis, write Python scripts for analysis:
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>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.
For the planned project example, first prepare production_plan as the complete
Markdown described in Production plan format.
Its three page entries must match cover.html, product-intro.html, and key-features.html.
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 a project skeleton with images and a complete design plan
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": production_plan
})
print(result.content)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"
})from sdk.tool import tool
result = tool.call('image_search', {
"search_group_name": "product-report-images",
"requirements": [
{
"name": "Product Interface",
"query": "Example App product interface screenshot",
"visual_understanding_prompt": "Confirm the image shows the product interface and recognizable features.",
"requirement_explanation": "Use a product interface screenshot to illustrate the main features.",
"expected_aspect_ratio": "16:9",
"count": 5
},
{
"name": "Technology Background",
"query": "AI technology abstract background",
"visual_understanding_prompt": "Assess whether the content is suitable as a technology-themed background.",
"requirement_explanation": "Use an abstract technology image as a slide background.",
"expected_aspect_ratio": "16:9",
"count": 3
}
]
})
print(result.content)from sdk.tool import tool
# Search web pages
search_result = tool.call('web_search', {
"search_group_name": "industry-report",
"requirements": [
{
"name": "Industry Overview",
"query": "enterprise AI software industry report",
"limit": 10,
"language": "en-US",
"region": "US"
},
{
"name": "Recent Developments",
"query": "enterprise AI software product updates",
"limit": 10,
"language": "en-US",
"region": "US",
"time_period": "month"
}
]
})
print(search_result.content)
# Read high-value webpages (refer to separate documentation for this tool)
# read_result = tool.call('read_webpages_as_markdown', {...})| Parameter | Required | Type | Description |
|---|---|---|---|
project_path | Yes | string | Project relative path (folder name), e.g., "ChatGPT-Development-Report" |
slide_count | No | number | Requested page count, default 0; does not create page HTML |
slides_array | No | array | Ordered slide filenames; defaults to 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:
index.html (presentation controller)magic.project.js (project config)slide-bridge.js (inter-page communication script)images/ folderslide_images_content is provided, automatically download images to images/ folder| 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 |
speaker_notes | No | string | Omit to preserve existing notes or create an empty block; "" clears notes; text replaces them |
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 | New slide position: "" for first page, filename to insert after; ignored for existing slides |
Tool Functions:
analysis_js for quality checkinsert_after_slide; preserve existing slide order on content updatesanalysis_js Instructions:
function() declaration)maxWidth, maxHeightreturn for resultinsert_after_slide Instructions:
"" for first page, filename to insert after| Parameter | Required | Type | Description |
|---|---|---|---|
search_group_name | Yes | string | Short name you create for related searches. Reuse the exact name within a group and choose a new name for a separate group. Images are deduplicated within each group; do not use the platform conversation ID. |
requirements | Yes | array | Non-empty list of search requirement objects; each item runs one search |
Each requirements item 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:
| Parameter | Required | Type | Description |
|---|---|---|---|
search_group_name | Yes | string | Short name you create for related searches. Reuse the exact name within a group and choose a new name for a separate group. This labels results without deduplication; do not use the platform conversation ID. |
requirements | Yes | array | Non-empty list of search requirement objects; each item runs one search |
Each requirements item 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/yearSlide 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:
create_slide_project tool auto-generates index.html and magic.project.js files, no need to read these filesmagic.project.js stores project config, including slides array defining slide page path listslide-bridge.js is inter-slide communication script, auto-generated by create_slide_project tool, no need to readPrimary Tools (use when creating slides):
web_search - Internet content retrievalread_webpages_as_markdown - Read high-value webpage contentcreate_slide_project - Create slide projectcreate_slide - Create individual slide pageimage_search - Batch search image materialsProhibited Tools (don't use when creating slides):
shell_exec with mkdir - create_slide_project auto-createsExceptions:
Creating Pages: Always use create_slide
create_slide = file writing + quality check + auto-registrationEditing Pages:
create_slide to recreateProject Initialization: Use create_slide_project
mkdir directoriesmagic.project.js and slide-bridge.jscreate_slide_project completes all initialization in one goCore Concept: Folder containing magic.project.js = Frontend recognizes as Magic Project
magic.project.js Operation Constraints:
Frontend Rendering Differentiation:
User Operations:
Project Types: type options include audio, slide, etc. Entire folder called "super deliverable".
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:
Pass the complete slide-todo.md Markdown, with project information, an overall
design scheme, and a content plan and design specification for every page.
An outline alone is insufficient. Record the palette, typography, shared layout,
decorations, and reusable styling; for each page specify its content, layout,
media and asset readiness, static emphasis, text limits, and visual hierarchy.
When using a template, derive colors and decorations from its actual theme.css
and ensure text and accent colors contrast with the selected backgrounds.
Read Production plan format
for the complete example before preparing this parameter. Adapt it to the user's
language, selected theme, content, and actual page count.
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:
slides Array Characteristics:
[] (empty project), add page paths later via edit_fileModification Examples: Use edit_file tool to modify slides array content:
Note: Ensure valid JSONP syntax after modification (valid JavaScript code)
When using image_search tool, query keywords must be diversified, try 2-3 different keyword combinations for each requirement.
Judge language based on search intent and information source, try multilingual combinations:
Search iPhone official images:
Search Chinese netizens' comments about Musk (screenshots):
Search international news images about Musk:
Search WeChat function interface:
Search international reports about WeChat:
Search Tesla Shanghai factory (mixed):
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.
If user has no special requirements, follow this workflow step by step to complete slide creation task:
Call create_slide_project, it will help you complete the following in one go:
Page-by-page creation workflow:
for each slide:
Step 1: Image selection and usage
Step 2: Page creation
If user requests editing slides, reference the following workflow:
0. Locate target file (when user specifies by page number/index)
1. Workflow reference
2. Edit method selection
3. Tool usage principles
If user requests modifying slide file names or paths, reference the following workflow:
Users have terminology to describe actions for specified pages:
Example: Refactor slide.html
If user doesn't specify page, ask for clarification, proceed after user confirmation.
dtyq/magic
0f1432c
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.