Apollo Performance TuningSAFE
Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.
Overview
Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.
4f83675ca38aOBSERVED · 2026-10-08Host compatibility
What the documentation claims. We have not run a compatibility test.
| Host | Status | Notes |
|---|---|---|
| claude-code | mentioned |
What it tells the agent
The instruction file, verbatim from the audited commit — this is the text the model reads, and the surface the audit's instruction layer examines. Quoted here so you can judge it without cloning anything.
--- name: apollo-performance-tuning description: 'Optimize Apollo.io API performance. Use when improving API response times, reducing latency, or optimizing bulk operations. Trigger with phrases like "apollo performance", "optimize apollo", "apollo slow", "apollo latency", "speed up apollo". ' allowed-tools: Read, Write, Edit, Bash(gh:*), Bash(curl:*) version: 1.13.0 license: MIT author: Jeremy Longshore <[email protected]> tags: - saas - apollo - api - performance compatibility: Designed for Claude Code --- # Apollo Performance Tuning ## Overview Optimize Apollo.io API performance through response caching, connection pooling, bulk operations, parallel fetching, and result slimming. Key insight: **search is free but slow (~500ms), enrichment costs credits** — cache aggressively and batch enrichment calls. ## Prerequisites - Valid Apollo API key - Node.js 18+ ## Instructions ### Step 1: Connection Pooling Reuse TCP connections to avoid TLS handshake overhead on every request. ```typescript // src/apollo/optimized-client.ts import axios from 'axios'; import https from 'https'; const httpsAgent = new https.Agent({ keepAlive: true, maxSockets: 10, maxFreeSockets: 5, timeout: 30_000, }); export const optimizedClient = axios.create({ baseURL: 'https://api.apollo.io/api/v1', headers: { 'Content-Type': 'application/json', 'x-api-key': process.env.APOLLO_API_KEY! }, httpsAgent, timeout: 15_000, }); ``` ### Step 2: Response Caching with Per-Endpoint TTLs ```typescript // src/apollo/cache.ts import { LRUCache } from 'lru-cache'; // Different TTLs based on data volatility const CACHE_TTLS: Record<string, number> = { '/organizations/enrich': 24 * 60 * 60 * 1000, // 24h — company data rarely changes '/people/match': 4 * 60 * 60 * 1000, // 4h — contact data changes occasionally '/mixed_people/api_search': 15 * 60 * 1000, // 15min — search results are dynamic '/mixed_companies/search': 30 * 60 * 1000, // 30min — company search '/contact_stages': 60 * 60 * 1000, // 1h — stages rarely change }; const cache = new LRUCache<string, { data: any; at: number }>({ max: 5000, maxSize: 50 * 1024 * 1024, sizeCalculation: (v) => JSON.stringify(v).length, }); function cacheKey(endpoint: string, params: any): string { return `${endpoint}:${JSON.stringify(params)}`; } export async function cachedRequest<T>( endpoint: string, requestFn: () => Promise<T>, params: any, ): Promise<T> { const key = cacheKey(endpoint, params); const ttl = CACHE_TTLS[endpoint] ?? 15 * 60 * 1000; const cached = cache.get(key); if (cached && Date.now() - cached.at < ttl) return cached.data; const data = await requestFn(); cache.set(key, { data, at: Date.now() }); return data; } export function getCacheStats() { return { entries: cache.size, sizeBytes: cache.calculatedSize }; } ``` ### Step 3: Use Bulk Endpoints Over Single Calls Apollo's bulk enrichment endpoint handles 10 records per call vs 1. Massive performance gain. ```typescript // src/apollo/bulk-ops.ts import { optimizedClient } from './optimized-client'; import PQueue from 'p-queue'; const queue = new PQueue({ concurrency: 3, intervalCap: 2, interval: 1000 }); // Enrich 100 people: 100 individual calls = 100 requests @ 500ms = 50s // Batch of 10: 10 bulk calls @ 600ms = 6s (8x faster, same credits) export async function batchEnrich( details: Array<{ email?: string; linkedin_url?: string; first_name?: string; last_name?: string; organization_domain?: string }>, ): Promise<any[]> { const results: any[] = []; for (let i = 0; i < details.length; i += 10) { const batch = details.slice(i, i + 10); const result = await queue.add(async () => { const { data } = await optimizedClient.post('/people/bulk_match', { details: batch, reveal_personal_emails: false, reveal_phone_number: false, }); return data.matches ?? []; }); results.push(...(result ?? [])); } return results; } ``` ### Step 4: Parallel Search with Concurrency Control ```typescript export async function parallelSearch( domains: string[], concurrency: number = 5, ): Promise<Map<string, any[]>> { const searchQueue = new PQueue({ concurrency }); const results = new Map<string, any[]>(); await searchQueue.addAll( domains.map((domain) => async () => { const data = await cachedRequest( '/mixed_people/api_search', () => optimizedClient.post('/mixed_people/api_search', { q_organization_domains_list: [domain], person_seniorities: ['vp', 'director', 'c_suite'], per_page: 25, }).then((r) => r.data), { domain }, ); results.set(domain, data.people ?? []); }), ); return results; } ``` ### Step 5: Slim Response Payloads Apollo returns large person objects (~2KB each). Extract only needed fields to reduce memory. ```typescript interface SlimPerson { id: string; name: string; title: string; email?: string; company: string; seniority: string; } function slimPerson(raw: any): SlimPerson { return { id: raw.id, name: raw.name, title: raw.title, email: raw.email, company: raw.organization?.name ?? '', seniority: raw.seniority ?? '', }; } // Use immediately after API call to free memory const { data } = await optimizedClient.post('/mixed_people/api_search', { ... }); const slim = data.people.map(slimPerson); // ~200 bytes each instead of ~2KB ``` ### Step 6: Benchmark Your Endpoints ```typescript async function benchmark(includePaidEndpoints = false) { const endpoints = [ { name: 'People Search', fn: () => optimizedClient.post('/mixed_people/api_search', { q_organization_domains_list: ['apollo.io'], per_page: 1 }) }, { name: 'Auth Health', fn: () => optimizedClient.get('/auth/health') }, ]; // Paid enrichment benchmarks require an approved, budgeted test run. if (incl
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- pinned
- Secrets in source
- none-found
Findings (0)
No findings outside the package's declared scope.
Gates applied: no_behavioural_pass.
4f83675ca38afull audit observations/trust-audit/skill/jeremylongshore__apollo-performance-tuning.json · Report an issue / request a re-scanAudit history
Every audit this skill has had.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-08 | 4f83675ca38a | SAFE | B | 89 | first audit |
Questions
What does the Apollo Performance Tuning skill do?
Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.
Is Apollo Performance Tuning safe to install?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean skill reads B.
What can Apollo Performance Tuning access on my machine?
The audit observed no filesystem, network or shell use at all in its source.
Which assistants does Apollo Performance Tuning work with?
Its documentation mentions claude-code. That is what the text claims, not a compatibility test we ran.
How current is this page?
The grade is for one exact copy of the source (4f83675ca38a), read on 2026-10-08. The repository is watched, and a new audit runs when it changes — this is the first audit.