Apply production-ready Apollo.io SDK patterns. An agent skill from jeremylongshore/tons-of-skills-marketplace.

MITAuto-check passedBackend & APIs

Install Apollo SDK Patterns

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill apollo-sdk-patterns -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace apollo-sdk-patterns --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/apollo-sdk-patterns .claude/skills/apollo-sdk-patterns && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
apollo-sdk-patterns
GitHub stars
2.8k
Token cost
~2k tokens
SKILL.md length
210 words
Files
2 (incl. references)
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Apply production-ready Apollo.io SDK patterns. An agent skill from jeremylongshore/tons-of-skills-marketplace.

  • Works in 5 steps: Type-Safe Client with Zod Validation → Custom Error Classes → Retry with Exponential Backoff → …
  • Implementing Apollo integrations
  • SKILL.md covers Overview, Prerequisites, Instructions and Output, plus 4 more sections
  • Reaches api.apollo.io; needs APOLLO_API_KEY

What it does

Apollo SDK Patterns is an agent skill from jeremylongshore/tons-of-skills-marketplace. Apply production-ready Apollo.io SDK patterns. Use when implementing Apollo integrations, refactoring API usage, or establishing team coding standards. Trigger with phrases like "apollo sdk patterns", "apollo best practices", "apollo code patterns", "idiomatic apollo", "apollo client wrapper".

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/implementation-guide.md`). Compatibility notes: Designed for Claude Code

It sits in Backend & APIs, covering GraphQL. It works with Apollo GraphQL and Zod. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • Implementing Apollo integrations
  • Refactoring API usage
  • Establishing team coding standards
  • With phrases like apollo sdk patterns

Example prompts

  • “apollo sdk patterns”
  • “apollo best practices”
  • “apollo code patterns”
  • “/apollo-sdk-patterns”

Requirements

  • A credential in APOLLO_API_KEY
  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Write, Edit

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Type-Safe Client with Zod Validation
  2. Custom Error Classes
  3. Retry with Exponential Backoff
  4. Async Pagination Iterator
  5. Bulk Enrichment with Rate Awareness

What it can do on your machine

Read from SKILL.md and the folder at commit 80f86df. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • api.apollo.io

    Also links to:

    • docs.apollo.io
    • zod.dev

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • APOLLO_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Designed for Claude Code

    From compatibility in the SKILL.md frontmatter.

Context cost

Apollo SDK Patterns loads about 2k tokens when it runs, and up to ~3.9k if it reads all its reference files. Until then it costs about 79 tokens; SKILL.md has 210 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~79
When it runs · the whole SKILL.md, loaded when a task matches
~2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit 80f86df, republished under its MIT licence (© jeremylongshore). 210 words, ~1,994 tokens.

Download SKILL.mdSave it as .claude/skills/apollo-sdk-patterns/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
apollo-sdk-patterns
description
Apply production-ready Apollo.io SDK patterns. Use when implementing Apollo integrations, refactoring API usage, or establishing team coding standards. Trigger with phrases like "apollo sdk patterns", "apollo best practices", "apollo code patterns", "idiomatic apollo", "apollo client wrapper".
allowed-tools
Read, Write, Edit
compatibility
Designed for Claude Code
version
1.13.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
saas, apollo, api

Apollo SDK Patterns

Overview

Production-ready patterns for Apollo.io API integration. Apollo has no official SDK — these patterns wrap the REST API (https://api.apollo.io/api/v1/) with type safety, retry logic, pagination, and bulk operations. All requests use the x-api-key header.

Prerequisites

  • Completed apollo-install-auth setup
  • TypeScript 5+ with strict mode

Instructions

Step 1: Type-Safe Client with Zod Validation
typescript
// src/apollo/client.ts
import axios, { AxiosInstance } from 'axios';
import { z } from 'zod';

const ConfigSchema = z.object({
  apiKey: z.string().min(10, 'API key too short'),
  baseURL: z.string().url().default('https://api.apollo.io/api/v1'),
  timeout: z.number().default(30_000),
});

let instance: AxiosInstance | null = null;

export function getApolloClient(config?: Partial<z.input<typeof ConfigSchema>>): AxiosInstance {
  if (instance) return instance;

  const parsed = ConfigSchema.parse({
    apiKey: config?.apiKey ?? process.env.APOLLO_API_KEY,
    ...config,
  });

  instance = axios.create({
    baseURL: parsed.baseURL,
    timeout: parsed.timeout,
    headers: {
      'Content-Type': 'application/json',
      'x-api-key': parsed.apiKey,
    },
  });

  return instance;
}

// Reset for testing
export function resetClient() { instance = null; }
Step 2: Custom Error Classes
typescript
// src/apollo/errors.ts
import { AxiosError } from 'axios';

export class ApolloApiError extends Error {
  constructor(
    message: string,
    public statusCode: number,
    public endpoint: string,
    public retryable: boolean,
    public requestId?: string,
  ) {
    super(message);
    this.name = 'ApolloApiError';
  }

  static fromAxios(err: AxiosError): ApolloApiError {
    const status = err.response?.status ?? 0;
    const body = err.response?.data as any;
    return new ApolloApiError(
      body?.message ?? err.message,
      status,
      err.config?.url ?? 'unknown',
      [429, 500, 502, 503, 504].includes(status),
      err.response?.headers?.['x-request-id'],
    );
  }
}

export class ApolloRateLimitError extends ApolloApiError {
  constructor(
    public retryAfterMs: number,
    endpoint: string,
  ) {
    super(`Rate limited on ${endpoint}`, 429, endpoint, true);
    this.name = 'ApolloRateLimitError';
  }
}
Step 3: Retry with Exponential Backoff
typescript
// src/apollo/retry.ts
import { ApolloApiError } from './errors';

export async function withRetry<T>(
  fn: () => Promise<T>,
  opts: { maxRetries?: number; baseMs?: number; maxMs?: number } = {},
): Promise<T> {
  const { maxRetries = 3, baseMs = 1000, maxMs = 30_000 } = opts;

  for (let attempt = 0; attempt <= maxRetries; attempt++) {
    try {
      return await fn();
    } catch (err) {
      const isRetryable = err instanceof ApolloApiError && err.retryable;
      if (!isRetryable || attempt === maxRetries) throw err;

      const jitter = Math.random() * 500;
      const delay = Math.min(baseMs * 2 ** attempt + jitter, maxMs);
      await new Promise((r) => setTimeout(r, delay));
    }
  }
  throw new Error('Unreachable');
}
Step 4: Async Pagination Iterator

Apollo endpoints return pagination.total_entries and accept page/per_page. The People Search API limits to 500 pages (50,000 records).

typescript
// src/apollo/paginator.ts
import { getApolloClient } from './client';
import { withRetry } from './retry';

export async function* paginate<T>(
  endpoint: string,
  body: Record<string, unknown>,
  itemKey: string = 'people',
  perPage: number = 100,
  maxPages: number = 500,
): AsyncGenerator<T[], void, undefined> {
  const client = getApolloClient();
  let page = 1;
  let totalPages = Infinity;

  while (page <= Math.min(totalPages, maxPages)) {
    const { data } = await withRetry(() =>
      client.post(endpoint, { ...body, page, per_page: perPage }),
    );

    const items: T[] = data[itemKey] ?? [];
    totalPages = data.pagination?.total_pages ?? 1;
    if (items.length === 0) break;

    yield items;
    page++;
  }
}

// Usage:
// for await (const batch of paginate('/mixed_people/api_search', {
//   q_organization_domains_list: ['stripe.com'],
// })) {
//   await processBatch(batch);
// }
Step 5: Bulk Enrichment with Rate Awareness

Apollo's Bulk People Enrichment endpoint handles up to 10 records per call.

typescript
// src/apollo/bulk-enrich.ts
import { getApolloClient } from './client';
import { withRetry } from './retry';

interface EnrichmentDetail {
  email?: string;
  linkedin_url?: string;
  first_name?: string;
  last_name?: string;
  organization_domain?: string;
}

export async function bulkEnrichPeople(
  details: EnrichmentDetail[],
  opts: { revealPersonalEmails?: boolean; revealPhoneNumber?: boolean } = {},
): Promise<any[]> {
  const client = getApolloClient();
  const results: any[] = [];

  // Apollo bulk endpoint accepts max 10 at a time
  for (let i = 0; i < details.length; i += 10) {
    const batch = details.slice(i, i + 10);

    const { data } = await withRetry(() =>
      client.post('/people/bulk_match', {
        details: batch,
        reveal_personal_emails: opts.revealPersonalEmails ?? false,
        reveal_phone_number: opts.revealPhoneNumber ?? false,
      }),
    );

    results.push(...(data.matches ?? []));

    // Brief pause between batches to respect rate limits
    if (i + 10 < details.length) {
      await new Promise((r) => setTimeout(r, 500));
    }
  }

  return results;
}

Output

  • src/apollo/client.ts — Zod-validated singleton with x-api-key header
  • src/apollo/errors.ts — ApolloApiError + ApolloRateLimitError with retryable flag
  • src/apollo/retry.ts — Exponential backoff with jitter
  • src/apollo/paginator.ts — Async generator for paginated endpoints (500-page limit)
  • src/apollo/bulk-enrich.ts — Batch enrichment via /people/bulk_match (10 per call)

Error Handling

PatternWhen to Use
Singleton clientAlways — one client instance per process
Retry429 rate limits, 5xx server errors
PaginationSearch results > 100 records
Bulk enrichmentMultiple contacts need email/phone data
Custom errorsTyped catch blocks distinguishing auth vs rate limit vs server

Examples

Full Pipeline: Search, Paginate, Enrich
typescript
import { paginate } from './apollo/paginator';
import { bulkEnrichPeople } from './apollo/bulk-enrich';

async function enrichLeadsAtCompany(domain: string) {
  const allPeople: any[] = [];
  for await (const batch of paginate('/mixed_people/api_search', {
    q_organization_domains_list: [domain],
    person_seniorities: ['vp', 'director', 'c_suite'],
  })) {
    allPeople.push(...batch);
  }
  console.log(`Found ${allPeople.length} decision-makers at ${domain}`);

  // Bulk enrich only those without email
  const toEnrich = allPeople
    .filter((p) => !p.email && p.linkedin_url)
    .map((p) => ({ linkedin_url: p.linkedin_url }));

  const enriched = await bulkEnrichPeople(toEnrich);
  console.log(`Enriched ${enriched.length} contacts`);
}

Resources

Next Steps

Proceed to apollo-core-workflow-a for lead search implementation.

© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in skills/.curated/apollo-sdk-patterns of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • references/implementation-guide.md

Open the folder on GitHubat commit 80f86df

Compare with similar skills

Apollo SDK Patterns next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Apollo SDK Patterns compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Apollo SDK Patterns this skilljeremylongshore/tons-of-skills-marketplace2.8k—~2kAutomated safety check: PassMIT
GraphQL Operations with CodegenChrisWiles/claude-code-showcase6.1k3 repos~1.5kAutomated safety check: PassNone
Apollo Clientapollographql/skills117—~1.9kAutomated safety check: PassMIT
Apollo Serverapollographql/skills117—~1.8kAutomated safety check: PassMIT
Graphqldavila7/claude-code-templates32k4 repos~625Automated safety check: PassMIT
Neo4j Graphql Skillneo4j-contrib/neo4j-skills114—~3.8kAutomated safety check: NotesMIT

Similar skills

  • GraphQL Operations with Codegen

    ChrisWiles/claude-code-showcase

    Sets the rules for writing GraphQL queries and mutations in .gql files, running codegen, and using generated Apollo hooks with proper error and loading handling.

    6.1k GitHub starsUsed in 3 repos~1.5k tokens
    Backend & APIsAuto-check passed
  • Apollo Client

    apollographql/skills

    Guide for building React applications with Apollo Client 4.x.

    117 GitHub stars~1.9k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Apollo Server

    apollographql/skills

    Guide for building GraphQL servers with Apollo Server 5.x. An agent skill from apollographql/skills.

    117 GitHub stars~1.8k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Graphql

    davila7/claude-code-templates

    GraphQL gives clients exactly the data they need - no more, no less.

    32k GitHub starsUsed in 4 repos~625 tokens
    Backend & APIsAuto-check passed
  • Neo4j Graphql Skill

    neo4j-contrib/neo4j-skills

    Build and configure a GraphQL API backed by Neo4j using @neo4j/graphql v7 (current) or v5 (LTS).

    114 GitHub stars~3.8k tokensUpdated 2 days ago
    Backend & APIsAuto-check: notes
  • Apollo Router

    apollographql/skills

    Version-aware guide for configuring and running Apollo Router for federated GraphQL supergraphs.

    117 GitHub stars~5.4k tokensUpdated yesterday
    Backend & APIsAuto-check passed

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Adapting Transfer Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Agent Context Loader

    jeremylongshore/tons-of-skills-marketplace

    Execute proactive auto-loading: automatically detects and loads agents.md files.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Aggregating Performance Metrics

    jeremylongshore/tons-of-skills-marketplace

    Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.

    2.8k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Analyzing Capacity Planning

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.

    2.8k GitHub stars~947 tokensUpdated today
    Auto-check passed
  • Analyzing Database Indexes

    jeremylongshore/tons-of-skills-marketplace

    Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~2k tokensUpdated today
    Auto-check passed

Questions about Apollo SDK Patterns

What does Apollo SDK Patterns do?

Apply production-ready Apollo.io SDK patterns. An agent skill from jeremylongshore/tons-of-skills-marketplace. Apollo SDK Patterns is an agent skill from jeremylongshore/tons-of-skills-marketplace.io SDK patterns.

When should I use Apollo SDK Patterns?

Apollo SDK Patterns fits situations like: implementing Apollo integrations; refactoring API usage; establishing team coding standards; with phrases like apollo sdk patterns.

How do I install Apollo SDK Patterns in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill apollo-sdk-patterns -a claude-code`. Or copy the skill folder (skills/.curated/apollo-sdk-patterns in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/apollo-sdk-patterns in your project. Claude Code loads it when a task matches its description.

How do I install Apollo SDK Patterns in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill apollo-sdk-patterns -a codex`. Or copy the skill folder (skills/.curated/apollo-sdk-patterns in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/apollo-sdk-patterns in your project. Codex loads it when a task matches its description.

Can I use Apollo SDK Patterns in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill apollo-sdk-patterns -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/apollo-sdk-patterns, .gemini/skills/apollo-sdk-patterns, .github/skills/apollo-sdk-patterns and .opencode/skills/apollo-sdk-patterns in your project.

What does Apollo SDK Patterns need to run?

Going by SKILL.md and its folder, Apollo SDK Patterns needs credentials named APOLLO_API_KEY. Our summary lists: A credential in APOLLO_API_KEY. Its frontmatter pre-approves these tools: Read, Write, Edit. Compatibility (from SKILL.md): Designed for Claude Code.

Does Apollo SDK Patterns access the network?

SKILL.md names 3 domains. In commands or code: api.apollo.io; the agent is likely to contact it when it follows the instructions. As links in the text: docs.apollo.io and zod.dev. This is read from the text; nothing was executed.

Is Apollo SDK Patterns safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Apollo SDK Patterns use?

Apollo SDK Patterns is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Apollo SDK Patterns use?

About 2k tokens (SKILL.md is roughly 8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.9k tokens, read only when the agent opens those files.

What are the alternatives to Apollo SDK Patterns?

Skills that share tags, products or a category with Apollo SDK Patterns: GraphQL Operations with Codegen (ChrisWiles/claude-code-showcase, 6.1k stars), Apollo Client (apollographql/skills, 117 stars), Apollo Server (apollographql/skills, 117 stars) and Graphql (davila7/claude-code-templates, 32k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Apollo SDK Patterns?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,825 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 9, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.