jeremylongshore/claude-code-plugins-plus-skills
gamma-pack
plugins/saas-packs/gamma-pack/skills/gamma-performance-tuning/SKILL.md
January 22, 2026
Select agents to install to:
npx add-skill https://github.com/jeremylongshore/claude-code-plugins-plus-skills/blob/main/plugins/saas-packs/gamma-pack/skills/gamma-performance-tuning/SKILL.md -a claude-code --skill gamma-performance-tuningInstallation paths:
.claude/skills/gamma-performance-tuning/# Gamma Performance Tuning
## Overview
Optimize Gamma API integration performance for faster response times and better throughput.
## Prerequisites
- Working Gamma integration
- Performance monitoring tools
- Understanding of caching concepts
## Instructions
### Step 1: Client Configuration Optimization
```typescript
import { GammaClient } from '@gamma/sdk';
const gamma = new GammaClient({
apiKey: process.env.GAMMA_API_KEY,
// Connection optimization
timeout: 30000,
keepAlive: true,
maxSockets: 10,
// Retry configuration
retries: 3,
retryDelay: 1000,
retryCondition: (err) => err.status >= 500 || err.status === 429,
// Compression
compression: true,
});
```
### Step 2: Response Caching
```typescript
import NodeCache from 'node-cache';
const cache = new NodeCache({
stdTTL: 300, // 5 minutes default
checkperiod: 60,
});
async function getCachedPresentation(id: string) {
const cacheKey = `presentation:${id}`;
// Check cache first
const cached = cache.get(cacheKey);
if (cached) {
return cached;
}
// Fetch from API
const presentation = await gamma.presentations.get(id);
// Cache the result
cache.set(cacheKey, presentation);
return presentation;
}
// Cache invalidation on updates
gamma.on('presentation.updated', (event) => {
cache.del(`presentation:${event.data.id}`);
});
```
### Step 3: Parallel Request Optimization
```typescript
// Instead of sequential requests
async function getSequential(ids: string[]) {
const results = [];
for (const id of ids) {
results.push(await gamma.presentations.get(id)); // Slow!
}
return results;
}
// Use parallel requests with concurrency control
import pLimit from 'p-limit';
const limit = pLimit(5); // Max 5 concurrent requests
async function getParallel(ids: string[]) {
return Promise.all(
ids.map(id => limit(() => gamma.presentations.get(id)))
);
}
// Batch API if available
async function getBatch(ids: string[]) {
return gamma.presentations.getB