Use this skill when the user asks you to create a presentation, slides, or a Reveal.js slidedeck. You will generate a self-contained HTML file using the Reveal.js CDN.
Instructions
1. Gather the presentation content (title, sections, slides, speaker notes) from the user. Use the notify_user tool to request clarifications if the content isn't fully provided.
Read the standard Reveal.js template from templates/template.html located in this skill's folder.
Replace the placeholder content within the <div class="slides"> container with the actual slide contents.
- Use <section> for individual horizontal slides.
- Use nested <section> elements for vertical slides.
- You can also use markdown inside <section data-markdown> if you prefer or if the content is largely text-based.
4. Save the final output as an HTML file in the user's desired location (or in the current folder if not specified).
Let the user know the file has been created and that they can open it directly in their browser.
Guidelines
- Content Constraint (CRITICAL): Strictly constrain the content of each <section> so that the text and elements do not exceed the screen size (the default Reveal.js display area). If the provided content for a single slide is too long, you MUST split it into multiple separate slides (e.g., use sequential <section> elements) rather than cramming it all into one slide.
Advanced Features: You must make use of the advanced features natively supported by Reveal.js to create engaging slides:
- Markdown: Use <section data-markdown><textarea data-template>...markdown content...</textarea></section>.
- Backgrounds: Use data-background-color="color", data-background-image="url", or data-background-video="url" on the <section>.
- Media & External Content: Use standard HTML <img>, <video>, <audio> or iframe for interactive media.
- Code: Use <pre><code data-trim data-noescape class="language-js">...</code></pre> for syntax highlighting.
- Math: MathJax3 is configured. Use $e^{i\pi} + 1 = 0$ for inline math and \[...\] for block equations.
- Fragments: Add class="fragment", class="fragment fade-up", class="fragment highlight-red", etc., to step through elements incrementally.
- Links: Standard <a href="..."> anchor tags.
- Layout Helper Classes: Maximize visual appeal by using native layout helper features:
- class="r-stack": Wrap multiple images/elements inside an <div class="r-stack"> to center them on top of each other (usually paired with class="fragment").
- class="r-fit-text": Add to headings (e.g., <h2 class="r-fit-text">) to make them perfectly fill the slide width.
- class="r-stretch": Add to an image or video to make it automatically scale to fill the remaining vertical space on the slide.
- class="r-frame": Add to an image or container to give it a neat bordered frame.
- Always use the Reveal.js CSS and JS from the CDN provided in the template (e.g., https://cdnjs.cloudflare.com/ajax/libs/reveal.js/5.0.4/).
Do not download Reveal.js or use npm for this skill unless explicitly asked; stick to the CDN for a standalone HTML file.
The default plugins (Markdown, Highlight, Notes) are enabled in the template. Use them if applicable (e.g., <aside class="notes"> for speaker notes).
Ensure the resulting HTML is fully functional, properly properly indented, and enclosed in standard HTML5 boilerplate.
Reveal.js 幻灯片创建器
目标
当用户要求您创建演示文稿、幻灯片或 Reveal.js 幻灯片集时使用此技能。您将使用 Reveal.js CDN 生成一个自包含的 HTML 文件。
- Added detailed usage instructions for creating Reveal.js slide decks via CDN with a single HTML file output.
- Enforced strict content constraints to prevent slide overflow; slides must be split if content exceeds the display area.
- Listed advanced Reveal.js features to use, including markdown, backgrounds, media, code highlighting, math, fragments, and hyperlinks.
- Included guidance on utilizing native Reveal.js layout helper classes for improved slide design.
- Clarified that all assets must be loaded via CDN and slides must use the provided HTML template for consistency.
- Outlined workflow: gather content, generate slides, save HTML file, and notify the user.