Gamma Export Skill
Purpose
Export MARP presentations to Gamma.app for enhanced visual design and sharing. This skill transforms MARP markdown into Gamma-compatible format and pushes it via the Gamma Generate API.
Prerequisites
- •Gamma Pro account (or higher) with API access
- •API key generated at https://gamma.app/settings → API key tab
- •Environment variable
GAMMA_API_KEYset in.envfile
Workflow
MARP Markdown → Transform → Gamma API → Poll for completion → Return Gamma URL
What the transformation does:
- •Strips MARP front matter (
---\nmarp: true\n...---) - •Preserves
---slide separators (Gamma uses\n---\nfor card breaks) - •Converts speaker notes
<!-- ... -->into inline instructions for Gamma - •Cleans up MARP-specific directives (
<!-- _class: lead -->, etc.) - •Outputs clean text ready for Gamma's
inputTextparameter
Commands
/export-gamma
Export current MARP presentation to Gamma.
Usage:
/export-gamma [options]
Options:
- •
--theme <themeId>– Gamma theme ID (default: workspace default) - •
--style <style>– Image style description (default: "professional, minimal") - •
--format <format>– Output format: presentation, document, webpage (default: presentation) - •
--dimensions <dim>– Slide dimensions: fluid, 16x9, 4x3 (default: 16x9) - •
--images <source>– Image source: ai, unsplash, pictographic, none (default: ai) - •
--export <type>– Also export as: pdf, pptx (optional) - •
--dry-run– Show transformed content without sending to Gamma
Examples:
/export-gamma /export-gamma --style "watercolor, soft, warm tones" --dimensions 16x9 /export-gamma --images none --export pptx /export-gamma --dry-run
/gamma-themes
List available Gamma themes from your workspace.
/gamma-preview
Show how the current MARP file will be transformed for Gamma (without sending).
Configuration
Environment Setup
Create .env file in repo root:
GAMMA_API_KEY=sk-gamma-xxxxxxxx
Default Settings
In gamma.config.json (optional):
{
"defaultTheme": "Oasis",
"defaultImageStyle": "professional, minimal, clean",
"defaultImageModel": "imagen-4-pro",
"defaultDimensions": "16x9",
"defaultFormat": "presentation",
"speakerNotesHandling": "include",
"pollingIntervalMs": 2000,
"maxPollingAttempts": 60
}
Image Tuning Guide
Image Source Options
| Source | Use When |
|---|---|
aiGenerated | Want unique, context-aware images |
pictographic | Want clean, icon-style graphics |
unsplash | Want professional stock photos |
webFreeToUseCommercially | Need commercial-safe web images |
noImages | Adding your own images later |
Image Style Examples
Professional/Corporate:
"professional, minimal, blue tones, clean backgrounds" "corporate, modern, geometric shapes, muted colors"
Creative/Artistic:
"watercolor, soft edges, warm palette, artistic" "flat illustration, vibrant colors, playful"
Technical/Educational:
"technical diagram style, clean lines, informative" "infographic style, data visualization, clear"
Photography-like:
"photorealistic, high quality, dramatic lighting" "natural photography, candid, authentic feel"
For David's presentation style:
"professional yet warm, human-centered, approachable, subtle blue-green tones"
Image Model Options
- •
imagen-4-pro– Google's latest, good general quality - •
flux-1-pro– Strong at artistic styles - •(Check Gamma docs for current model list)
Transformation Rules
MARP Front Matter
Before:
--- marp: true theme: default paginate: true header: 'My Talk' footer: 'David Cobb | 2026' ---
After: Stripped entirely (Gamma has its own theming)
Slide Separators
Before (MARP):
# Slide 1 Content here --- # Slide 2 More content
After (Gamma inputText):
# Slide 1 Content here --- # Slide 2 More content
Preserved as-is. Gamma uses \n---\n for card breaks when cardSplit: "inputTextBreaks".
Speaker Notes
Before:
# My Point - Bullet one - Bullet two <!-- This is the full story I'll tell verbally. Include the example about cost spikes. Mention the 14x increase. -->
After:
# My Point - Bullet one - Bullet two [Speaker context: This is the full story I'll tell verbally. Include the example about cost spikes. Mention the 14x increase.]
Converted to inline text with [Speaker context: ...] wrapper so Gamma can incorporate the depth.
MARP Directives
Before:
<!-- _class: lead --> <!-- _paginate: false --> <!-- _backgroundColor: #123 --> # Section Title
After:
# Section Title
Directives stripped (Gamma handles styling differently).
Fit Directive
Before:
# <!-- fit --> Big Title
After:
# Big Title
<!-- fit --> removed; Gamma auto-sizes.
API Reference
Generate Endpoint
POST https://public-api.gamma.app/v1.0/generations
Headers:
Content-Type: application/json X-API-KEY: sk-gamma-xxxxxxxx
Request Body (for preserved text with speaker notes):
{
"inputText": "Transformed markdown content...",
"textMode": "preserve",
"format": "presentation",
"cardSplit": "inputTextBreaks",
"additionalInstructions": "Speaker context sections marked with [Speaker context: ...] contain additional depth and stories. Use this context to enrich the visual design and ensure the slides support rather than duplicate this content. Keep slide text minimal; the speaker context is for understanding, not display.",
"imageOptions": {
"source": "aiGenerated",
"model": "imagen-4-pro",
"style": "professional, minimal, approachable"
},
"cardOptions": {
"dimensions": "16x9"
},
"textOptions": {
"language": "en"
}
}
Response:
{
"generationId": "abc123xyz"
}
Poll for Completion
GET https://public-api.gamma.app/v1.0/generations/{generationId}
Response (pending):
{
"status": "pending",
"generationId": "abc123xyz"
}
Response (completed):
{
"status": "completed",
"generationId": "abc123xyz",
"gammaUrl": "https://gamma.app/docs/abc123xyz",
"credits": {"deducted": 150, "remaining": 2850}
}
Error Handling
| Error | Cause | Fix |
|---|---|---|
| 401 Unauthorized | Invalid API key | Check GAMMA_API_KEY in .env |
| 403 Forbidden | No credits | Top up at gamma.app/settings/billing |
| 422 Failed | Generation failed | Check input parameters |
| 429 Too Many Requests | Rate limited | Wait and retry |
Script Location
The export script is at: scripts/export-to-gamma.js
Run directly:
node scripts/export-to-gamma.js slides/my-presentation.marp.md
Or via npm script (if configured in package.json):
npm run gamma slides/my-presentation.marp.md
Typical Workflow
- •Create/edit MARP presentation in
/slides/ - •Preview locally with
npx @marp-team/marp-cli -p slides/my-talk.marp.md - •When ready, run
/export-gammaornode scripts/export-to-gamma.js slides/my-talk.marp.md - •Get Gamma URL in terminal output
- •Fine-tune in Gamma's web editor if needed
- •Present from Gamma or export PDF/PPTX
Limitations
- •Gamma may reformat text slightly even in
preservemode - •Complex MARP layouts (columns, background images) don't translate 1:1
- •Speaker notes become context hints, not hidden notes in Gamma
- •API has credit costs (check your balance)
Future Enhancements
- • MCP server integration for direct Claude Code commands
- • Template support (Gamma's Create from Template API)
- • Batch export for multiple presentations
- • Theme preview/selection tool
- • Image URL injection from local assets