Frontend slides

From Zaoqu-Liu/ScienceClaw · View interactive version

Frontend slides is an AI agent skill from the GitHub repository Zaoqu-Liu/ScienceClaw. Create HTML-based presentations that run in a browser. Use ONLY when the user explicitly asks for an HTML presentation or web-based slides. For PowerPoint (.pptx) generation, use the pptx-generation skill instead.

How to use this skill

Skill file

Frontend Slides

Create zero-dependency, animation-rich HTML presentations that run entirely in the browser.

Inspired by the visual exploration approach showcased in work by zarazhangrui (credit: @zarazhangrui).

When to Activate

Non-Negotiables

  1. Zero dependencies: default to one self-contained HTML file with inline CSS and JS.
  2. Viewport fit is mandatory: every slide must fit inside one viewport with no internal scrolling.
  3. Show, don't tell: use visual previews instead of abstract style questionnaires.
  4. Distinctive design: avoid generic purple-gradient, Inter-on-white, template-looking decks.
  5. Production quality: keep code commented, accessible, responsive, and performant.

Apply viewport-safe CSS defaults: height: 100vh; 100dvh; overflow: hidden on every slide, clamp() for responsive typography, and CSS custom properties for theme values.

Workflow

1. Detect Mode

Choose one path:

2. Discover Content

Ask only the minimum needed:

If the user has content, ask them to paste it before styling.

3. Discover Style

Default to visual exploration.

If the user already knows the desired preset, skip previews and use it directly.

Otherwise:

  1. Ask what feeling the deck should create: impressed, energized, focused, inspired.
  2. Generate 3 single-slide preview files in .ecc-design/slide-previews/.
  3. Each preview must be self-contained, show typography/color/motion clearly, and stay under roughly 100 lines of slide content.
  4. Ask the user which preview to keep or what elements to mix.

Map mood to style using the preset categories below (minimal/editorial, bold/dark, soft/light, technical/monospace).

4. Build the Presentation

Output either:

Use an assets/ folder only when the deck contains extracted or user-supplied images.

Required structure:

5. Enforce Viewport Fit

Treat this as a hard gate.

Rules:

Apply the density limits from the Content Density Limits table below.

6. Validate

Check the finished deck at these sizes:

If browser automation is available, use it to verify no slide overflows and that keyboard navigation works.

7. Deliver

At handoff:

Use the correct opener for the current OS:

PPT / PPTX Conversion

For PowerPoint conversion:

  1. Prefer python3 with python-pptx to extract text, images, and notes.
  2. If python-pptx is unavailable, ask whether to install it or fall back to a manual/export-based workflow.
  3. Preserve slide order, speaker notes, and extracted assets.
  4. After extraction, run the same style-selection workflow as a new presentation.

Keep conversion cross-platform. Do not rely on macOS-only tools when Python can do the job.

Implementation Requirements

HTML / CSS

JavaScript

Include:

Accessibility

Content Density Limits

Use these maxima unless the user explicitly asks for denser slides and readability still holds:

| Slide type | Limit |

|------------|-------|

| Title | 1 heading + 1 subtitle + optional tagline |

| Content | 1 heading + 4-6 bullets or 2 short paragraphs |

| Feature grid | 6 cards max |

| Code | 8-10 lines max |

| Quote | 1 quote + attribution |

| Image | 1 image constrained by viewport |

Anti-Patterns

Related ECC Skills

Deliverable Checklist

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.