Optimize Apollo.io costs and credit usage. An agent skill from jeremylongshore/tons-of-skills-marketplace.

MITAuto-check passedBackend & APIs

Install Apollo Cost Tuning

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

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

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

At a glance

Optimize Apollo.io costs and credit usage. An agent skill from jeremylongshore/tons-of-skills-marketplace.

  • Works in 6 steps: Understand Apollo's Credit Model → Track Credit Usage → Deduplicate Before Enriching → …
  • Managing Apollo credits
  • SKILL.md covers Overview, Prerequisites, Instructions and Output, plus 4 more sections
  • Reaches api.apollo.io; needs APOLLO_API_KEY

What it does

Apollo Cost Tuning is an agent skill from jeremylongshore/tons-of-skills-marketplace. Optimize Apollo.io costs and credit usage. Use when managing Apollo credits, reducing API costs, or optimizing subscription usage. Trigger with phrases like "apollo cost", "apollo credits", "apollo billing", "reduce apollo costs", "apollo usage".

Its SKILL.md is about 2.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. 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

  • Managing Apollo credits
  • Reducing API costs
  • Optimizing subscription usage
  • With phrases like apollo cost

Example prompts

  • “apollo cost”
  • “apollo credits”
  • “apollo billing”
  • “/apollo-cost-tuning”

Requirements

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

Workflow steps

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

  1. Understand Apollo's Credit Model
  2. Track Credit Usage
  3. Deduplicate Before Enriching
  4. Score Leads Before Enriching
  5. Budget-Aware API Client
  6. Cost-Optimized Pipeline

What it can do on your machine

Read from SKILL.md and the folder at commit cfae287. 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
    • Bash(gh:*)
    • Bash(curl:*)

    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
    • 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 Cost Tuning loads about 2.2k tokens when it runs, and up to ~4.8k if it reads all its reference files. Until then it costs about 66 tokens; SKILL.md has 283 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~66
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
~4.8k

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 cfae287, republished under its MIT licence (© jeremylongshore). 283 words, ~2,236 tokens.

Download SKILL.mdSave it as .claude/skills/apollo-cost-tuning/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
apollo-cost-tuning
description
Optimize Apollo.io costs and credit usage. Use when managing Apollo credits, reducing API costs, or optimizing subscription usage. Trigger with phrases like "apollo cost", "apollo credits", "apollo billing", "reduce apollo costs", "apollo usage".
allowed-tools
Read, Write, Edit, Bash(gh:*), Bash(curl:*)
compatibility
Designed for Claude Code
version
1.13.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
saas, apollo, api, cost-optimization

Apollo Cost Tuning

Overview

Optimize Apollo.io API costs through credit-aware enrichment. Key cost model: search is free, enrichment costs credits. Apollo charges per unique contact/company lookup. Credits do not roll over. Strategies: deduplicate before enriching, score leads before spending credits, and track daily budget.

Prerequisites

  • Valid Apollo API key
  • Node.js 18+

Instructions

Step 1: Understand Apollo's Credit Model
Action                      | Credits | Notes
----------------------------+---------+-----------------------------------
People Search               | 0       | /mixed_people/api_search (free!)
Organization Search         | 0       | /mixed_companies/search (free!)
People Enrichment (single)  | 1       | /people/match
People Enrichment (bulk)    | 1/match | /people/bulk_match (up to 10/call)
Organization Enrichment     | 1       | /organizations/enrich
Reveal Personal Email       | +1      | reveal_personal_emails param
Reveal Phone Number         | +1      | reveal_phone_number param

Plans (approximate):

  • Free: 50 credits/month
  • Basic: 1,200 credits/month (~$0.04/credit)
  • Professional: 6,000 credits/month
  • Organization: 12,000+ credits/month
Step 2: Track Credit Usage
typescript
// src/cost/credit-tracker.ts
class CreditTracker {
  private daily: Map<string, number> = new Map();
  private readonly budget: number;

  constructor(dailyBudget: number = 200) {
    this.budget = dailyBudget;
  }

  record(count: number = 1) {
    const today = new Date().toISOString().split('T')[0];
    this.daily.set(today, (this.daily.get(today) ?? 0) + count);
  }

  todayUsage(): number {
    const today = new Date().toISOString().split('T')[0];
    return this.daily.get(today) ?? 0;
  }

  isOverBudget(): boolean {
    return this.todayUsage() >= this.budget;
  }

  report(): string {
    const used = this.todayUsage();
    return `${used}/${this.budget} credits (${Math.round((used / this.budget) * 100)}%)`;
  }
}

export const creditTracker = new CreditTracker(
  parseInt(process.env.APOLLO_DAILY_CREDIT_BUDGET ?? '200', 10),
);
Step 3: Deduplicate Before Enriching
typescript
// src/cost/dedup.ts
import { LRUCache } from 'lru-cache';

// Track enriched contacts to avoid paying twice
const enrichedCache = new LRUCache<string, boolean>({
  max: 50_000,
  ttl: 30 * 24 * 60 * 60 * 1000,  // 30 days
});

export function enrichmentKey(params: { email?: string; linkedin_url?: string;
  first_name?: string; last_name?: string; organization_domain?: string }): string {
  // Prefer email as unique key, fall back to LinkedIn, then name+domain
  return params.email
    ?? params.linkedin_url
    ?? `${params.first_name}:${params.last_name}:${params.organization_domain}`;
}

export function isAlreadyEnriched(key: string): boolean {
  return enrichedCache.has(key);
}

export function markEnriched(key: string) {
  enrichedCache.set(key, true);
}
Step 4: Score Leads Before Enriching

Only spend credits on leads worth contacting.

typescript
// src/cost/lead-scorer.ts
interface LeadSignals {
  seniority?: string;
  title?: string;
  companyEmployees?: number;
  hasEmail: boolean;
  hasPhone: boolean;
  hasLinkedIn: boolean;
}

export function shouldEnrich(signals: LeadSignals, threshold: number = 40): boolean {
  let score = 0;

  // Seniority — only enrich decision-makers
  const topSeniority = ['c_suite', 'vp', 'founder', 'owner'];
  if (topSeniority.includes(signals.seniority ?? '')) score += 40;
  else if (signals.seniority === 'director') score += 30;
  else if (signals.seniority === 'manager') score += 15;
  else score += 5;

  // Company size — mid-market is highest value
  if (signals.companyEmployees && signals.companyEmployees >= 50 && signals.companyEmployees <= 1000) score += 25;
  else if (signals.companyEmployees && signals.companyEmployees > 1000) score += 15;

  // Missing data — worth enriching if we need the contact info
  if (!signals.hasEmail) score += 20;
  if (!signals.hasPhone) score += 10;

  return score >= threshold;
}
Step 5: Budget-Aware API Client
typescript
// src/cost/budget-client.ts
import axios from 'axios';
import { creditTracker } from './credit-tracker';
import { isAlreadyEnriched, markEnriched, enrichmentKey } from './dedup';

const client = axios.create({
  baseURL: 'https://api.apollo.io/api/v1',
  headers: { 'Content-Type': 'application/json', 'x-api-key': process.env.APOLLO_API_KEY! },
});

// Credit-consuming endpoints
const CREDIT_ENDPOINTS = ['/people/match', '/people/bulk_match', '/organizations/enrich'];

// Block requests when over budget
client.interceptors.request.use((config) => {
  const isCreditEndpoint = CREDIT_ENDPOINTS.some((ep) => config.url?.includes(ep));
  if (isCreditEndpoint && creditTracker.isOverBudget()) {
    throw new Error(`Daily credit budget exceeded (${creditTracker.report()})`);
  }
  return config;
});

// Track credit usage on success
client.interceptors.response.use((response) => {
  const isCreditEndpoint = CREDIT_ENDPOINTS.some((ep) => response.config.url?.includes(ep));
  if (isCreditEndpoint) {
    // Bulk match: count matches, not calls
    const matchCount = response.data?.matches?.length ?? 1;
    creditTracker.record(matchCount);

    // Mark as enriched for dedup
    const email = response.data?.person?.email;
    if (email) markEnriched(email);
  }
  return response;
});

export { client as budgetClient };
Step 6: Cost-Optimized Pipeline
typescript
import { budgetClient } from './cost/budget-client';
import { shouldEnrich } from './cost/lead-scorer';
import { isAlreadyEnriched, enrichmentKey } from './cost/dedup';
import { creditTracker } from './cost/credit-tracker';

async function enrichHighValueLeads(people: any[]) {
  let enriched = 0, skipped = 0, deduped = 0;

  const toEnrich: any[] = [];

  for (const person of people) {
    const key = enrichmentKey({ email: person.email, linkedin_url: person.linkedin_url,
      first_name: person.first_name, last_name: person.last_name });

    if (isAlreadyEnriched(key)) { deduped++; continue; }
    if (!shouldEnrich({ seniority: person.seniority, hasEmail: !!person.email,
      hasPhone: false, hasLinkedIn: !!person.linkedin_url })) { skipped++; continue; }

    toEnrich.push(person);
  }

  // Bulk enrich in batches of 10
  for (let i = 0; i < toEnrich.length; i += 10) {
    const batch = toEnrich.slice(i, i + 10);
    await budgetClient.post('/people/bulk_match', {
      details: batch.map((p: any) => ({
        first_name: p.first_name, last_name: p.last_name,
        organization_domain: p.organization?.primary_domain,
      })),
    });
    enriched += batch.length;
  }

  console.log(`Enriched: ${enriched}, Skipped (low-value): ${skipped}, Deduped: ${deduped}`);
  console.log(`Credits: ${creditTracker.report()}`);
}

Output

  • Credit model reference table (free vs paid operations)
  • CreditTracker with daily budget enforcement
  • LRU deduplication preventing double-enrichment charges
  • Lead scoring to enrich only high-value contacts
  • Budget-aware client blocking requests at daily limit
  • Cost-optimized pipeline combining all strategies

Examples

For a weekly prospecting batch, search first without enrichment, score the results, and prepare only the eligible records for enrichment. Start with a small batch of ten, record the before-and-after credit count, and persist the deduplication key only after Apollo confirms a result. When the daily ceiling is reached, leave the remaining candidate IDs queued for the next budget window; do not increase the environment budget during the run or retry unknown results in a way that can consume the same credit twice.

Error Handling

IssueResolution
Budget exceededIncrease APOLLO_DAILY_CREDIT_BUDGET or wait until tomorrow
High dedup missesExtend LRU TTL, verify key generation logic
Enriching low-value leadsLower the shouldEnrich threshold
Month-end credit crunchSpread enrichment evenly with daily budgets

Resources

Next Steps

Proceed to apollo-reference-architecture for architecture patterns.

© 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-cost-tuning of jeremylongshore/tons-of-skills-marketplace.

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

Open the folder on GitHubat commit cfae287

Compare with similar skills

Apollo Cost Tuning 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 Cost Tuning compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Apollo Cost Tuning this skilljeremylongshore/tons-of-skills-marketplace2.8k—~2.2kAutomated safety check: PassMIT
Nodejs Backend Patternsever-works/ever-works16218 repos~4kAutomated safety check: PassAGPL-3.0
API DesignerJeffallan/claude-skills12k1 repos~2kAutomated safety check: PassMIT
GraphQL Operations with CodegenChrisWiles/claude-code-showcase6.1k3 repos~1.5kAutomated safety check: PassNone
Supabasecurvenote/curvenote1705 repos~2.2kAutomated safety check: PassCustom licence
API Design Principlesjh941213/my-cc-harness12518 repos~3.4kAutomated safety check: PassNone

Similar skills

  • Nodejs Backend Patterns

    ever-works/ever-works

    Build production-ready Node.js backend services with Express/Fastify, implementing middleware patterns, error handling, authentication, database integration, and API design best practices.

    162 GitHub starsUsed in 18 repos~4k tokens
    Backend & APIsAuto-check passed
  • API Designer

    Jeffallan/claude-skills

    Designs REST and GraphQL APIs from resource modeling to an OpenAPI 3.1 contract, with versioning, pagination and RFC 7807 error handling.

    12k GitHub starsUsed in 1 repo~2k tokens
    Backend & APIsAuto-check passed
  • 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
  • Supabase

    curvenote/curvenote

    A skill your agent uses when doing ANY task involving Supabase.

    170 GitHub starsUsed in 5 repos~2.2k tokens
    Backend & APIsAuto-check passed
  • API Design Principles

    jh941213/my-cc-harness

    REST 및 GraphQL API 설계 원칙 가이드. An agent skill from jh941213/my-cc-harness.

    125 GitHub starsUsed in 18 repos~3.4k tokens
    Backend & APIsAuto-check passed
  • API And Interface Design

    dzhalaevd/Donatello

    Guides stable API and interface design. An agent skill from dzhalaevd/Donatello.

    135 GitHub starsUsed in 8 repos~2.6k tokens
    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 Cost Tuning

What does Apollo Cost Tuning do?

Optimize Apollo.io costs and credit usage. An agent skill from jeremylongshore/tons-of-skills-marketplace. Apollo Cost Tuning is an agent skill from jeremylongshore/tons-of-skills-marketplace.io costs and credit usage.

When should I use Apollo Cost Tuning?

Apollo Cost Tuning fits situations like: managing Apollo credits; reducing API costs; optimizing subscription usage; with phrases like apollo cost.

How do I install Apollo Cost Tuning in Claude Code?

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

How do I install Apollo Cost Tuning in Codex?

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

Can I use Apollo Cost Tuning 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-cost-tuning -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-cost-tuning, .gemini/skills/apollo-cost-tuning, .github/skills/apollo-cost-tuning and .opencode/skills/apollo-cost-tuning in your project.

What does Apollo Cost Tuning need to run?

Going by SKILL.md and its folder, Apollo Cost Tuning needs credentials named APOLLO_API_KEY. Our summary lists: Node.js; A credential in APOLLO_API_KEY. Its frontmatter pre-approves these tools: Read, Write, Edit, Bash(gh:*), Bash(curl:*). Compatibility (from SKILL.md): Designed for Claude Code.

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

Is Apollo Cost Tuning 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 Cost Tuning use?

Apollo Cost Tuning 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 Cost Tuning 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.5k tokens, read only when the agent opens those files.

What are the alternatives to Apollo Cost Tuning?

Skills that share tags, products or a category with Apollo Cost Tuning: Nodejs Backend Patterns (ever-works/ever-works, 162 stars), API Designer (Jeffallan/claude-skills, 12k stars), GraphQL Operations with Codegen (ChrisWiles/claude-code-showcase, 6.1k stars) and Supabase (curvenote/curvenote, 170 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Apollo Cost Tuning?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,827 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 10, 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.