Agent skill

Apollo Common Errors

by jeremylongshore in jeremylongshore/tons-of-skills-marketplace

Diagnose and fix common Apollo.io API errors. An agent skill from jeremylongshore/tons-of-skills-marketplace.

MITAuto-check passedBackend & APIs

Install Apollo Common Errors

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

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

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace apollo-common-errors --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-common-errors .claude/skills/apollo-common-errors && 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-common-errors
GitHub stars
2.8k
Token cost
~2.2k tokens
SKILL.md length
401 words
Files
3 (incl. references)
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Diagnose and fix common Apollo.io API errors. An agent skill from jeremylongshore/tons-of-skills-marketplace.

  • Works in 6 steps: Identify the Error Category → Handle 401 — Invalid API Key → Handle 403 — Wrong Key Type → …
  • Encountering Apollo API errors
  • SKILL.md covers Overview, Prerequisites, Instructions and Error Reference, plus 5 more sections
  • Calls curl and python3; reaches api.apollo.io; needs APOLLO_API_KEY

What it does

Apollo Common Errors is an agent skill from jeremylongshore/tons-of-skills-marketplace. Diagnose and fix common Apollo.io API errors. Use when encountering Apollo API errors, debugging integration issues, or troubleshooting failed requests. Trigger with phrases like "apollo error", "apollo api error", "debug apollo", "apollo 401", "apollo 429", "apollo troubleshoot".

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

It sits in Backend & APIs, covering GraphQL and Rate limiting. 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

  • Encountering Apollo API errors
  • Debugging integration issues
  • Troubleshooting failed requests
  • With phrases like apollo error

Example prompts

  • “apollo error”
  • “apollo api error”
  • “debug apollo”
  • “/apollo-common-errors”

Requirements

  • Python 3
  • Node.js
  • A credential in APOLLO_API_KEY
  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Grep, Bash(curl:*)

Workflow steps

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

  1. Identify the Error Category
  2. Handle 401 — Invalid API Key
  3. Handle 403 — Wrong Key Type
  4. Handle 429 — Rate Limiting
  5. Handle 422 — Validation Errors
  6. Build Comprehensive Error Middleware

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
    • Grep
    • Bash(curl:*)

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • curl
    • python3

    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
    • status.apollo.io

    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 Common Errors loads about 2.2k tokens when it runs, and up to ~5k if it reads all its reference files. Until then it costs about 76 tokens; SKILL.md has 401 words of instructions outside code blocks.

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

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). 401 words, ~2,219 tokens.

Download SKILL.mdSave it as .claude/skills/apollo-common-errors/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
apollo-common-errors
description
Diagnose and fix common Apollo.io API errors. Use when encountering Apollo API errors, debugging integration issues, or troubleshooting failed requests. Trigger with phrases like "apollo error", "apollo api error", "debug apollo", "apollo 401", "apollo 429", "apollo troubleshoot".
allowed-tools
Read, Grep, Bash(curl:*)
compatibility
Designed for Claude Code
version
1.13.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
saas, apollo, api, debugging

Apollo Common Errors

Overview

Comprehensive guide to diagnosing and fixing Apollo.io API errors. Apollo uses x-api-key header authentication and the base URL https://api.apollo.io/api/v1/. Apollo distinguishes between master and standard API keys — many endpoints require master keys.

Prerequisites

  • Valid Apollo.io API credentials
  • Node.js 18+ or Python 3.10+

Instructions

Step 1: Identify the Error Category
typescript
// src/apollo/error-handler.ts
import { AxiosError } from 'axios';

type ErrorCategory = 'auth' | 'permission' | 'rate_limit' | 'validation' | 'server' | 'network';

function categorizeError(err: AxiosError): ErrorCategory {
  if (!err.response) return 'network';
  switch (err.response.status) {
    case 401: return 'auth';
    case 403: return 'permission';
    case 429: return 'rate_limit';
    case 400: case 422: return 'validation';
    default: return err.response.status >= 500 ? 'server' : 'validation';
  }
}
Step 2: Handle 401 — Invalid API Key
typescript
// Most common cause: missing x-api-key header or wrong key format
async function diagnoseAuth() {
  try {
    const response = await fetch('https://api.apollo.io/api/v1/auth/health', {
      headers: { 'x-api-key': process.env.APOLLO_API_KEY! },
    });
    const data = await response.json();
    if (data.is_logged_in) {
      console.log('API key is valid');
    } else {
      console.error('API key is invalid or expired');
      console.error('  Generate a new one at: Apollo > Settings > Integrations > API Keys');
    }
  } catch (err: any) {
    console.error('Cannot reach Apollo API:', err.message);
  }
}

Common 401 causes:

  1. Using api_key query parameter instead of x-api-key header
  2. Key was revoked or regenerated in the dashboard
  3. Key has trailing whitespace (check with echo -n "$APOLLO_API_KEY" | wc -c)
Step 3: Handle 403 — Wrong Key Type
Standard API key: search + enrichment only
Master API key:   full access (contacts, sequences, deals, tasks)

Endpoints that require a master key:

  • POST /contacts (create/update)
  • POST /emailer_campaigns/search (sequences)
  • POST /emailer_campaigns/{id}/add_contact_ids
  • POST /opportunities (deals)
  • POST /tasks (tasks)
  • DELETE /contacts/{id}
typescript
// Diagnose: test a master-key-only endpoint
async function diagnoseMasterKey() {
  try {
    await client.post('/contacts/search', { per_page: 1 });
    console.log('Master API key confirmed');
  } catch (err: any) {
    if (err.response?.status === 403) {
      console.error('Your API key is a standard key. Master key required.');
      console.error('  Go to Apollo > Settings > Integrations > API Keys');
      console.error('  Generate a new key with "Master Key" type');
    }
  }
}
Step 4: Handle 429 — Rate Limiting

Apollo uses fixed-window rate limiting per endpoint category:

Endpoint Category         | Limit      | Window  | Burst
--------------------------+------------+---------+------
People Search             | 100/min    | 1 min   | 10/sec
People Enrichment         | 100/min    | 1 min   | 10/sec
Bulk People Enrichment    | 10/min     | 1 min   | 2/sec
Organization Enrichment   | 100/min    | 1 min   | 10/sec
Contacts (CRUD)           | 100/min    | 1 min   | 10/sec
Sequences                 | 100/min    | 1 min   | 10/sec
typescript
// Respect Retry-After header
async function handleRateLimit<T>(fn: () => Promise<T>): Promise<T> {
  try {
    return await fn();
  } catch (err: any) {
    if (err.response?.status === 429) {
      const retryAfter = parseInt(err.response.headers['retry-after'] ?? '60', 10);
      console.warn(`Rate limited. Waiting ${retryAfter}s...`);
      await new Promise((r) => setTimeout(r, retryAfter * 1000));
      return fn();
    }
    throw err;
  }
}
Step 5: Handle 422 — Validation Errors
typescript
// Common 422 causes:
//   - per_page > 100 on search endpoints
//   - Missing required fields on /contacts POST (first_name, last_name)
//   - Invalid email format on /people/match
//   - page > 500 on /mixed_people/api_search (50,000 record limit)

function logValidationError(err: AxiosError) {
  const body = err.response?.data as any;
  console.error('Validation error:', {
    status: err.response?.status,
    message: body?.message ?? body?.error,
    errors: body?.errors,
    url: err.config?.url,
    body: typeof err.config?.data === 'string' ? JSON.parse(err.config.data) : err.config?.data,
  });
}
Step 6: Build Comprehensive Error Middleware
typescript
// src/apollo/error-middleware.ts
import { AxiosError, AxiosInstance } from 'axios';

export function attachErrorHandler(client: AxiosInstance) {
  client.interceptors.response.use(
    (response) => response,
    (err: AxiosError) => {
      const status = err.response?.status;
      const body = err.response?.data as any;
      const endpoint = err.config?.url ?? 'unknown';

      const info = {
        status,
        endpoint,
        message: body?.message ?? err.message,
        timestamp: new Date().toISOString(),
      };

      switch (categorizeError(err)) {
        case 'auth':
          console.error('[APOLLO AUTH] Invalid x-api-key header', info);
          break;
        case 'permission':
          console.error('[APOLLO PERMISSION] Master key required for this endpoint', info);
          break;
        case 'rate_limit':
          console.warn('[APOLLO RATE LIMIT]', info);
          break;
        case 'validation':
          console.error('[APOLLO VALIDATION]', info);
          break;
        case 'server':
          console.error('[APOLLO SERVER] Check status.apollo.io', info);
          break;
        case 'network':
          console.error('[APOLLO NETWORK] Cannot reach api.apollo.io', info);
          break;
      }

      return Promise.reject(err);
    },
  );
}

Error Reference

CodeMeaningFix
401Invalid or missing x-api-key headerVerify key in dashboard, check header name
403Standard key used for master-only endpointGenerate master API key
422Bad request bodyCheck field names, per_page <= 100, page <= 500
429Rate limit exceededRead Retry-After header, implement backoff
500Apollo server errorRetry with backoff, check status.apollo.io
ECONNREFUSEDNetwork/firewallAllow outbound HTTPS to api.apollo.io:443
Show full SKILL.md (188 more words)Show less

Output

  • A classified error record containing the HTTP status, affected endpoint, and a redacted provider message suitable for the incident timeline
  • A bounded recovery decision: rotate or correct credentials, request the required key type, retry within the server-provided window, or stop the job
  • A reproducible diagnostic that uses a minimal request and never writes an Apollo key, raw contact data, or full request body to shared logs

Examples

Quick cURL Diagnostic
bash
# Test auth (should return is_logged_in: true)
curl -s -H "x-api-key: $APOLLO_API_KEY" \
  https://api.apollo.io/api/v1/auth/health | python3 -m json.tool

# Test master key (returns contacts or 403)
curl -s -X POST -H "Content-Type: application/json" -H "x-api-key: $APOLLO_API_KEY" \
  -d '{"per_page":1}' https://api.apollo.io/api/v1/contacts/search | python3 -m json.tool

Error Handling

Treat a 401 as a credential configuration failure: redact the value, verify the secret binding, and rotate only through the approved credential owner. A 403 means the workflow must stop until the correct authorized key type is available; do not widen a standard key's permissions in a debug branch. For a 429, honor Retry-After, cap retries, and preserve the unfinished work for a later run. For 5xx or network failures, record the redacted request context, check the provider status page, and fail the batch rather than replaying writes whose outcome is unknown.

Resources

Next Steps

Proceed to apollo-debug-bundle for collecting debug evidence.

© 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 2 other files (references) in skills/.curated/apollo-common-errors of jeremylongshore/tons-of-skills-marketplace.

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

Open the folder on GitHubat commit 80f86df

Compare with similar skills

Apollo Common Errors 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 Common Errors compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Apollo Common Errors this skilljeremylongshore/tons-of-skills-marketplace2.8k—~2.2kAutomated safety check: PassMIT
API Auditbriiirussell/cybersecurity-skills413—~2.8kAutomated safety check: NotesMIT
Domain Webfjrevoredo/mini-diarium3081 repos~1kAutomated safety check: PassMIT
Discover APIrand/cc-polymath181—~1.5kAutomated safety check: PassMIT
API Connector Builderericrisco/rsc-harness174—~3.6kAutomated safety check: PassMIT
Designing APIsancoleman/ai-design-components526—~2.6kAutomated safety check: PassMIT

Similar skills

  • API Audit

    briiirussell/cybersecurity-skills

    Audit REST, GraphQL, and RPC APIs against the OWASP API Security Top 10 (2023).

    413 GitHub stars~2.8k tokensUpdated 4 mo ago
    Backend & APIsAuto-check: notes
  • Domain Web

    fjrevoredo/mini-diarium

    A skill your agent uses when building web services. An agent skill from fjrevoredo/mini-diarium.

    308 GitHub starsUsed in 1 repo~1k tokens
    Backend & APIsAuto-check passed
  • Discover API

    rand/cc-polymath

    Automatically discover API design skills when working with REST APIs, GraphQL schemas, API authentication, OAuth, JWT, rate limiting, API versioning, error handling, or endpoint design.

    181 GitHub stars~1.5k tokensUpdated 7 mo ago
    Backend & APIsAuto-check passed
  • API Connector Builder

    ericrisco/rsc-harness

    A skill your agent uses when writing a client for someone else's REST or GraphQL API: auth flow choice and token refresh, pagination to exhaustion, retry-with-jitter on transient failures only…

    174 GitHub stars~3.6k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Designing APIs

    ancoleman/ai-design-components

    Design APIs that are secure, scalable, and maintainable using RESTful, GraphQL, and event-driven patterns.

    526 GitHub stars~2.6k tokensUpdated 10 mo ago
    Backend & APIsAuto-check passed
  • Implementing API Patterns

    ancoleman/ai-design-components

    API design and implementation across REST, GraphQL, gRPC, and tRPC patterns.

    526 GitHub stars~3k tokensUpdated 10 mo ago
    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

Categories

Questions about Apollo Common Errors

What does Apollo Common Errors do?

Diagnose and fix common Apollo.io API errors. An agent skill from jeremylongshore/tons-of-skills-marketplace. Apollo Common Errors is an agent skill from jeremylongshore/tons-of-skills-marketplace.io API errors.

When should I use Apollo Common Errors?

Apollo Common Errors fits situations like: encountering Apollo API errors; debugging integration issues; troubleshooting failed requests; with phrases like apollo error.

How do I install Apollo Common Errors in Claude Code?

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

How do I install Apollo Common Errors in Codex?

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

Can I use Apollo Common Errors 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-common-errors -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-common-errors, .gemini/skills/apollo-common-errors, .github/skills/apollo-common-errors and .opencode/skills/apollo-common-errors in your project.

What does Apollo Common Errors need to run?

Going by SKILL.md and its folder, Apollo Common Errors needs the command-line tools its instructions call (curl and python3) and credentials named APOLLO_API_KEY. Our summary lists: Python 3; Node.js; A credential in APOLLO_API_KEY. Its frontmatter pre-approves these tools: Read, Grep, Bash(curl:*). Compatibility (from SKILL.md): Designed for Claude Code.

Does Apollo Common Errors 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 status.apollo.io. This is read from the text; nothing was executed.

Is Apollo Common Errors 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 Common Errors use?

Apollo Common Errors 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 Common Errors use?

About 2.2k tokens (SKILL.md is roughly 8.9k 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 2.8k tokens, read only when the agent opens those files.

What are the alternatives to Apollo Common Errors?

Skills that share tags, products or a category with Apollo Common Errors: API Audit (briiirussell/cybersecurity-skills, 413 stars), Domain Web (fjrevoredo/mini-diarium, 308 stars), Discover API (rand/cc-polymath, 181 stars) and API Connector Builder (ericrisco/rsc-harness, 174 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Apollo Common Errors?

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.