gamma-core-workflow-b

0
0
Source

Implement core Gamma workflow for presentation editing and export. Use when modifying existing presentations, exporting to various formats, or managing presentation assets. Trigger with phrases like "gamma edit presentation", "gamma export", "gamma PDF", "gamma update slides", "gamma modify".

Install

mkdir -p .claude/skills/gamma-core-workflow-b && curl -L -o skill.zip "https://mcp.directory/api/skills/download/4809" && unzip -o skill.zip -d .claude/skills/gamma-core-workflow-b && rm skill.zip

Installs to .claude/skills/gamma-core-workflow-b

About this skill

Gamma Core Workflow B: Templates & Export

Overview

Use Gamma's template-based generation (POST /v1.0/generations/from-template) and export retrieval (GET /v1.0/generations/{id}/files) endpoints. Template generation lets you replicate a single-page gamma template across multiple variations. Export retrieval gives you downloadable PDF, PPTX, and PNG files.

Prerequisites

  • Completed gamma-core-workflow-a
  • A template gamma with exactly one page (created in the Gamma app)
  • Understanding of the generate-poll-retrieve pattern

Key Concepts

  • Template gamma: A regular gamma with exactly one page, used as a repeatable template
  • gammaId: Found in the gamma URL or copied from the app
  • Export URLs: Temporary download links returned after generation — download promptly as they expire

Instructions

Step 1: Create from Template

import { createGammaClient, pollUntilDone } from "./lib/gamma";

const gamma = createGammaClient({ apiKey: process.env.GAMMA_API_KEY! });

// POST /v1.0/generations/from-template
// The template gamma MUST have exactly one page
async function generateFromTemplate(
  templateGammaId: string,
  prompt: string,
  options: {
    themeId?: string;
    exportAs?: "pdf" | "pptx" | "png";
    imageStyle?: string;
  } = {}
) {
  const { generationId } = await gamma.generateFromTemplate({
    gammaId: templateGammaId,
    prompt,
    themeId: options.themeId,
    exportAs: options.exportAs,
    imageOptions: options.imageStyle
      ? { style: options.imageStyle }
      : undefined,
  });

  return pollUntilDone(gamma, generationId);
}

// Usage: generate a sales proposal from a template
const result = await generateFromTemplate(
  "gamma_template_abc123",   // Your one-page template ID
  "Create a sales proposal for Acme Corp. Highlight our cloud migration services, 99.9% uptime SLA, and 24/7 support.",
  { exportAs: "pdf", imageStyle: "corporate professional" }
);

console.log(`View: ${result.gammaUrl}`);
console.log(`Download: ${result.exportUrl}`);

Step 2: Batch Template Generation

// Generate multiple variations from the same template
const clients = [
  { name: "Acme Corp", focus: "cloud migration" },
  { name: "TechStart Inc", focus: "AI implementation" },
  { name: "GlobalBank", focus: "security compliance" },
];

import pLimit from "p-limit";
const limit = pLimit(2); // Respect rate limits

const proposals = await Promise.allSettled(
  clients.map((client) =>
    limit(() =>
      generateFromTemplate(
        "gamma_template_abc123",
        `Proposal for ${client.name} focusing on ${client.focus}. Include pricing tier for enterprise. Reference their industry.`,
        { exportAs: "pptx" }
      )
    )
  )
);

proposals.forEach((r, i) => {
  const status = r.status === "fulfilled" ? r.value.gammaUrl : `FAILED: ${r.reason}`;
  console.log(`${clients[i].name}: ${status}`);
});

Step 3: Export Format Selection

// Export is specified at generation time via `exportAs`
// You cannot export an already-generated gamma via the API
// Instead, generate with the desired export format

// PDF export — best for sharing externally
const pdfResult = await gamma.generate({
  content: "Annual report for 2025",
  outputFormat: "document",
  exportAs: "pdf",
});

// PPTX export — for editing in PowerPoint/Google Slides
// Note: PPTX exports may have layout shifts and font differences
const pptxResult = await gamma.generate({
  content: "Team kickoff presentation",
  outputFormat: "presentation",
  exportAs: "pptx",
});

// PNG export — for thumbnails or social sharing
const pngResult = await gamma.generate({
  content: "Product announcement graphic",
  outputFormat: "social_post",
  exportAs: "png",
});

Step 4: Retrieve Export Files

// After generation completes, exportUrl is in the poll response
// Download files promptly — URLs expire after a period

import { writeFile } from "node:fs/promises";

async function downloadExport(generationId: string, outputPath: string) {
  // Poll until complete
  const result = await pollUntilDone(gamma, generationId);

  if (!result.exportUrl) {
    throw new Error("No export URL — did you specify exportAs?");
  }

  // Download the file
  const response = await fetch(result.exportUrl);
  if (!response.ok) throw new Error(`Download failed: ${response.status}`);

  const buffer = Buffer.from(await response.arrayBuffer());
  await writeFile(outputPath, buffer);
  console.log(`Saved to ${outputPath} (${buffer.length} bytes)`);
}

// Usage
const { generationId } = await gamma.generate({
  content: "Sales deck for Q1 review",
  outputFormat: "presentation",
  exportAs: "pdf",
});

await downloadExport(generationId, "./output/q1-review.pdf");

Step 5: Sharing Configuration

// Configure who can access the generated gamma
const { generationId } = await gamma.generate({
  content: "Internal strategy document",
  outputFormat: "document",
  sharingOptions: {
    // Workspace members
    workspaceAccess: "comment",  // noAccess | view | comment | edit | fullAccess

    // External (non-workspace) visitors
    externalAccess: "noAccess",  // Lock down for internal docs

    // Share with specific people via email
    emailOptions: {
      emails: ["partner@example.com"],
      accessLevel: "view",
    },
  },
});

Step 6: curl Reference

# Generate from template
curl -X POST "https://public-api.gamma.app/v1.0/generations/from-template" \
  -H "X-API-KEY: ${GAMMA_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "gammaId": "your_template_gamma_id",
    "prompt": "Create a proposal for Acme Corp focusing on cloud services",
    "exportAs": "pdf",
    "themeId": "theme_abc123",
    "imageOptions": { "style": "photorealistic" },
    "sharingOptions": {
      "workspaceAccess": "edit",
      "externalAccess": "view"
    }
  }'

# Poll for result
curl "https://public-api.gamma.app/v1.0/generations/${GEN_ID}" \
  -H "X-API-KEY: ${GAMMA_API_KEY}" | jq '{status, gammaUrl, exportUrl, creditsUsed}'

Export Format Comparison

FormatBest ForFidelityEditable?
PDFSharing, printingHighNo
PPTXEditing in PowerPoint/SlidesMedium (layout shifts possible)Yes
PNGThumbnails, social mediaHigh (single image)No

Error Handling

ErrorCauseSolution
"Template must have exactly one page"Multi-page templateEdit template to single page
Empty exportUrlexportAs not specifiedAdd exportAs to generation request
Download URL expiredToo slow to downloadDownload immediately after completion
422 on template generationInvalid gammaIdVerify template ID from Gamma app URL

Resources

Next Steps

Proceed to gamma-common-errors for troubleshooting API issues.

svg-icon-generator

jeremylongshore

Svg Icon Generator - Auto-activating skill for Visual Content. Triggers on: svg icon generator, svg icon generator Part of the Visual Content skill category.

6814

d2-diagram-creator

jeremylongshore

D2 Diagram Creator - Auto-activating skill for Visual Content. Triggers on: d2 diagram creator, d2 diagram creator Part of the Visual Content skill category.

2412

performing-penetration-testing

jeremylongshore

This skill enables automated penetration testing of web applications. It uses the penetration-tester plugin to identify vulnerabilities, including OWASP Top 10 threats, and suggests exploitation techniques. Use this skill when the user requests a "penetration test", "pentest", "vulnerability assessment", or asks to "exploit" a web application. It provides comprehensive reporting on identified security flaws.

379

designing-database-schemas

jeremylongshore

Design and visualize efficient database schemas, normalize data, map relationships, and generate ERD diagrams and SQL statements.

978

performing-security-audits

jeremylongshore

This skill allows Claude to conduct comprehensive security audits of code, infrastructure, and configurations. It leverages various tools within the security-pro-pack plugin, including vulnerability scanning, compliance checking, cryptography review, and infrastructure security analysis. Use this skill when a user requests a "security audit," "vulnerability assessment," "compliance review," or any task involving identifying and mitigating security risks. It helps to ensure code and systems adhere to security best practices and compliance standards.

86

django-view-generator

jeremylongshore

Generate django view generator operations. Auto-activating skill for Backend Development. Triggers on: django view generator, django view generator Part of the Backend Development skill category. Use when working with django view generator functionality. Trigger with phrases like "django view generator", "django generator", "django".

15

You might also like

flutter-development

aj-geddes

Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.

643969

drawio-diagrams-enhanced

jgtolentino

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

591705

ui-ux-pro-max

nextlevelbuilder

"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."

318398

godot

bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

339397

nano-banana-pro

garg-aayush

Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.

451339

fastapi-templates

wshobson

Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.

304231

Stay ahead of the MCP ecosystem

Get weekly updates on new skills and servers.