Reusable patterns for the Gamma REST API (no SDK exists). An agent skill from jeremylongshore/tons-of-skills-marketplace.

MITAuto-check passedBackend & APIs

Install Gamma SDK Patterns

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill gamma-sdk-patterns -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace gamma-sdk-patterns --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/gamma-sdk-patterns .claude/skills/gamma-sdk-patterns && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
gamma-sdk-patterns
GitHub stars
2.8k
Token cost
~2.2k tokens
SKILL.md length
223 words
Files
1
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Reusable patterns for the Gamma REST API (no SDK exists). An agent skill from jeremylongshore/tons-of-skills-marketplace.

  • Works in 6 steps: Typed Client Singleton → Custom Error Class → Poll-Until-Done Helper → …
  • Building typed wrappers
  • SKILL.md covers Output, Examples, Overview and Prerequisites, plus 5 more sections
  • Reaches public-api.gamma.app; needs GAMMA_API_KEY

What it does

Gamma SDK Patterns is an agent skill from jeremylongshore/tons-of-skills-marketplace. Reusable patterns for the Gamma REST API (no SDK exists). Use when building typed wrappers, generation helpers, template factories, or error handling for Gamma. Trigger: "gamma patterns", "gamma client wrapper", "gamma best practices", "gamma API helper", "gamma code structure".

Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts. Compatibility notes: Designed for Claude Code

It sits in Backend & APIs, covering REST APIs and Error handling. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • Building typed wrappers
  • Generation helpers
  • Template factories
  • Error handling for Gamma

Example prompts

  • “gamma patterns”
  • “gamma client wrapper”
  • “gamma best practices”
  • “/gamma-sdk-patterns”

Requirements

  • Node.js
  • A credential in GAMMA_API_KEY
  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Write, Edit

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Typed Client Singleton
  2. Custom Error Class
  3. Poll-Until-Done Helper
  4. Generate-and-Wait Convenience
  5. Template-Based Generation
  6. Retry with Backoff

What it can do on your machine

Read from SKILL.md and the folder at commit cfae287. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • public-api.gamma.app

    Also links to:

    • developers.gamma.app

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • GAMMA_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Designed for Claude Code

    From compatibility in the SKILL.md frontmatter.

Context cost

Gamma SDK Patterns loads about 2.2k tokens when it runs. Until then it costs about 75 tokens; SKILL.md has 223 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~75
When it runs · the whole SKILL.md, loaded when a task matches
~2.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit cfae287, republished under its MIT licence (© jeremylongshore). 223 words, ~2,219 tokens.

Download SKILL.mdSave it as .claude/skills/gamma-sdk-patterns/SKILL.md (or your agent's skills folder).
name
gamma-sdk-patterns
description
Reusable patterns for the Gamma REST API (no SDK exists). Use when building typed wrappers, generation helpers, template factories, or error handling for Gamma. Trigger: "gamma patterns", "gamma client wrapper", "gamma best practices", "gamma API helper", "gamma code structure".
allowed-tools
Read, Write, Edit
compatibility
Designed for Claude Code
version
1.13.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
saas, gamma, patterns, api

Gamma API Patterns

Output

Produce a client-validation receipt with contract/fixture version, opaque operation ID, schema result, idempotency outcome, owner, and redacted failure reference. Do not log presentation content or tokens.

Examples

Use a scoped staging integration and fictional document to validate field allowlists and duplicate suppression. Reject an unknown destination before the provider call and retain only aggregate results.

Overview

Gamma has no published SDK — all interaction is via REST at https://public-api.gamma.app/v1.0/. This skill provides production-grade patterns for typed clients, generation helpers, polling, template workflows, and error handling.

Prerequisites

  • Completed gamma-install-auth setup
  • TypeScript project with fetch (Node.js 18+)
  • Understanding of the generate-poll-retrieve workflow

Instructions

Step 1: Typed Client Singleton
typescript
// lib/gamma.ts
const GAMMA_BASE = "https://public-api.gamma.app/v1.0";

interface GammaConfig {
  apiKey: string;
  baseUrl?: string;
  timeoutMs?: number;
}

// Types based on actual API responses
interface GenerateRequest {
  content: string;
  outputFormat?: "presentation" | "document" | "webpage" | "social_post";
  themeId?: string;
  exportAs?: "pdf" | "pptx" | "png";
  textMode?: "generate" | "condense" | "preserve";
  textAmount?: "brief" | "medium" | "detailed" | "extensive";
  imageOptions?: { style?: string };
  sharingOptions?: {
    workspaceAccess?: "noAccess" | "view" | "comment" | "edit" | "fullAccess";
    externalAccess?: "noAccess" | "view" | "comment" | "edit" | "fullAccess";
  };
  folderIds?: string[];
}

interface GenerateResult {
  generationId: string;
  status: "in_progress" | "completed" | "failed";
  gammaUrl?: string;
  exportUrl?: string;
  creditsUsed?: number;
}

let instance: ReturnType<typeof createGammaClient> | null = null;

export function getGamma() {
  if (!instance) {
    instance = createGammaClient({
      apiKey: process.env.GAMMA_API_KEY!,
    });
  }
  return instance;
}

export function createGammaClient(config: GammaConfig) {
  const base = config.baseUrl ?? GAMMA_BASE;
  const headers: Record<string, string> = {
    "X-API-KEY": config.apiKey,
    "Content-Type": "application/json",
  };

  async function request<T>(method: string, path: string, body?: unknown): Promise<T> {
    const controller = new AbortController();
    const timeout = setTimeout(() => controller.abort(), config.timeoutMs ?? 30000);
    try {
      const res = await fetch(`${base}${path}`, {
        method,
        headers,
        body: body ? JSON.stringify(body) : undefined,
        signal: controller.signal,
      });
      if (!res.ok) {
        const text = await res.text();
        throw new GammaApiError(res.status, text, path);
      }
      return res.json() as T;
    } finally {
      clearTimeout(timeout);
    }
  }

  return {
    generate: (body: GenerateRequest) =>
      request<{ generationId: string }>("POST", "/generations", body),
    generateFromTemplate: (body: TemplateRequest) =>
      request<{ generationId: string }>("POST", "/generations/from-template", body),
    poll: (id: string) =>
      request<GenerateResult>("GET", `/generations/${id}`),
    getFileUrls: (id: string) =>
      request<{ exportUrl: string }>("GET", `/generations/${id}/files`),
    listThemes: () => request<Theme[]>("GET", "/themes"),
    listFolders: () => request<Folder[]>("GET", "/folders"),
  };
}
Step 2: Custom Error Class
typescript
// lib/errors.ts
export class GammaApiError extends Error {
  constructor(
    public status: number,
    public body: string,
    public path: string
  ) {
    super(`Gamma API ${status} on ${path}: ${body}`);
    this.name = "GammaApiError";
  }

  get isRateLimit() { return this.status === 429; }
  get isAuth() { return this.status === 401 || this.status === 403; }
  get isServerError() { return this.status >= 500; }
}
Step 3: Poll-Until-Done Helper
typescript
// lib/poll.ts
export async function pollUntilDone(
  gamma: ReturnType<typeof createGammaClient>,
  generationId: string,
  opts = { intervalMs: 5000, timeoutMs: 180000 }
): Promise<GenerateResult> {
  const deadline = Date.now() + opts.timeoutMs;

  while (Date.now() < deadline) {
    const result = await gamma.poll(generationId);

    if (result.status === "completed") return result;
    if (result.status === "failed") {
      throw new Error(`Generation ${generationId} failed`);
    }

    await new Promise((r) => setTimeout(r, opts.intervalMs));
  }

  throw new Error(`Poll timeout for ${generationId} after ${opts.timeoutMs}ms`);
}
Step 4: Generate-and-Wait Convenience
typescript
// lib/generate.ts
export async function generateAndWait(
  gamma: ReturnType<typeof createGammaClient>,
  request: GenerateRequest
): Promise<GenerateResult> {
  const { generationId } = await gamma.generate(request);
  console.log(`Generation started: ${generationId}`);
  return pollUntilDone(gamma, generationId);
}

// Usage
const gamma = getGamma();
const result = await generateAndWait(gamma, {
  content: "Quarterly business review for Q1 2026",
  outputFormat: "presentation",
  themeId: "theme_abc123",
  exportAs: "pptx",
  textAmount: "medium",
  imageOptions: { style: "photorealistic corporate" },
});
console.log(`View: ${result.gammaUrl}`);
console.log(`Download: ${result.exportUrl}`);
Step 5: Template-Based Generation
typescript
// lib/templates.ts
// Uses POST /v1.0/generations/from-template
// The template gamma must contain exactly one page

interface TemplateRequest {
  gammaId: string;     // Template gamma ID (one-page template)
  prompt: string;      // Content + instructions for the template
  themeId?: string;
  exportAs?: "pdf" | "pptx" | "png";
  imageOptions?: { style?: string };
  sharingOptions?: object;
  folderIds?: string[];
}

export async function generateFromTemplate(
  gamma: ReturnType<typeof createGammaClient>,
  templateId: string,
  prompt: string,
  options: Partial<TemplateRequest> = {}
): Promise<GenerateResult> {
  const { generationId } = await gamma.generateFromTemplate({
    gammaId: templateId,
    prompt,
    ...options,
  });
  return pollUntilDone(gamma, generationId);
}
Step 6: Retry with Backoff
typescript
// lib/retry.ts
export async function withRetry<T>(
  fn: () => Promise<T>,
  maxRetries = 3,
  baseDelayMs = 1000
): Promise<T> {
  for (let attempt = 0; attempt <= maxRetries; attempt++) {
    try {
      return await fn();
    } catch (err) {
      if (attempt === maxRetries) throw err;
      if (err instanceof GammaApiError && !err.isRateLimit && !err.isServerError) {
        throw err; // Don't retry auth errors or 4xx
      }
      const delay = baseDelayMs * Math.pow(2, attempt);
      console.warn(`Retry ${attempt + 1}/${maxRetries} in ${delay}ms`);
      await new Promise((r) => setTimeout(r, delay));
    }
  }
  throw new Error("Unreachable");
}

// Usage
const result = await withRetry(() =>
  generateAndWait(gamma, { content: "My deck", outputFormat: "presentation" })
);

API Endpoints Reference

MethodEndpointPurpose
POST/v1.0/generationsGenerate from text content
POST/v1.0/generations/from-templateGenerate from a template gamma
GET/v1.0/generations/{id}Poll generation status
GET/v1.0/generations/{id}/filesGet export file URLs
GET/v1.0/themesList workspace themes
GET/v1.0/foldersList workspace folders

Error Handling

PatternUse Case
GammaApiError classTyped error handling with isRateLimit, isAuth, isServerError
withRetry()Auto-retry on 429/5xx with exponential backoff
pollUntilDone()Timeout-aware polling with configurable interval
Singleton getGamma()Consistent config across modules

Resources

Next Steps

Proceed to gamma-core-workflow-a for content generation workflows.

© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/.curated/gamma-sdk-patterns of jeremylongshore/tons-of-skills-marketplace.

Open the folder on GitHubat commit cfae287

Compare with similar skills

Gamma SDK Patterns next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Gamma SDK Patterns compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Gamma SDK Patterns this skilljeremylongshore/tons-of-skills-marketplace2.8k—~2.2kAutomated safety check: PassMIT
API DesignerJeffallan/claude-skills12k1 repos~2kAutomated safety check: PassMIT
Backend Endpointqf-studio/navigator355—~4.5kAutomated safety check: NotesMIT
Ns APINethServer/nethsecurity192—~2.8kAutomated safety check: PassCustom licence
iOS Networkingdpearson2699/swift-ios-skills1.2k—~4.2kAutomated safety check: PassCustom licence
API Integration Specialistaiskillstore/marketplace4332 repos~2.2kAutomated safety check: PassNone

Similar skills

  • API Designer

    Jeffallan/claude-skills

    Designs REST and GraphQL APIs from resource modeling to an OpenAPI 3.1 contract, with versioning, pagination and RFC 7807 error handling.

    12k GitHub starsUsed in 1 repo~2k tokens
    Backend & APIsAuto-check passed
  • Backend Endpoint

    qf-studio/navigator

    Create REST/GraphQL API endpoint with validation, error handling, and tests.

    355 GitHub stars~4.5k tokensUpdated yesterday
    Backend & APIsAuto-check: notes
  • Ns API

    NethServer/nethsecurity

    Write or modify a NethSecurity Python RPCD API script or hook.

    192 GitHub stars~2.8k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • iOS Networking

    dpearson2699/swift-ios-skills

    Build, review, or improve networking code in iOS/macOS apps using URLSession with async/await, structured concurrency, and modern Swift patterns.

    1.2k GitHub stars~4.2k tokensUpdated 2 mo ago
    Backend & APIsAuto-check passed
  • API Integration Specialist

    aiskillstore/marketplace

    Expert in integrating third-party APIs with proper authentication, error handling, rate limiting, and retry logic.

    433 GitHub starsUsed in 2 repos~2.2k tokens
    Backend & APIsAuto-check passed
  • Sap Abap

    secondsky/sap-skills

    Comprehensive ABAP development skill for SAP systems. An agent skill from secondsky/sap-skills.

    462 GitHub stars~3.9k tokensUpdated 5 days ago
    DatabasesAuto-check passed

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Adapting Transfer Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Agent Context Loader

    jeremylongshore/tons-of-skills-marketplace

    Execute proactive auto-loading: automatically detects and loads agents.md files.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Aggregating Performance Metrics

    jeremylongshore/tons-of-skills-marketplace

    Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.

    2.8k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Analyzing Capacity Planning

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.

    2.8k GitHub stars~947 tokensUpdated today
    Auto-check passed
  • Analyzing Database Indexes

    jeremylongshore/tons-of-skills-marketplace

    Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~2k tokensUpdated today
    Auto-check passed

Categories

Questions about Gamma SDK Patterns

What does Gamma SDK Patterns do?

Reusable patterns for the Gamma REST API (no SDK exists). An agent skill from jeremylongshore/tons-of-skills-marketplace. Gamma SDK Patterns is an agent skill from jeremylongshore/tons-of-skills-marketplace. Reusable patterns for the Gamma REST API (no SDK exists).

When should I use Gamma SDK Patterns?

Gamma SDK Patterns fits situations like: building typed wrappers; generation helpers; template factories; error handling for Gamma.

How do I install Gamma SDK Patterns in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill gamma-sdk-patterns -a claude-code`. Or copy the skill folder (skills/.curated/gamma-sdk-patterns in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/gamma-sdk-patterns in your project. Claude Code loads it when a task matches its description.

How do I install Gamma SDK Patterns in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill gamma-sdk-patterns -a codex`. Or copy the skill folder (skills/.curated/gamma-sdk-patterns in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/gamma-sdk-patterns in your project. Codex loads it when a task matches its description.

Can I use Gamma SDK Patterns in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill gamma-sdk-patterns -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/gamma-sdk-patterns, .gemini/skills/gamma-sdk-patterns, .github/skills/gamma-sdk-patterns and .opencode/skills/gamma-sdk-patterns in your project.

What does Gamma SDK Patterns need to run?

Going by SKILL.md and its folder, Gamma SDK Patterns needs credentials named GAMMA_API_KEY. Our summary lists: Node.js; A credential in GAMMA_API_KEY. Its frontmatter pre-approves these tools: Read, Write, Edit. Compatibility (from SKILL.md): Designed for Claude Code.

Does Gamma SDK Patterns access the network?

SKILL.md names 2 domains. In commands or code: public-api.gamma.app; the agent is likely to contact it when it follows the instructions. As links in the text: developers.gamma.app. This is read from the text; nothing was executed.

Is Gamma SDK Patterns safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Gamma SDK Patterns use?

Gamma SDK Patterns is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Gamma SDK Patterns use?

About 2.2k tokens (SKILL.md is roughly 8.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Gamma SDK Patterns?

Skills that share tags, products or a category with Gamma SDK Patterns: API Designer (Jeffallan/claude-skills, 12k stars), Backend Endpoint (qf-studio/navigator, 355 stars), Ns API (NethServer/nethsecurity, 192 stars) and iOS Networking (dpearson2699/swift-ios-skills, 1.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Gamma SDK Patterns?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,827 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 10, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.