home / skills / jeremylongshore / claude-code-plugins-plus-skills / gamma-upgrade-migration

This skill guides upgrading Gamma SDKs and migrating APIs safely, reducing downtime and aligning projects with latest features.

npx playbooks add skill jeremylongshore/claude-code-plugins-plus-skills --skill gamma-upgrade-migration

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
3.8 KB
---
name: gamma-upgrade-migration
description: |
  Upgrade Gamma SDK versions and migrate between API versions.
  Use when upgrading SDK packages, handling deprecations,
  or migrating to new API versions.
  Trigger with phrases like "gamma upgrade", "gamma migration",
  "gamma new version", "gamma deprecated", "gamma SDK update".
allowed-tools: Read, Write, Edit, Bash(npm:*), Bash(pip:*), Grep
version: 1.0.0
license: MIT
author: Jeremy Longshore <[email protected]>
---

# Gamma Upgrade & Migration

## Overview
Guide for upgrading Gamma SDK versions and migrating between API versions safely.

## Prerequisites
- Existing Gamma integration
- Version control (git)
- Test environment available

## Instructions

### Step 1: Check Current Version
```bash
# Node.js
npm list @gamma/sdk

# Python
pip show gamma-sdk

# Check for available updates
npm outdated @gamma/sdk
```

### Step 2: Review Changelog
```bash
# View changelog
npm info @gamma/sdk changelog

# Or visit
# https://gamma.app/docs/changelog
```

### Step 3: Upgrade SDK
```bash
# Create upgrade branch
git checkout -b feat/gamma-sdk-upgrade

# Node.js - upgrade to latest
npm install @gamma/sdk@latest

# Python - upgrade to latest
pip install --upgrade gamma-sdk

# Or specific version
npm install @gamma/[email protected]
```

### Step 4: Handle Breaking Changes

**Common Migration Patterns:**

```typescript
// v1.x -> v2.x: Client initialization change
// Before (v1)
import Gamma from '@gamma/sdk';
const gamma = new Gamma(apiKey);

// After (v2)
import { GammaClient } from '@gamma/sdk';
const gamma = new GammaClient({ apiKey });
```

```typescript
// v1.x -> v2.x: Response format change
// Before (v1)
const result = await gamma.createPresentation({ title: 'Test' });
console.log(result.id);

// After (v2)
const result = await gamma.presentations.create({ title: 'Test' });
console.log(result.data.id);
```

```typescript
// v1.x -> v2.x: Error handling change
// Before (v1)
try {
  await gamma.create({ ... });
} catch (e) {
  if (e.code === 'RATE_LIMIT') { ... }
}

// After (v2)
import { RateLimitError } from '@gamma/sdk';
try {
  await gamma.presentations.create({ ... });
} catch (e) {
  if (e instanceof RateLimitError) { ... }
}
```

### Step 5: Update Type Definitions
```typescript
// Check for type changes
// tsconfig.json - ensure strict mode catches issues
{
  "compilerOptions": {
    "strict": true,
    "noImplicitAny": true
  }
}

// Run type check
npx tsc --noEmit
```

### Step 6: Test Thoroughly
```bash
# Run unit tests
npm test

# Run integration tests
npm run test:integration

# Manual smoke test
node -e "
const { GammaClient } = require('@gamma/sdk');
const g = new GammaClient({ apiKey: process.env.GAMMA_API_KEY });
g.ping().then(() => console.log('OK')).catch(console.error);
"
```

### Step 7: Deprecation Handling
```typescript
// Enable deprecation warnings
const gamma = new GammaClient({
  apiKey: process.env.GAMMA_API_KEY,
  showDeprecationWarnings: true,
});

// Migrate deprecated methods
// Deprecated
await gamma.getPresentations();

// New
await gamma.presentations.list();
```

## Migration Checklist
- [ ] Current version documented
- [ ] Changelog reviewed
- [ ] Breaking changes identified
- [ ] Upgrade branch created
- [ ] SDK upgraded
- [ ] Type errors fixed
- [ ] Deprecation warnings addressed
- [ ] Unit tests passing
- [ ] Integration tests passing
- [ ] Staging deployment verified
- [ ] Production deployment planned

## Rollback Procedure
```bash
# If issues occur after upgrade
git checkout main
npm install  # Restores previous version from lock file

# Or explicitly downgrade
npm install @gamma/[email protected]
```

## Resources
- [Gamma Changelog](https://gamma.app/docs/changelog)
- [Gamma Migration Guides](https://gamma.app/docs/migration)
- [Gamma API Versioning](https://gamma.app/docs/versioning)

## Next Steps
Proceed to `gamma-ci-integration` for CI/CD setup.

Overview

This skill upgrades Gamma SDK packages and guides safe migration between API versions. It provides a step-by-step workflow for checking versions, applying upgrades, handling breaking changes, running tests, and rolling back if needed. Use it to reduce risk when moving to new Gamma releases.

How this skill works

The skill inspects the current SDK version, reviews changelogs, and creates a dedicated upgrade branch. It applies the package upgrade for Node or Python, highlights common migration patterns (initialization, response formats, and error types), and enforces type checks and tests. It also offers a checklist, deprecation handling tips, and a rollback procedure to recover quickly from issues.

When to use it

  • Preparing to upgrade @gamma/sdk in a project
  • Migrating code from Gamma API v1 to v2 (or other major versions)
  • Addressing deprecation warnings before they become breaking
  • After automated dependency alerts for Gamma packages
  • When adding CI integration for new Gamma behavior

Best practices

  • Create a git branch for the upgrade and keep changes isolated
  • Read the official changelog and migration guides before coding
  • Run type checks (TS) and fix all compiler errors before testing
  • Execute unit and integration tests in a staging environment
  • Enable deprecation warnings and refactor deprecated calls early
  • Prepare a rollback plan and ensure lockfiles are committed

Example use cases

  • Upgrade a Node.js project from @gamma/sdk v1.x to v2.x and update client initialization and response handling
  • Update a Python integration to the latest gamma-sdk and verify API calls in integration tests
  • Migrate error handling to use typed SDK errors like RateLimitError and replace deprecated methods
  • Automate an upgrade workflow in CI that runs typecheck, unit tests, and a smoke ping to Gamma
  • Rollback to the previous version using the lockfile or explicit version if a staging deployment fails

FAQ

What if tests pass locally but staging fails?

Reproduce the failing scenario with the same environment variables and dependencies used in staging, capture logs, and revert to the upgrade branch while you triage; use the rollback procedure if needed.

How do I find breaking changes for a specific version?

Check the Gamma changelog and migration guides linked in the resources, and search for version-specific notes; focus on client initialization, response shapes, and error classes.