Back to Skills

apollo-performance-tuning

verified
View on GitHub

Marketplace

claude-code-plugins-plus

jeremylongshore/claude-code-plugins-plus-skills

Plugin

apollo-pack

business-tools

Repository

jeremylongshore/claude-code-plugins-plus-skills
1.1kstars

plugins/saas-packs/apollo-pack/skills/apollo-performance-tuning/SKILL.md

Last Verified

January 22, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/jeremylongshore/claude-code-plugins-plus-skills/blob/main/plugins/saas-packs/apollo-pack/skills/apollo-performance-tuning/SKILL.md -a claude-code --skill apollo-performance-tuning

Installation paths:

Claude
.claude/skills/apollo-performance-tuning/
Powered by add-skill CLI

Instructions

# Apollo Performance Tuning

## Overview
Optimize Apollo.io API performance through caching, connection pooling, request optimization, and efficient data handling.

## Performance Benchmarks

| Operation | Target Latency | Acceptable | Poor |
|-----------|---------------|------------|------|
| People Search | < 500ms | 500-1500ms | > 1500ms |
| Person Enrichment | < 1000ms | 1-3s | > 3s |
| Org Enrichment | < 800ms | 800ms-2s | > 2s |
| Bulk Operations | < 5s/100 | 5-15s/100 | > 15s/100 |

## 1. Connection Pooling

```typescript
// src/lib/apollo/http-agent.ts
import https from 'https';
import { Agent } from 'https';

// Reuse TCP connections
const httpsAgent = new Agent({
  keepAlive: true,
  keepAliveMsecs: 30000,
  maxSockets: 10,
  maxFreeSockets: 5,
  timeout: 30000,
});

export const apolloClient = axios.create({
  baseURL: 'https://api.apollo.io/v1',
  httpsAgent,
  timeout: 30000,
  headers: {
    'Connection': 'keep-alive',
  },
});
```

## 2. Response Caching

```typescript
// src/lib/apollo/cache.ts
import { LRUCache } from 'lru-cache';

interface CacheEntry<T> {
  data: T;
  timestamp: number;
}

class ApolloCache {
  private cache: LRUCache<string, CacheEntry<any>>;

  constructor() {
    this.cache = new LRUCache({
      max: 1000, // Max entries
      ttl: 5 * 60 * 1000, // 5 minutes default
      updateAgeOnGet: true,
    });
  }

  generateKey(operation: string, params: any): string {
    return `${operation}:${JSON.stringify(params)}`;
  }

  get<T>(key: string): T | null {
    const entry = this.cache.get(key) as CacheEntry<T> | undefined;
    return entry?.data || null;
  }

  set<T>(key: string, data: T, ttlMs?: number): void {
    this.cache.set(key, { data, timestamp: Date.now() }, { ttl: ttlMs });
  }

  invalidate(pattern: string): void {
    for (const key of this.cache.keys()) {
      if (key.includes(pattern)) {
        this.cache.delete(key);
      }
    }
  }

  getStats() {
    return {
      size: this.cache.size,
      hitRate: this.

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
8457 chars