MARP Slides Skill
Author slide decks as plain Markdown using the MARP ecosystem (Marpit + Marp Core + marp-cli) and export to PDF, PowerPoint, or self-contained HTML. Decks are single .md files, git-friendly, and themable with plain CSS.
When This Skill Triggers
- User asks for a MARP deck by name
- User wants "markdown slides" or "slides from markdown"
- User wants a
.md file they can commit to git and regenerate deterministically
- User mentions
marp-cli, Marpit directives, or asks to theme slides with CSS
- User wants CLI-exportable PDF or PPTX sourced from a text document
When NOT to Use This Skill
| User wants |
Use instead |
| Reveal.js / browser-native HTML presentation with scroll nav |
html-presentation |
Edit a binary .pptx with native PowerPoint features (animations, transitions set in PowerPoint) |
document-skills:pptx |
| Static poster or single-page visual |
concept-to-image |
| Animated Manim explainer video |
animate |
Step 0: Gather Requirements
Before generating anything, confirm in a single message. Use defaults silently for anything the user declines to specify — never ask twice.
| Parameter |
Options |
Default |
| Export target |
pdf, pptx, html, all |
pdf |
| Theme |
dark-dashboard, light-editorial, or MARP built-in (default, gaia, uncover) |
dark-dashboard |
| Aspect ratio |
16:9, 4:3 |
16:9 |
| Slide count |
integer or auto |
auto |
| Visual density |
minimal (text-first), standard (mixed), dashboard (charts + metric cards) |
standard |
| Branding |
logo path, accent color hex |
none |
Step 1: Load References On-Demand
Do NOT read all reference files up front. Based on user intent, load only what is needed. This keeps the skill within armory's token-efficiency budget.
| User intent |
Load |
| Any deck (always required) |
references/DIRECTIVES.md — Marpit directives, frontmatter schema, image syntax |
| Custom theme or CSS styling |
references/THEMES.md — dark-dashboard and light-editorial starter CSS |
| Charts, dashboards, metric cards, SVG visuals |
references/COMPONENTS.md — SVG chart recipes, cards, status tags, icons |
| Export to PDF/PPTX/HTML or image |
references/EXPORT.md — marp-cli flags, Chrome dependency, --html flag |
| User wants a concrete example to match |
references/examples/ — 3 curated decks: dashboard.md, editorial.md, technical.md |
Step 2: Compose the Deck
- Start with frontmatter. Every deck begins with a YAML front-matter block setting
theme, paginate, header, footer, and optionally global style. See DIRECTIVES.md for the full schema.
- Split slides with
---. A horizontal rule on its own line creates a new slide. Frontmatter must come before the first slide break.
- First slide = title. Use
<!-- _class: lead --> to center the title slide, and <!-- _paginate: skip --> to hide it from the page count.
- Middle slides = content. Prefer one idea per slide. If density is
dashboard, use metric cards and SVG charts from COMPONENTS.md. If density is minimal, use large headings and whitespace.
- Last slide = summary/CTA. Mirror the lead class on the closing slide for visual symmetry.
- Background images use extended syntax:
, , . Multiple ![bg] tags on one slide arrange horizontally; add vertical for a column layout.
Step 3: Verify Before Handoff
- Frontmatter block present and valid YAML
theme: matches a known name (built-in or custom in the file's global style: block)
- Every slide break is
--- on its own line with blank lines around it
- Relative image paths only (MARP's
--allow-local-files requires this for PDF export)
- If using raw HTML (SVG, custom divs), confirm the export command uses
--html
- Run the export command once locally to confirm no directive warnings
Step 4: Export
See references/EXPORT.md for the full command reference. Minimal invocation:
npx @marp-team/marp-cli@latest slides.md --pdf --allow-local-files --html
This skill wraps the MIT-licensed MARP ecosystem. See root ATTRIBUTIONS.md for upstream credits.
Design Rules
- One idea per slide. MARP clips overflow silently — there is no warning for content that runs off the bottom.
- Paginate: skip on title and divider slides. paginate: hold on appendix slides.
- Relative paths only for images. Absolute paths break in VS Code preview and PDF export.
--html is required for any SVG, <div>, <details>, or inline styling. Without it, MARP escapes HTML tags to text.
- Cap lists at 6 rows on content slides. Use
details collapsibles or a second slide for more.
- Headings carry meaning:
h1 for slide title, h2 for subtitle, h3 for uppercase section labels. Consistent hierarchy = consistent visual rhythm.
- Never hardcode theme CSS into every slide. Define it once in the global
<!-- style: | --> directive or a separate .css file loaded via theme:.
1---2name: marp-slides3description: 'Author MARP markdown slide decks exportable to PDF, PPTX, and HTML via marp-cli. Covers Marpit directives, custom CSS themes, SVG chart recipes, and dashboard components. Triggers on: "marp", "marp deck", "markdown slides", "slides from markdown", "marp-cli", "pdf from markdown", "pptx from markdown".'4metadata:5 source: https://skillmd.com/skills/mathews-tom/marp-slides6 version: 1.0.17 category: visualization8 tags: [slides, presentation, marp, markdown, pdf, pptx]9 difficulty: intermediate10---1112# MARP Slides Skill1314Author slide decks as plain Markdown using the MARP ecosystem (Marpit + Marp Core + marp-cli) and export to PDF, PowerPoint, or self-contained HTML. Decks are single `.md` files, git-friendly, and themable with plain CSS.1516## When This Skill Triggers1718- User asks for a **MARP** deck by name19- User wants "markdown slides" or "slides from markdown"20- User wants a `.md` file they can commit to git and regenerate deterministically21- User mentions `marp-cli`, Marpit directives, or asks to theme slides with CSS22- User wants CLI-exportable PDF or PPTX sourced from a text document2324## When NOT to Use This Skill2526| User wants | Use instead |27|---|---|28| Reveal.js / browser-native HTML presentation with scroll nav | `html-presentation` |29| Edit a binary `.pptx` with native PowerPoint features (animations, transitions set in PowerPoint) | `document-skills:pptx` |30| Static poster or single-page visual | `concept-to-image` |31| Animated Manim explainer video | `animate` |3233## Step 0: Gather Requirements3435Before generating anything, confirm in a single message. Use defaults silently for anything the user declines to specify — never ask twice.3637| Parameter | Options | Default |38|---|---|---|39| **Export target** | `pdf`, `pptx`, `html`, `all` | `pdf` |40| **Theme** | `dark-dashboard`, `light-editorial`, or MARP built-in (`default`, `gaia`, `uncover`) | `dark-dashboard` |41| **Aspect ratio** | `16:9`, `4:3` | `16:9` |42| **Slide count** | integer or `auto` | `auto` |43| **Visual density** | `minimal` (text-first), `standard` (mixed), `dashboard` (charts + metric cards) | `standard` |44| **Branding** | logo path, accent color hex | none |4546## Step 1: Load References On-Demand4748**Do NOT read all reference files up front.** Based on user intent, load only what is needed. This keeps the skill within armory's token-efficiency budget.4950| User intent | Load |51|---|---|52| Any deck (always required) | `references/DIRECTIVES.md` — Marpit directives, frontmatter schema, image syntax |53| Custom theme or CSS styling | `references/THEMES.md` — `dark-dashboard` and `light-editorial` starter CSS |54| Charts, dashboards, metric cards, SVG visuals | `references/COMPONENTS.md` — SVG chart recipes, cards, status tags, icons |55| Export to PDF/PPTX/HTML or image | `references/EXPORT.md` — marp-cli flags, Chrome dependency, `--html` flag |56| User wants a concrete example to match | `references/examples/` — 3 curated decks: `dashboard.md`, `editorial.md`, `technical.md` |5758## Step 2: Compose the Deck59601. **Start with frontmatter.** Every deck begins with a YAML front-matter block setting `theme`, `paginate`, `header`, `footer`, and optionally global `style`. See `DIRECTIVES.md` for the full schema.612. **Split slides with `---`.** A horizontal rule on its own line creates a new slide. Frontmatter must come before the first slide break.623. **First slide = title.** Use `<!-- _class: lead -->` to center the title slide, and `<!-- _paginate: skip -->` to hide it from the page count.634. **Middle slides = content.** Prefer one idea per slide. If density is `dashboard`, use metric cards and SVG charts from `COMPONENTS.md`. If density is `minimal`, use large headings and whitespace.645. **Last slide = summary/CTA.** Mirror the lead class on the closing slide for visual symmetry.656. **Background images use extended syntax:** ``, ``, ``. Multiple `![bg]` tags on one slide arrange horizontally; add `vertical` for a column layout.6667## Step 3: Verify Before Handoff6869- Frontmatter block present and valid YAML70- `theme:` matches a known name (built-in or custom in the file's global `style:` block)71- Every slide break is `---` on its own line with blank lines around it72- Relative image paths only (MARP's `--allow-local-files` requires this for PDF export)73- If using raw HTML (SVG, custom divs), confirm the export command uses `--html`74- Run the export command once locally to confirm no directive warnings7576## Step 4: Export7778See `references/EXPORT.md` for the full command reference. Minimal invocation:7980```bash81npx @marp-team/marp-cli@latest slides.md --pdf --allow-local-files --html82```8384This skill wraps the MIT-licensed [MARP ecosystem](https://marp.app). See root [`ATTRIBUTIONS.md`](../../ATTRIBUTIONS.md) for upstream credits.8586## Design Rules87881. **One idea per slide.** MARP clips overflow silently — there is no warning for content that runs off the bottom.892. **Paginate: skip** on title and divider slides. **paginate: hold** on appendix slides.903. **Relative paths only** for images. Absolute paths break in VS Code preview and PDF export.914. **`--html` is required** for any SVG, `<div>`, `<details>`, or inline styling. Without it, MARP escapes HTML tags to text.925. **Cap lists at 6 rows** on content slides. Use `details` collapsibles or a second slide for more.936. **Headings carry meaning:** `h1` for slide title, `h2` for subtitle, `h3` for uppercase section labels. Consistent hierarchy = consistent visual rhythm.947. **Never hardcode theme CSS into every slide.** Define it once in the global `<!-- style: | -->` directive or a separate `.css` file loaded via `theme:`.