gamma-local-dev-loop

Set up efficient local development workflow for Gamma.Use when configuring hot reload, mock responses,or optimizing your Gamma development experience.Trigger with phrases like "gamma local dev", "gamma development setup","gamma hot reload", "gamma mock", "gamma dev workflow".

⭐939stars🔀114forks📁View on GitHub🕐Updated Jan 11, 2026

When & Why to Use This Skill

The Gamma Local Dev Loop skill automates the setup of a high-efficiency local development environment for the Gamma SDK. It optimizes the developer experience by configuring hot-reloading with tsx/nodemon, implementing mock API clients for offline testing, and managing environment-specific configurations to accelerate the build-test-iterate cycle.

Use Cases

  • Rapid Prototyping: Quickly initialize a Gamma project with hot-reload capabilities to see code changes reflected instantly without manual restarts.
  • Cost-Effective Testing: Implement mock responses to simulate Gamma API interactions, allowing for extensive development and testing without incurring API usage costs or requiring an active internet connection.
  • Workflow Standardization: Automatically configure .env files and npm scripts to ensure a consistent development environment across different team members or machines.
  • Debugging and Error Handling: Use the pre-configured environment to safely test edge cases and error handling logic using mock data before deploying to production.
namegamma-local-dev-loop
description|
allowed-toolsRead, Write, Edit, Bash(npm:*), Bash(node:*)
version1.0.0
licenseMIT
authorJeremy Longshore <jeremy@intentsolutions.io>

Gamma Local Dev Loop

Overview

Configure an efficient local development workflow with hot reload and mock responses for Gamma presentation development.

Prerequisites

  • Completed gamma-hello-world setup
  • Node.js 18+ with nodemon or tsx
  • TypeScript project (recommended)

Instructions

Step 1: Install Dev Dependencies

npm install -D nodemon tsx dotenv @types/node

Step 2: Configure Development Script

Add to package.json:

{
  "scripts": {
    "dev": "tsx watch src/index.ts",
    "dev:mock": "GAMMA_MOCK=true tsx watch src/index.ts"
  }
}

Step 3: Create Mock Client

// src/gamma-client.ts
import { GammaClient } from '@gamma/sdk';

const isMock = process.env.GAMMA_MOCK === 'true';

export const gamma = isMock
  ? createMockClient()
  : new GammaClient({ apiKey: process.env.GAMMA_API_KEY });

function createMockClient() {
  return {
    presentations: {
      create: async (opts) => ({
        id: 'mock-123',
        url: 'https://gamma.app/mock/preview',
        title: opts.title,
      }),
    },
  };
}

Step 4: Set Up Environment Files

# .env.development
GAMMA_API_KEY=your-dev-key
GAMMA_MOCK=false

# .env.test
GAMMA_MOCK=true

Output

  • Hot reload development server
  • Mock client for offline development
  • Environment-based configuration
  • Fast iteration cycle

Error Handling

Error Cause Solution
Watch Error File permissions Check nodemon config
Mock Mismatch Mock out of sync Update mock responses
Env Not Loaded dotenv not configured Add import 'dotenv/config'

Examples

Watch Mode Development

npm run dev
# Changes to src/*.ts trigger automatic restart

Offline Development with Mocks

npm run dev:mock
# Uses mock responses, no API calls

Resources

Next Steps

Proceed to gamma-sdk-patterns for advanced SDK usage patterns.