---
name: "marp_slide_decks"
description: "Author Marp slide decks from Markdown and run automated design checks: authoring flow (frontmatter, directives, layouts, themes), design-balance rules (density, typography, balance), dark/light theme validation, and export to HTML, PDF, or PPTX via marp-cli. Triggers on 'make slides', 'create a deck', 'build a presentation from markdown', 'marp deck', 'export slides to PDF or PPTX', or 'check my slide design'."
---

# Marp Slide Decks

## Purpose

Take a topic or an existing document and produce a finished Marp slide deck: authored Markdown, verified against design-balance and contrast rules, exported to the requested format. This skill covers the full loop, authoring plus automated design checks, not just pointers.

## Workflow

1. **Author:** Start from `assets/starter-deck.md`. Put deck-wide settings in YAML frontmatter, split slides on `---`, keep one idea per slide. Directives cheat sheet in `references/authoring.md`; design rules in `references/design-rules.md`.

2. **Preview while iterating:** Run the CLI in watch mode and open the served URL:
   `npx @marp-team/marp-cli@latest -w deck.md` (add `--html` if the deck uses raw HTML layouts).

3. **Design check:** Run the bundled checker against every draft, with the theme:
   `python3 bin/design-check.py deck.md --theme theme.css`
   Fix every `FAIL` before shipping. `WARN`s get a human judgment call. `--strict` tightens density caps for keynotes and investor decks.

4. **Export:** Pick the target and render:
   - HTML (present from browser, presenter view, transitions): `marp deck.md --html -o deck.html`
   - PDF (handouts, sharing): `marp deck.md --pdf -o deck.pdf`
   - PPTX (handoff to a PowerPoint user; note: marp PPTX exports are flat images, not editable text)
   PDF/PPTX/image exports need a local browser (Chrome, Edge, or Firefox); pass `--browser-path` if the CLI cannot find one. Decks referencing local images need `--allow-local-files`.

5. **Verify the export:** Open the rendered output and confirm slides count, theme, backgrounds, and code blocks look right. Never hand off an export you have not opened.

## Output Contract

- The deck source: one self-contained Markdown file with `marp: true` frontmatter.
- A clean `design-check.py` run (zero FAILs) at handoff; note any accepted WARNs.
- The exported artifact in the requested format(s), verified opened.
- The theme CSS file alongside the deck when a custom theme is used.

## Operating Rules

- Never invent marp-cli flags. Verified set: `--html`, `--pdf`, `--pptx`, `--png`, `--jpeg`, `--theme`, `--theme-set`, `--input-dir`, `--allow-local-files`, `--browser-path`, `-w`, `-s`, `-o`, `-c`. Check `marp --help` before claiming anything else.
- Facts about Marp behavior come from the sources in `scratch/marp-slide-decks-sources.md` or a fresh web search, never from memory alone.
- One main idea per slide, max 6 bullets, code blocks under 12 lines, every image gets alt text. If a slide needs more, split the slide.
- Contrast is a hard gate: body text 4.5:1 minimum, large text 3:1 minimum (WCAG AA). Check both the light and dark palettes whenever a deck supports both.
- Prefer built-in themes (`default`, `gaia`, `uncover`) unless the deck needs brand styling. Custom themes go in plain CSS with a `/* @theme name */` comment.
