slides
Transform markdown to beautiful Apple-like presentation slides using Marp. Use this skill when the user says "create slides", "make presentation", "markdown to slides", "generate deck", or "create powerpoint".
What this skill does
# Slides - Markdown to Beautiful Presentations
Transform markdown content into stunning, Apple Keynote-inspired presentation slides using Marp with AI-enhanced content generation.
## Quick Start
```bash
# Install Marp CLI globally
bun add -g @marp-team/marp-cli
# Or install locally in project
bun add @marp-team/marp-cli
```
## What Gets Created
| Skill File | Target Project Path | Description |
|------------|---------------------|-------------|
| `lib/slides.ts` | `src/lib/slides.ts` | Core slides generation library |
| `lib/slides-theme.css` | `src/lib/slides-theme.css` | Apple-inspired Marp theme |
| (embedded) | `src/lib/ai/tools/slides-tool.ts` | AI tool for slide generation |
| (embedded) | `src/app/api/slides/route.ts` | API endpoint for slides |
## Apple-Inspired Theme
The theme features:
- **Typography**: SF Pro-inspired clean sans-serif fonts
- **Colors**: Neutral grays with vibrant accent colors
- **Spacing**: Generous whitespace, elegant margins
- **Layout**: Centered content, minimal visual noise
- **Animations**: Subtle fade transitions
## Installation
```bash
bun add @marp-team/marp-cli puppeteer-core ai zod
```
## Environment Variables
```env
# Optional: Custom Chromium path for PDF/PPTX export
PUPPETEER_EXECUTABLE_PATH=/path/to/chromium
```
## Theme CSS
Create `src/lib/slides-theme.css`:
```css
/* Apple-Inspired Marp Theme */
/* @theme apple */
@import 'default';
:root {
/* Apple-like color palette */
--color-background: #ffffff;
--color-foreground: #1d1d1f;
--color-muted: #86868b;
--color-accent: #0071e3;
--color-accent-light: #147ce5;
/* Typography */
--font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
--font-mono: 'SF Mono', ui-monospace, SFMono-Regular, 'Cascadia Code', Menlo, monospace;
/* Sizing */
--slide-width: 1920px;
--slide-height: 1080px;
}
section {
font-family: var(--font-family);
font-size: 40px;
font-weight: 400;
color: var(--color-foreground);
background: var(--color-background);
padding: 80px 120px;
display: flex;
flex-direction: column;
justify-content: center;
}
/* Title Slides */
section.title {
text-align: center;
justify-content: center;
align-items: center;
}
section.title h1 {
font-size: 96px;
font-weight: 700;
letter-spacing: -0.02em;
line-height: 1.1;
margin-bottom: 24px;
background: linear-gradient(135deg, #1d1d1f 0%, #424245 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
section.title h2 {
font-size: 48px;
font-weight: 400;
color: var(--color-muted);
margin: 0;
}
/* Content Slides */
h1 {
font-size: 72px;
font-weight: 700;
letter-spacing: -0.02em;
line-height: 1.15;
margin: 0 0 40px 0;
color: var(--color-foreground);
}
h2 {
font-size: 56px;
font-weight: 600;
letter-spacing: -0.01em;
margin: 0 0 32px 0;
color: var(--color-foreground);
}
h3 {
font-size: 44px;
font-weight: 600;
margin: 0 0 24px 0;
color: var(--color-muted);
}
p {
font-size: 36px;
line-height: 1.6;
margin: 0 0 24px 0;
color: var(--color-foreground);
}
/* Lists */
ul, ol {
margin: 0;
padding-left: 48px;
}
li {
font-size: 36px;
line-height: 1.6;
margin-bottom: 16px;
color: var(--color-foreground);
}
li::marker {
color: var(--color-accent);
}
/* Code */
code {
font-family: var(--font-mono);
font-size: 32px;
background: #f5f5f7;
border-radius: 8px;
padding: 4px 12px;
}
pre {
background: #1d1d1f;
border-radius: 16px;
padding: 32px 40px;
overflow: hidden;
}
pre code {
background: transparent;
color: #f5f5f7;
font-size: 28px;
line-height: 1.5;
padding: 0;
}
/* Blockquotes */
blockquote {
border-left: 6px solid var(--color-accent);
padding-left: 32px;
margin: 32px 0;
font-style: italic;
color: var(--color-muted);
}
/* Images */
img {
max-width: 100%;
border-radius: 16px;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}
/* Links */
a {
color: var(--color-accent);
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
/* Dark Mode */
section.dark {
background: #1d1d1f;
color: #f5f5f7;
}
section.dark h1,
section.dark h2,
section.dark p,
section.dark li {
color: #f5f5f7;
}
section.dark h3 {
color: #a1a1a6;
}
section.dark code {
background: #2d2d30;
color: #f5f5f7;
}
/* Gradient Backgrounds */
section.gradient-blue {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
}
section.gradient-blue h1,
section.gradient-blue h2,
section.gradient-blue p,
section.gradient-blue li {
color: white;
}
section.gradient-orange {
background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
color: white;
}
section.gradient-green {
background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
color: #1d1d1f;
}
/* Two Column Layout */
section.split {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 80px;
align-items: center;
}
/* Center Layout */
section.center {
text-align: center;
align-items: center;
}
/* Page Numbers */
section::after {
content: attr(data-marpit-pagination) ' / ' attr(data-marpit-pagination-total);
position: absolute;
bottom: 40px;
right: 60px;
font-size: 24px;
color: var(--color-muted);
}
/* Hide pagination on title slides */
section.title::after {
display: none;
}
/* Transitions */
@keyframes fadeIn {
from { opacity: 0; transform: translateY(20px); }
to { opacity: 1; transform: translateY(0); }
}
section > * {
animation: fadeIn 0.6s ease-out forwards;
}
```
## Slides Library
Create `src/lib/slides.ts`:
```typescript
import { spawn } from "child_process";
import { writeFile, readFile, unlink, mkdir } from "fs/promises";
import { join } from "path";
import { tmpdir } from "os";
import { randomUUID } from "crypto";
type SlideTheme = "apple" | "default" | "gaia" | "uncover";
type ExportFormat = "html" | "pdf" | "pptx" | "png" | "jpeg";
type SlidesConfig = {
theme?: SlideTheme;
format?: ExportFormat;
width?: number;
height?: number;
allowLocalFiles?: boolean;
};
type SlidesResult = {
success: boolean;
filePath?: string;
buffer?: Buffer;
error?: string;
};
const APPLE_THEME_PATH = join(process.cwd(), "src/lib/slides-theme.css");
/**
* Convert markdown to slides using Marp CLI
*/
export async function convertMarkdownToSlides(
markdown: string,
config: SlidesConfig = {}
): Promise<SlidesResult> {
const {
theme = "apple",
format = "html",
width = 1920,
height = 1080,
allowLocalFiles = false,
} = config;
const tempDir = join(tmpdir(), "marp-slides");
const sessionId = randomUUID();
const inputPath = join(tempDir, `${sessionId}.md`);
const outputPath = join(tempDir, `${sessionId}.${format}`);
try {
// Ensure temp directory exists
await mkdir(tempDir, { recursive: true });
// Prepare markdown with frontmatter
const frontmatter = [
"---",
"marp: true",
theme === "apple" ? `theme: apple` : `theme: ${theme}`,
"paginate: true",
`size: ${width}x${height}`,
"---",
"",
].join("\n");
const fullMarkdown = frontmatter + markdown;
await writeFile(inputPath, fullMarkdown, "utf-8");
// Build Marp CLI arguments
const args: string[] = [inputPath, "-o", outputPath];
// Add theme CSS if using custom Apple theme
if (theme === "apple") {
args.push("--theme", APPLE_THEME_PATH);
}
// Format-specific options
if (format === "pptx" || format === "pdf") {
args.push("--allow-local-files");
}
if (format === "png" || format === "jpeg") {
args.push("--images", format);
}
if (allowLocalFiles) {
args.push("--allow-local-files");
}
// Execute Marp CLI
await new Promise<void>((resolve, reject) => {
const marp = spawn("npx", ["@marp-team/marp-cli", ...args], {
cwd: process.cwd(),
shell: true,
});
Related in Writing & Docs
jax-development
IncludedUse this skill when the user is writing, debugging, profiling, refactoring, reviewing, benchmarking, parallelising, exporting, or explaining JAX code, or when they mention JAX, jax.numpy, jit, grad, value_and_grad, vmap, scan, lax, random keys, pytrees, jax.Array, sharding, Mesh, PartitionSpec, NamedSharding, pmap, shard_map, Pallas, XLA, StableHLO, checkify, profiler, or the JAX repo. It helps turn NumPy or PyTorch-style code into pure functional JAX, fix tracer/control-flow/shape/PRNG bugs, remove recompiles and host-device syncs, choose transforms and sharding strategies, inspect jaxpr/lowering/IR, and benchmark compiled code correctly.
nature-article-writer
IncludedDrafts, rewrites, diagnostically critiques, and style-calibrates primary research manuscripts for Nature and Nature Portfolio journals. Use when the user wants a Nature-style title, summary paragraph or abstract, introduction, results, discussion, methods, figure legends, presubmission enquiry, cover letter, reviewer response, or when a scientific draft sounds generic, jargon-heavy, structurally weak, or AI-ish and needs precise, broad-reader-friendly prose without inventing data, analyses, or references. Best for primary research articles and letters rather than reviews or press releases unless explicitly adapting one.
deckrd
IncludedDocument-driven framework that derives requirements, specifications, implementation plans, and executable tasks from goals through structured AI dialogue. Use when user says "write requirements", "create spec", "plan implementation", "derive tasks", "structure this feature", "break down into tasks", or "document this module". Also use for reverse engineering existing code into docs (/deckrd rev). Do NOT use for direct code writing — use /deckrd-coder after tasks are generated. Do NOT use when the user only wants to run or fix existing code without planning.
clinical-decision-support
IncludedGenerate professional clinical decision support (CDS) documents for pharmaceutical and clinical research settings, including patient cohort analyses (biomarker-stratified with outcomes) and treatment recommendation reports (evidence-based guidelines with decision algorithms). Supports GRADE evidence grading, statistical analysis (hazard ratios, survival curves, waterfall plots), biomarker integration, and regulatory compliance. Outputs publication-ready LaTeX/PDF format optimized for drug development, clinical research, and evidence synthesis.
handling-sf-data
IncludedSalesforce data operations with 130-point scoring. Use this skill to create, update, delete, bulk import/export, generate test data, and clean up org records using sf CLI and anonymous Apex. TRIGGER when: user creates test data, performs bulk import/export, uses sf data CLI commands, needs data factory patterns for Apex tests, or needs to seed/clean records in a Salesforce org. DO NOT TRIGGER when: SOQL query writing only (use querying-soql), Apex test execution (use running-apex-tests), or metadata deployment (use deploying-metadata).
accelint-ac-to-playwright
IncludedConvert and validate acceptance criteria for Playwright test automation. Use when user asks to (1) review/evaluate/check if AC are ready for automation, (2) assess if AC can be converted as-is, (3) validate AC quality for Playwright, (4) turn AC into tests, (5) generate tests from acceptance criteria, (6) convert .md bullets or .feature Gherkin files to Playwright specs, (7) create test automation from requirements. Handles both bullet-style markdown and Gherkin syntax with JSON test plan generation and validation.