AgentSkillsCN

Gamma Presentations Skill

利用Gamma API生成专业的演示文稿、文档与网站。

SKILL.md
--- frontmatter
name: "Gamma Presentations Skill"
description: "Generate professional presentations, documents, and websites using the Gamma API."
applyTo: "**/*presentation*,**/*slides*,**/*deck*,**/*gamma*,**/*pitch*"

Gamma Presentations Skill

Generate professional presentations, documents, and websites using the Gamma API.

Gamma is an AI-powered platform with 50M+ users for creating presentations, documents, social posts, and websites. This skill enables Alex to generate polished content programmatically.

When to Use

  • User asks to create a presentation or slide deck
  • Need to generate a document or report
  • Creating social media content (carousels, stories)
  • Building simple webpages from content
  • Converting notes or outlines into polished presentations

Prerequisites

  • Gamma account (Pro, Ultra, Teams, or Business plan for API access)
  • API key from gamma.app/settings
  • Environment variable: GAMMA_API_KEY

Help & User Manual

How to Ask Alex to Create Gamma Content

Simply tell Alex what you want to create. Alex will write the actual content for you, then generate the presentation.

From a Topic (Alex writes all content)

text
"Create a 10-slide presentation about machine learning for executives"
"Make a pitch deck for my startup idea: [description]"
"Generate a social media carousel about productivity tips"

What Alex does:

  1. Creates a detailed markdown file with real slide content
  2. Sends it to Gamma API for professional formatting
  3. Returns the link and/or downloads the file
  4. Opens it automatically if requested

From Your Own Content File

text
"Create a presentation from README.md"
"Turn ROADMAP-UNIFIED.md into a 15-slide deck"
"Make a document from alex_docs/COGNITIVE-ARCHITECTURE.md"

From Reference Documents

text
"Create a presentation about appropriate reliance using all the documents in the article folder"
"Make a pitch deck from my business plan - use investor-deck.md and financials.md"

Alex will:

  1. Read and synthesize the referenced files
  2. Write presentation content based on that material
  3. Generate the formatted presentation

With Specific Options

text
"Create a presentation from my-notes.md with 12 slides, professional tone, for investors"
"Generate a webpage from PROJECT.md in Portuguese"
"Make an Instagram carousel (4x5) from tips.txt with vibrant AI images"

Command Quick Reference

What You SayWhat Happens
"Create a presentation about X"Alex writes content, then generates slides
"Create a presentation from FILE"Reads file, converts to slides
"Create presentation using [files]"Alex synthesizes files into slides
"Make a document from FILE"Creates paginated document
"Generate a social post from X"Creates carousel/story format
"Create a webpage from FILE"Generates simple website

Available Options

When asking Alex to create Gamma content, you can specify:

OptionValuesExample
Formatpresentation, document, social, webpage"as a document"
Slides/Cards1-75"with 12 slides"
Toneany description"professional and confident"
Audienceany description"for investors"
Language60+ languages"in Spanish"
Dimensions16x9, 4x3, 1x1, 4x5, 9x16, letter, a4"in 16x9 format"
ImagesAI, Unsplash, no images"with AI-generated images"
Exportpptx, pdf"export as PowerPoint"
Illustrations only"use only illustrations" (no photos)

Step-by-Step: Create from a Workspace File

  1. Tell Alex the file path:

    "Create a presentation from alex_docs/USER-MANUAL.md"

  2. Alex reads the file and sends content to Gamma API

  3. Alex polls for completion (usually 15-60 seconds)

  4. Alex returns the link: https://gamma.app/docs/xxxxx

  5. Open the link to view, edit, or download your presentation

Customization Examples

Basic:

"Create a presentation from README.md"

With slide count:

"Create a 15-slide presentation from README.md"

With audience:

"Create a presentation from README.md for new developers, friendly tone"

With export:

"Create a presentation from ROADMAP.md and export as PowerPoint"

Full customization:

"Create a 12-slide pitch deck from my-startup.md in 16x9 format, confident tone, for VCs, with modern AI images, export as PDF and PowerPoint"

What Alex Does Behind the Scenes

  1. Reads the specified file from your workspace
  2. Sends to Gamma API with your options:
    • textMode: "generate" (expands brief content) or "condense" (summarizes long content)
    • format, numCards, textOptions, imageOptions based on your request
  3. Polls generation status every 2-3 seconds
  4. Returns the Gamma URL when complete
  5. Downloads export (PPTX/PDF) if requested
  6. Auto-opens the file if --open flag is used
  7. Reports credits used and remaining balance

Pro Tips for Great Results

1. Structure Your Content with Slide Markers

Use clear headers in your markdown — they become natural slide breaks:

markdown
## Slide 1: Title
Main message here

## Slide 2: The Problem
- Pain point 1
- Pain point 2

## Slide 3: Our Solution
Description of solution

2. Use Illustrations for Professional Decks

Specify --image-style with "illustrations" for consistent, modern look:

bash
--image-model ideogram --image-style "modern clean illustrations, abstract concepts"

3. Match Tone to Audience

AudienceSuggested Tone
Executives"professional and concise"
Researchers"intellectual and evidence-based"
Developers"technical and practical"
Investors"confident and visionary"
General"friendly and accessible"

4. One Command, Open Result

Always use --open to immediately review your deck:

bash
node scripts/gamma-generator.js -f content.md -e pptx --open

5. Iterate with Cost-Effective Models

Use cheaper models while iterating, premium for final:

bash
# Drafts (2 credits/image)
--image-model flux-quick

# Final version (20 credits/image)
--image-model ideogram

Cost Awareness

Alex will inform you of credit usage after each generation:

ComplexityEstimated Credits
Simple 5-card deck~20-25 credits
Standard 10-card presentation~40-50 credits
20-card with premium images~200-400 credits
Full pitch deck with exports~100-200 credits

Check your balance: gamma.app/settings/billing


Quick Reference

API Base URL

code
https://public-api.gamma.app

Authentication

bash
--header 'X-API-KEY: <your-api-key>'
--header 'Content-Type: application/json'

Core Endpoints

EndpointMethodDescription
/v0.2/generationsPOSTGenerate new gamma from text
/v0.2/generations/{id}GETCheck status, get URLs
/v0.2/themesGETList available themes

Generate API Parameters

Required Parameters

ParameterTypeDescription
inputTextstringContent to generate from (max 100k tokens / ~400k chars)
textModeenumgenerate (expand), condense (summarize), preserve (keep exact)

Format Options

ParameterDefaultValues
formatpresentationpresentation, document, social, webpage
numCards101-60 (Pro) or 1-75 (Ultra)
cardSplitautoauto, inputTextBreaks (use \n---\n)

Text Options

json
"textOptions": {
  "amount": "medium",      // brief, medium, detailed, extensive
  "tone": "professional",  // free text, 1-500 chars
  "audience": "executives", // free text, 1-500 chars
  "language": "en"         // 60+ languages
}

Image Options

json
"imageOptions": {
  "source": "aiGenerated",  // see source options below
  "model": "flux-1-pro",    // see model list below
  "style": "modern, minimal" // free text, 1-500 chars
}

Image Sources:

  • aiGenerated - AI-generated images (use with model + style)
  • pictographic - Pictographic library
  • unsplash - Unsplash photos
  • giphy - Animated GIFs
  • webAllImages - Web images (any license)
  • webFreeToUse - Personal use licensed
  • webFreeToUseCommercially - Commercial use licensed
  • placeholder - Empty placeholders
  • noImages - No images (use if providing URLs in inputText)

Card Dimensions

FormatOptions
Presentationfluid, 16x9, 4x3
Documentfluid, pageless, letter, a4
Social1x1, 4x5 (Instagram/LinkedIn), 9x16 (Stories)

Export Options

json
"exportAs": "pptx"  // or "pdf"

AI Image Models

Cost-Effective (2 credits/image)

ModelAPI Value
Flux Fast 1.1flux-1-quick
Flux Kontext Fastflux-kontext-fast
Imagen 3 Fastimagen-3-flash
Luma Photon Flashluma-photon-flash-1

Standard (8-15 credits/image)

ModelAPI ValueCredits
Flux Proflux-1-pro8
Imagen 3imagen-3-pro8
Ideogram 3 Turboideogram-v3-turbo10
Leonardo Phoenixleonardo-phoenix15

Premium (20-33 credits/image)

ModelAPI ValueCredits
Ideogram 3ideogram-v320
Imagen 4imagen-4-pro20
Gemini 2.5 Flashgemini-2.5-flash-image20
Recraftrecraft-v320
GPT Imagegpt-image-1-medium30
DALL-E 3dall-e-333

Ultra (30-120 credits/image, Ultra plan only)

ModelAPI ValueCredits
Flux Ultraflux-1-ultra30
Imagen 4 Ultraimagen-4-ultra30
Recraft Vectorrecraft-v3-svg40
GPT Image Detailedgpt-image-1-high120

Credit Costs

FactorCredits
Per card3-4
Basic AI image~2
Standard AI image~8-15
Premium AI image~20-40
Ultra AI image~40-120

Estimates:

  • 10-card deck + 5 basic images = ~40-50 credits
  • 20-card doc + 15 premium images = ~360-680 credits

Example Requests

Simple Presentation

bash
curl -X POST https://public-api.gamma.app/v1.0/generations \
  -H 'Content-Type: application/json' \
  -H 'X-API-KEY: sk-gamma-xxx' \
  -d '{
    "inputText": "Introduction to machine learning for business leaders",
    "textMode": "generate",
    "format": "presentation",
    "numCards": 8
  }'

Professional Pitch Deck

bash
curl -X POST https://public-api.gamma.app/v1.0/generations \
  -H 'Content-Type: application/json' \
  -H 'X-API-KEY: sk-gamma-xxx' \
  -d '{
    "inputText": "Our startup solves remote team collaboration with AI-powered async video messaging. Founded 2024, 10k users, $500k ARR, seeking $2M seed round.",
    "textMode": "generate",
    "format": "presentation",
    "numCards": 12,
    "textOptions": {
      "amount": "medium",
      "tone": "confident, professional, visionary",
      "audience": "venture capital investors"
    },
    "imageOptions": {
      "source": "aiGenerated",
      "model": "flux-1-pro",
      "style": "modern tech, clean, professional photography"
    },
    "cardOptions": {
      "dimensions": "16x9"
    },
    "exportAs": "pptx"
  }'

Document from Notes

bash
curl -X POST https://public-api.gamma.app/v1.0/generations \
  -H 'Content-Type: application/json' \
  -H 'X-API-KEY: sk-gamma-xxx' \
  -d '{
    "inputText": "Meeting notes from Q4 planning...\n---\nBudget discussion...\n---\nAction items...",
    "textMode": "preserve",
    "format": "document",
    "cardSplit": "inputTextBreaks",
    "textOptions": {
      "language": "en"
    },
    "imageOptions": {
      "source": "noImages"
    }
  }'

Social Media Carousel

bash
curl -X POST https://public-api.gamma.app/v1.0/generations \
  -H 'Content-Type: application/json' \
  -H 'X-API-KEY: sk-gamma-xxx' \
  -d '{
    "inputText": "5 productivity tips for developers: 1. Time blocking 2. Pomodoro technique 3. Code reviews in batches 4. Automate repetitive tasks 5. Take real breaks",
    "textMode": "generate",
    "format": "social",
    "numCards": 6,
    "cardOptions": {
      "dimensions": "4x5"
    },
    "imageOptions": {
      "source": "aiGenerated",
      "model": "ideogram-v3-turbo",
      "style": "vibrant, modern, tech aesthetic"
    }
  }'

Response Handling

POST Response

json
{
  "generationId": "gen_abc123",
  "status": "pending"
}

GET Status Response (Pending)

json
{
  "generationId": "gen_abc123",
  "status": "pending"
}

GET Status Response (Completed)

json
{
  "generationId": "gen_abc123",
  "status": "completed",
  "gammaUrl": "https://gamma.app/docs/xyz",
  "pptxUrl": "https://...",  // if exportAs: "pptx"
  "pdfUrl": "https://...",   // if exportAs: "pdf"
  "creditsUsed": 45
}

Polling Pattern

javascript
async function waitForGeneration(generationId, apiKey) {
  const maxAttempts = 30;
  const delayMs = 2000;

  for (let i = 0; i < maxAttempts; i++) {
    const response = await fetch(
      `https://public-api.gamma.app/v1.0/generations/${generationId}`,
      { headers: { 'X-API-KEY': apiKey } }
    );
    const data = await response.json();

    if (data.status === 'completed') return data;
    if (data.status === 'failed') throw new Error(data.error);

    await new Promise(r => setTimeout(r, delayMs));
  }
  throw new Error('Generation timeout');
}

MCP Integration

Gamma provides a hosted MCP server for AI tool integration.

Setup in Claude

  1. Open Claude Desktop or Web
  2. Settings → Connectors
  3. Search "Gamma" → Connect
  4. Authorize Gamma account access

MCP Tools Available

ToolCapability
generate_contentCreate presentations, docs, webpages, social
browse_themesSearch theme library
organize_foldersSave to workspace folders

Effective MCP Prompts

Good:

"Create a 10-slide marketing strategy presentation covering target audience, campaign channels, budget breakdown, and success metrics. Use a professional blue theme and modern photography style."

Better:

"Create a pitch deck for investors about our AI startup. 12 slides, 16:9 format, professional tone. Include: problem, solution, market size, business model, traction, team, financials, ask. Export as PowerPoint."


Troubleshooting

Insufficient Credits

Problem: Error "insufficient credits"

Solution:

  • Check balance at gamma.app/settings/billing
  • Purchase credits or upgrade plan
  • Enable auto-recharge

Authentication Failed

Problem: 401 Unauthorized

Solution:

  • Verify API key is correct
  • Check plan supports API (Pro+)
  • Regenerate key if compromised

Generation Timeout

Problem: Status stays "pending" too long

Solution:

  • Complex generations take longer (large numCards, premium images)
  • Increase polling timeout to 2-3 minutes
  • Simplify request (fewer cards, basic images)

Token Limit Exceeded

Problem: Input too large

Solution:

  • inputText max: 100k tokens (~400k chars)
  • Split into multiple generations
  • Use textMode: "condense" for long content

Best Practices

  1. Start simple - Use defaults, then customize
  2. Match model to need - Basic images for drafts, premium for finals
  3. Use appropriate textMode:
    • generate: Brief input → expanded content
    • condense: Long input → summarized content
    • preserve: Keep exact text
  4. Control costs - Use flux-1-quick or imagen-3-flash for iteration
  5. Export wisely - Only request PPTX/PDF when needed (adds processing time)
  6. Organize content - Use folderIds for workspace organization

CLI Script

A standalone Node.js script is available for command-line generation:

Location: scripts/gamma-generator.js

Quick Examples

bash
# Simple topic
node scripts/gamma-generator.js --topic "Introduction to AI"

# From file with PowerPoint export
node scripts/gamma-generator.js --file README.md --export pptx

# Generate and immediately open in PowerPoint 🚀
node scripts/gamma-generator.js --file README.md --export pptx --open

# Full customization with auto-open
node scripts/gamma-generator.js \
  --file my-content.md \
  --slides 15 \
  --tone "professional and inspiring" \
  --audience "executives" \
  --image-model ideogram \
  --image-style "modern illustrations, clean" \
  --dimensions 16x9 \
  --export pptx \
  --output ./exports \
  --open

CLI Options

OptionShortDescription
--topic-tTopic or content to generate
--file-fPath to content file
--formatpresentation, document, social, webpage
--slides-nNumber of slides (1-75)
--toneTone description
--audienceTarget audience
--language-lLanguage code (en, es, pt...)
--image-modelAI model (flux-quick, dalle3...)
--image-styleImage style description
--dimensions-dCard dimensions
--export-eExport format (pptx, pdf)
--output-oOutput directory (default: ./exports)
--openAuto-open exported file after generation
--quiet-qSuppress progress messages
--timeoutGeneration timeout in seconds (default: 180)
--help-hShow help

Best UX: The --open Flag

The --open flag provides seamless workflow — generate and review in one command:

bash
# Create presentation and open immediately
node scripts/gamma-generator.js \
  --file content.md \
  --export pptx \
  --open

# Works on all platforms:
# - Windows: Opens in PowerPoint
# - macOS: Opens in Keynote/PowerPoint
# - Linux: Opens with default application

Two-Step Workflow: Draft → Edit → Generate

For full control over content, use the draft workflow:

Step 1: Generate a Draft Template

bash
# Create editable markdown template (no API call, no credits)
node scripts/gamma-generator.js \
  --topic "AI Ethics for Developers" \
  --slides 10 \
  --tone "thoughtful and practical" \
  --audience "software engineers" \
  --image-style "modern illustrations" \
  --draft \
  --open

This creates a markdown file with:

  • Slide structure placeholders
  • Your tone/audience settings preserved
  • Image style guidance
  • Opens immediately for editing

Step 2: Edit the Markdown

Fill in your actual content:

markdown
## Slide 1: Title
**AI Ethics: A Developer's Responsibility**

Building AI that serves humanity

*Illustration: Developer at computer with ethical symbols*

---

## Slide 2: Why This Matters
**The Code We Write Has Consequences**

- AI systems affect millions of lives
- Bias in training data becomes bias in decisions
- We are the last line of defense

*Illustration: Ripple effect from code to society*

Step 3: Generate from Your Edited File

bash
# Now generate the real presentation
node scripts/gamma-generator.js \
  --file ./exports/ai-ethics-for-developers-draft.md \
  --image-model ideogram \
  --export pptx \
  --open

Why use the draft workflow?

  • ✅ Full control over every slide's content
  • ✅ No wasted credits on iterations
  • ✅ Review structure before committing to generation
  • ✅ Reuse templates for similar presentations

CLI Options Summary

OptionShortDescription
--topic-tTopic or content to generate
--file-fPath to content file
--formatpresentation, document, social, webpage
--slides-nNumber of slides (1-75)
--toneTone description
--audienceTarget audience
--language-lLanguage code (en, es, pt...)
--image-modelAI model (flux-quick, dalle3...)
--image-styleImage style description
--dimensions-dCard dimensions
--export-eExport format (pptx, pdf)
--output-oOutput directory (default: ./exports)
--openAuto-open exported file after generation
--draftGenerate markdown template only (no API call)
--draft-outputCustom path for draft markdown file
--quiet-qSuppress progress messages
--timeoutGeneration timeout in seconds (default: 180)
--help-hShow help

Workflow tip: Create a markdown file with your content structure, then generate and review:

bash
# Quick workflow
node scripts/gamma-generator.js -t "My Topic" --draft --open  # Edit the draft
node scripts/gamma-generator.js -f exports/my-topic-draft.md -e pptx --open  # Generate

Run node scripts/gamma-generator.js --help for full documentation.


Related Skills