[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CHB7EH52PVSXGHE13MT1TX":3,"skill-same:01M6CHB7EH52PVSXGHE13MT1TX":72},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":40,"linkOnly":41,"markdownContent":42,"markdownBody":43,"frontMatter":44,"refName":49,"commitSha":50,"skillDirectory":51,"forksCount":52,"repositoryHtmlUrl":53,"repositoryHomepageUrl":6,"ownerHtmlUrl":54,"ownerBlogUrl":55,"ownerDescription":56,"updatedAt":57,"install":58,"resources":71},"01M6CHB7EH52PVSXGHE13MT1TX","apollo-cost-tuning",null,"Optimize Apollo.io costs and credit usage.\nUse when managing Apollo credits, reducing API costs,\nor optimizing subscription usage.\nTrigger with phrases like \"apollo cost\", \"apollo credits\",\n\"apollo billing\", \"reduce apollo costs\", \"apollo usage\".","Dicklesworthstone\u002Fpi_agent_rust","Dicklesworthstone","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F35050222?v=4","01M6CG26AR942CSVMN1M5E3DSE","Jeff Emanuel","01M6CG26EPP71PSHW1VDS71121",1992,"MIT","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Fplugins-community\u002Fplugins\u002Fsaas-packs\u002Fapollo-pack\u002Fskills\u002Fapollo-cost-tuning\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39],"tuning","apollo cost tuning","cost","apollo","when","reduce","usage","with","billing","trigger","io","optimize","credits","use","edit","write","read","curl","gh","Bash","api","2026-11-10 10:12:30",false,"---\nname: apollo-cost-tuning\ndescription: |\n  Optimize Apollo.io costs and credit usage.\n  Use when managing Apollo credits, reducing API costs,\n  or optimizing subscription usage.\n  Trigger with phrases like \"apollo cost\", \"apollo credits\",\n  \"apollo billing\", \"reduce apollo costs\", \"apollo usage\".\nallowed-tools: Read, Write, Edit, Bash(gh:*), Bash(curl:*)\nversion: 1.0.0\nlicense: MIT\nauthor: Jeremy Longshore \u003Cjeremy@intentsolutions.io>\n---\n\n# Apollo Cost Tuning\n\n## Overview\nOptimize Apollo.io costs through efficient credit usage, smart caching, deduplication, and usage monitoring.\n\n## Apollo Pricing Model\n\n| Feature | Credit Cost | Notes |\n|---------|-------------|-------|\n| People Search | 1 credit\u002Fresult | Paginated results |\n| Email Reveal | 1 credit\u002Femail | First reveal only |\n| Person Enrichment | 1 credit\u002Fperson | Fresh data |\n| Org Enrichment | 1 credit\u002Forg | Company data |\n| Sequence Emails | Included | Plan limits apply |\n| Export | Varies | Bulk operations |\n\n## Cost Reduction Strategies\n\n### 1. Aggressive Caching\n\n```typescript\n\u002F\u002F src\u002Flib\u002Fapollo\u002Fcost-aware-cache.ts\nimport { LRUCache } from 'lru-cache';\n\ninterface CachedContact {\n  data: any;\n  fetchedAt: Date;\n  creditCost: number;\n}\n\nclass CostAwareCache {\n  private cache: LRUCache\u003Cstring, CachedContact>;\n  private creditsSaved = 0;\n\n  constructor() {\n    this.cache = new LRUCache({\n      max: 10000,\n      ttl: 7 * 24 * 60 * 60 * 1000, \u002F\u002F 7 days for contact data\n    });\n  }\n\n  getContact(email: string): CachedContact | null {\n    const cached = this.cache.get(email);\n    if (cached) {\n      this.creditsSaved++;\n      console.log(`Cache hit for ${email}. Total credits saved: ${this.creditsSaved}`);\n    }\n    return cached || null;\n  }\n\n  setContact(email: string, data: any, creditCost: number = 1): void {\n    this.cache.set(email, {\n      data,\n      fetchedAt: new Date(),\n      creditCost,\n    });\n  }\n\n  getStats() {\n    return {\n      entriesCount: this.cache.size,\n      creditsSaved: this.creditsSaved,\n      estimatedSavings: this.creditsSaved * 0.01, \u002F\u002F Assuming $0.01\u002Fcredit\n    };\n  }\n}\n\nexport const costAwareCache = new CostAwareCache();\n```\n\n### 2. Deduplication\n\n```typescript\n\u002F\u002F src\u002Flib\u002Fapollo\u002Fdeduplication.ts\nclass DeduplicationService {\n  private seenEmails = new Set\u003Cstring>();\n  private seenDomains = new Set\u003Cstring>();\n\n  async enrichContactSafe(email: string): Promise\u003Cany> {\n    \u002F\u002F Check if already enriched\n    if (this.seenEmails.has(email)) {\n      return costAwareCache.getContact(email);\n    }\n\n    \u002F\u002F Check cache first\n    const cached = costAwareCache.getContact(email);\n    if (cached) {\n      return cached.data;\n    }\n\n    \u002F\u002F Fetch and cache\n    const result = await apollo.enrichPerson({ email });\n    costAwareCache.setContact(email, result, 1);\n    this.seenEmails.add(email);\n\n    return result;\n  }\n\n  async enrichOrgSafe(domain: string): Promise\u003Cany> {\n    const normalizedDomain = domain.toLowerCase().replace(\u002F^www\\.\u002F, '');\n\n    if (this.seenDomains.has(normalizedDomain)) {\n      return costAwareCache.getContact(`org:${normalizedDomain}`);\n    }\n\n    const cached = costAwareCache.getContact(`org:${normalizedDomain}`);\n    if (cached) {\n      return cached.data;\n    }\n\n    const result = await apollo.enrichOrganization(normalizedDomain);\n    costAwareCache.setContact(`org:${normalizedDomain}`, result, 1);\n    this.seenDomains.add(normalizedDomain);\n\n    return result;\n  }\n}\n\nexport const dedup = new DeduplicationService();\n```\n\n### 3. Smart Search Strategies\n\n```typescript\n\u002F\u002F src\u002Flib\u002Fapollo\u002Fcost-efficient-search.ts\n\n\u002F**\n * Cost-efficient search: Start broad, then narrow\n * Uses fewer credits by doing initial filtering before enrichment\n *\u002F\nexport async function costEfficientLeadSearch(criteria: LeadCriteria): Promise\u003CLead[]> {\n  \u002F\u002F Step 1: Search without enrichment (cheaper)\n  const searchResults = await apollo.searchPeople({\n    q_organization_domains: criteria.domains,\n    person_titles: criteria.titles,\n    per_page: 100,\n    \u002F\u002F Don't request emails yet - just basic info\n  });\n\n  \u002F\u002F Step 2: Score and filter locally\n  const scoredLeads = searchResults.people\n    .map(person => ({\n      ...person,\n      score: calculateLeadScore(person, criteria),\n    }))\n    .filter(lead => lead.score >= criteria.minScore)\n    .sort((a, b) => b.score - a.score)\n    .slice(0, criteria.maxEnrichments || 25);\n\n  \u002F\u002F Step 3: Only enrich high-quality leads\n  const enrichedLeads = await Promise.all(\n    scoredLeads.map(async lead => {\n      if (!lead.email) {\n        \u002F\u002F Only spend credit on email reveal if needed\n        const enriched = await dedup.enrichContactSafe(lead.id);\n        return { ...lead, ...enriched };\n      }\n      return lead;\n    })\n  );\n\n  return enrichedLeads;\n}\n\nfunction calculateLeadScore(person: any, criteria: LeadCriteria): number {\n  let score = 0;\n\n  \u002F\u002F Title match\n  if (criteria.titles?.some(t =>\n    person.title?.toLowerCase().includes(t.toLowerCase())\n  )) {\n    score += 30;\n  }\n\n  \u002F\u002F Seniority\n  if (['vp', 'director', 'c-level'].includes(person.seniority)) {\n    score += 25;\n  }\n\n  \u002F\u002F Has LinkedIn\n  if (person.linkedin_url) {\n    score += 15;\n  }\n\n  \u002F\u002F Company size fit\n  const employees = person.organization?.estimated_num_employees || 0;\n  if (employees >= criteria.minEmployees && employees \u003C= criteria.maxEmployees) {\n    score += 20;\n  }\n\n  \u002F\u002F Already has email (no enrichment needed)\n  if (person.email) {\n    score += 10;\n  }\n\n  return score;\n}\n```\n\n### 4. Usage Monitoring\n\n```typescript\n\u002F\u002F src\u002Flib\u002Fapollo\u002Fusage-tracker.ts\ninterface UsageRecord {\n  timestamp: Date;\n  operation: string;\n  credits: number;\n  endpoint: string;\n}\n\nclass UsageTracker {\n  private records: UsageRecord[] = [];\n  private monthlyBudget: number;\n  private alertThreshold: number;\n\n  constructor(monthlyBudget: number = 10000, alertThreshold: number = 0.8) {\n    this.monthlyBudget = monthlyBudget;\n    this.alertThreshold = alertThreshold;\n  }\n\n  track(operation: string, credits: number, endpoint: string): void {\n    this.records.push({\n      timestamp: new Date(),\n      operation,\n      credits,\n      endpoint,\n    });\n\n    this.checkBudget();\n  }\n\n  private checkBudget(): void {\n    const monthlyUsage = this.getMonthlyUsage();\n    const usagePercent = monthlyUsage \u002F this.monthlyBudget;\n\n    if (usagePercent >= this.alertThreshold) {\n      console.warn(`Apollo usage alert: ${(usagePercent * 100).toFixed(1)}% of monthly budget used`);\n      \u002F\u002F Could trigger webhook, Slack notification, etc.\n    }\n\n    if (usagePercent >= 1) {\n      console.error('Apollo monthly budget exceeded!');\n    }\n  }\n\n  getMonthlyUsage(): number {\n    const startOfMonth = new Date();\n    startOfMonth.setDate(1);\n    startOfMonth.setHours(0, 0, 0, 0);\n\n    return this.records\n      .filter(r => r.timestamp >= startOfMonth)\n      .reduce((sum, r) => sum + r.credits, 0);\n  }\n\n  getUsageReport(): UsageReport {\n    const monthly = this.getMonthlyUsage();\n    const byEndpoint = this.records.reduce((acc, r) => {\n      acc[r.endpoint] = (acc[r.endpoint] || 0) + r.credits;\n      return acc;\n    }, {} as Record\u003Cstring, number>);\n\n    return {\n      monthlyUsage: monthly,\n      monthlyBudget: this.monthlyBudget,\n      usagePercent: (monthly \u002F this.monthlyBudget) * 100,\n      byEndpoint,\n      projectedMonthlyUsage: this.projectMonthlyUsage(),\n      cacheSavings: costAwareCache.getStats().creditsSaved,\n    };\n  }\n\n  private projectMonthlyUsage(): number {\n    const now = new Date();\n    const dayOfMonth = now.getDate();\n    const daysInMonth = new Date(now.getFullYear(), now.getMonth() + 1, 0).getDate();\n\n    const currentUsage = this.getMonthlyUsage();\n    return (currentUsage \u002F dayOfMonth) * daysInMonth;\n  }\n}\n\nexport const usageTracker = new UsageTracker(\n  parseInt(process.env.APOLLO_MONTHLY_BUDGET || '10000'),\n  parseFloat(process.env.APOLLO_ALERT_THRESHOLD || '0.8')\n);\n```\n\n### 5. Budget-Aware Client\n\n```typescript\n\u002F\u002F src\u002Flib\u002Fapollo\u002Fbudget-client.ts\nexport class BudgetAwareApolloClient {\n  private dailyLimit: number;\n  private todayUsage = 0;\n  private lastResetDate: string = '';\n\n  constructor(dailyLimit: number = 500) {\n    this.dailyLimit = dailyLimit;\n  }\n\n  private checkDailyLimit(): void {\n    const today = new Date().toISOString().split('T')[0];\n    if (today !== this.lastResetDate) {\n      this.todayUsage = 0;\n      this.lastResetDate = today;\n    }\n\n    if (this.todayUsage >= this.dailyLimit) {\n      throw new Error('Daily Apollo credit limit reached. Try again tomorrow.');\n    }\n  }\n\n  async searchPeople(params: any): Promise\u003Cany> {\n    this.checkDailyLimit();\n\n    const result = await apollo.searchPeople(params);\n    const creditsUsed = result.people.length;\n    this.todayUsage += creditsUsed;\n    usageTracker.track('search', creditsUsed, 'people\u002Fsearch');\n\n    return result;\n  }\n\n  async enrichPerson(params: any): Promise\u003Cany> {\n    this.checkDailyLimit();\n\n    \u002F\u002F Check cache first\n    const cacheKey = params.email || params.linkedin_url || params.id;\n    const cached = costAwareCache.getContact(cacheKey);\n    if (cached) {\n      return cached.data;\n    }\n\n    const result = await apollo.enrichPerson(params);\n    this.todayUsage += 1;\n    usageTracker.track('enrich', 1, 'people\u002Fenrich');\n    costAwareCache.setContact(cacheKey, result, 1);\n\n    return result;\n  }\n\n  getRemainingCredits(): number {\n    return this.dailyLimit - this.todayUsage;\n  }\n}\n\nexport const budgetClient = new BudgetAwareApolloClient();\n```\n\n## Cost Optimization Checklist\n\n- [ ] 7-day cache for contact data\n- [ ] Deduplication for emails and domains\n- [ ] Score leads before enrichment\n- [ ] Daily\u002Fmonthly usage limits\n- [ ] Usage alerts at 80% threshold\n- [ ] Cost metrics in monitoring dashboard\n- [ ] Regular usage report reviews\n- [ ] Team-level budget allocation\n\n## Output\n- Cost-aware caching strategy\n- Deduplication service\n- Smart search scoring\n- Usage tracking and alerts\n- Budget-aware API client\n\n## Error Handling\n| Issue | Resolution |\n|-------|------------|\n| Budget exceeded | Pause operations, alert team |\n| High cache misses | Extend TTL, review patterns |\n| Duplicate enrichments | Audit dedup logic |\n| Unexpected costs | Review usage reports |\n\n## Resources\n- [Apollo Pricing](https:\u002F\u002Fwww.apollo.io\u002Fpricing)\n- [Apollo Credit System](https:\u002F\u002Fknowledge.apollo.io\u002Fhc\u002Fen-us\u002Farticles\u002F4415144183053)\n- [Usage Dashboard](https:\u002F\u002Fapp.apollo.io\u002Fsettings\u002Fbilling)\n\n## Next Steps\nProceed to `apollo-reference-architecture` for architecture patterns.\n","# Apollo Cost Tuning\n\n## Overview\nOptimize Apollo.io costs through efficient credit usage, smart caching, deduplication, and usage monitoring.\n\n## Apollo Pricing Model\n\n| Feature | Credit Cost | Notes |\n|---------|-------------|-------|\n| People Search | 1 credit\u002Fresult | Paginated results |\n| Email Reveal | 1 credit\u002Femail | First reveal only |\n| Person Enrichment | 1 credit\u002Fperson | Fresh data |\n| Org Enrichment | 1 credit\u002Forg | Company data |\n| Sequence Emails | Included | Plan limits apply |\n| Export | Varies | Bulk operations |\n\n## Cost Reduction Strategies\n\n### 1. Aggressive Caching\n\n```typescript\n\u002F\u002F src\u002Flib\u002Fapollo\u002Fcost-aware-cache.ts\nimport { LRUCache } from 'lru-cache';\n\ninterface CachedContact {\n  data: any;\n  fetchedAt: Date;\n  creditCost: number;\n}\n\nclass CostAwareCache {\n  private cache: LRUCache\u003Cstring, CachedContact>;\n  private creditsSaved = 0;\n\n  constructor() {\n    this.cache = new LRUCache({\n      max: 10000,\n      ttl: 7 * 24 * 60 * 60 * 1000, \u002F\u002F 7 days for contact data\n    });\n  }\n\n  getContact(email: string): CachedContact | null {\n    const cached = this.cache.get(email);\n    if (cached) {\n      this.creditsSaved++;\n      console.log(`Cache hit for ${email}. Total credits saved: ${this.creditsSaved}`);\n    }\n    return cached || null;\n  }\n\n  setContact(email: string, data: any, creditCost: number = 1): void {\n    this.cache.set(email, {\n      data,\n      fetchedAt: new Date(),\n      creditCost,\n    });\n  }\n\n  getStats() {\n    return {\n      entriesCount: this.cache.size,\n      creditsSaved: this.creditsSaved,\n      estimatedSavings: this.creditsSaved * 0.01, \u002F\u002F Assuming $0.01\u002Fcredit\n    };\n  }\n}\n\nexport const costAwareCache = new CostAwareCache();\n```\n\n### 2. Deduplication\n\n```typescript\n\u002F\u002F src\u002Flib\u002Fapollo\u002Fdeduplication.ts\nclass DeduplicationService {\n  private seenEmails = new Set\u003Cstring>();\n  private seenDomains = new Set\u003Cstring>();\n\n  async enrichContactSafe(email: string): Promise\u003Cany> {\n    \u002F\u002F Check if already enriched\n    if (this.seenEmails.has(email)) {\n      return costAwareCache.getContact(email);\n    }\n\n    \u002F\u002F Check cache first\n    const cached = costAwareCache.getContact(email);\n    if (cached) {\n      return cached.data;\n    }\n\n    \u002F\u002F Fetch and cache\n    const result = await apollo.enrichPerson({ email });\n    costAwareCache.setContact(email, result, 1);\n    this.seenEmails.add(email);\n\n    return result;\n  }\n\n  async enrichOrgSafe(domain: string): Promise\u003Cany> {\n    const normalizedDomain = domain.toLowerCase().replace(\u002F^www\\.\u002F, '');\n\n    if (this.seenDomains.has(normalizedDomain)) {\n      return costAwareCache.getContact(`org:${normalizedDomain}`);\n    }\n\n    const cached = costAwareCache.getContact(`org:${normalizedDomain}`);\n    if (cached) {\n      return cached.data;\n    }\n\n    const result = await apollo.enrichOrganization(normalizedDomain);\n    costAwareCache.setContact(`org:${normalizedDomain}`, result, 1);\n    this.seenDomains.add(normalizedDomain);\n\n    return result;\n  }\n}\n\nexport const dedup = new DeduplicationService();\n```\n\n### 3. Smart Search Strategies\n\n```typescript\n\u002F\u002F src\u002Flib\u002Fapollo\u002Fcost-efficient-search.ts\n\n\u002F**\n * Cost-efficient search: Start broad, then narrow\n * Uses fewer credits by doing initial filtering before enrichment\n *\u002F\nexport async function costEfficientLeadSearch(criteria: LeadCriteria): Promise\u003CLead[]> {\n  \u002F\u002F Step 1: Search without enrichment (cheaper)\n  const searchResults = await apollo.searchPeople({\n    q_organization_domains: criteria.domains,\n    person_titles: criteria.titles,\n    per_page: 100,\n    \u002F\u002F Don't request emails yet - just basic info\n  });\n\n  \u002F\u002F Step 2: Score and filter locally\n  const scoredLeads = searchResults.people\n    .map(person => ({\n      ...person,\n      score: calculateLeadScore(person, criteria),\n    }))\n    .filter(lead => lead.score >= criteria.minScore)\n    .sort((a, b) => b.score - a.score)\n    .slice(0, criteria.maxEnrichments || 25);\n\n  \u002F\u002F Step 3: Only enrich high-quality leads\n  const enrichedLeads = await Promise.all(\n    scoredLeads.map(async lead => {\n      if (!lead.email) {\n        \u002F\u002F Only spend credit on email reveal if needed\n        const enriched = await dedup.enrichContactSafe(lead.id);\n        return { ...lead, ...enriched };\n      }\n      return lead;\n    })\n  );\n\n  return enrichedLeads;\n}\n\nfunction calculateLeadScore(person: any, criteria: LeadCriteria): number {\n  let score = 0;\n\n  \u002F\u002F Title match\n  if (criteria.titles?.some(t =>\n    person.title?.toLowerCase().includes(t.toLowerCase())\n  )) {\n    score += 30;\n  }\n\n  \u002F\u002F Seniority\n  if (['vp', 'director', 'c-level'].includes(person.seniority)) {\n    score += 25;\n  }\n\n  \u002F\u002F Has LinkedIn\n  if (person.linkedin_url) {\n    score += 15;\n  }\n\n  \u002F\u002F Company size fit\n  const employees = person.organization?.estimated_num_employees || 0;\n  if (employees >= criteria.minEmployees && employees \u003C= criteria.maxEmployees) {\n    score += 20;\n  }\n\n  \u002F\u002F Already has email (no enrichment needed)\n  if (person.email) {\n    score += 10;\n  }\n\n  return score;\n}\n```\n\n### 4. Usage Monitoring\n\n```typescript\n\u002F\u002F src\u002Flib\u002Fapollo\u002Fusage-tracker.ts\ninterface UsageRecord {\n  timestamp: Date;\n  operation: string;\n  credits: number;\n  endpoint: string;\n}\n\nclass UsageTracker {\n  private records: UsageRecord[] = [];\n  private monthlyBudget: number;\n  private alertThreshold: number;\n\n  constructor(monthlyBudget: number = 10000, alertThreshold: number = 0.8) {\n    this.monthlyBudget = monthlyBudget;\n    this.alertThreshold = alertThreshold;\n  }\n\n  track(operation: string, credits: number, endpoint: string): void {\n    this.records.push({\n      timestamp: new Date(),\n      operation,\n      credits,\n      endpoint,\n    });\n\n    this.checkBudget();\n  }\n\n  private checkBudget(): void {\n    const monthlyUsage = this.getMonthlyUsage();\n    const usagePercent = monthlyUsage \u002F this.monthlyBudget;\n\n    if (usagePercent >= this.alertThreshold) {\n      console.warn(`Apollo usage alert: ${(usagePercent * 100).toFixed(1)}% of monthly budget used`);\n      \u002F\u002F Could trigger webhook, Slack notification, etc.\n    }\n\n    if (usagePercent >= 1) {\n      console.error('Apollo monthly budget exceeded!');\n    }\n  }\n\n  getMonthlyUsage(): number {\n    const startOfMonth = new Date();\n    startOfMonth.setDate(1);\n    startOfMonth.setHours(0, 0, 0, 0);\n\n    return this.records\n      .filter(r => r.timestamp >= startOfMonth)\n      .reduce((sum, r) => sum + r.credits, 0);\n  }\n\n  getUsageReport(): UsageReport {\n    const monthly = this.getMonthlyUsage();\n    const byEndpoint = this.records.reduce((acc, r) => {\n      acc[r.endpoint] = (acc[r.endpoint] || 0) + r.credits;\n      return acc;\n    }, {} as Record\u003Cstring, number>);\n\n    return {\n      monthlyUsage: monthly,\n      monthlyBudget: this.monthlyBudget,\n      usagePercent: (monthly \u002F this.monthlyBudget) * 100,\n      byEndpoint,\n      projectedMonthlyUsage: this.projectMonthlyUsage(),\n      cacheSavings: costAwareCache.getStats().creditsSaved,\n    };\n  }\n\n  private projectMonthlyUsage(): number {\n    const now = new Date();\n    const dayOfMonth = now.getDate();\n    const daysInMonth = new Date(now.getFullYear(), now.getMonth() + 1, 0).getDate();\n\n    const currentUsage = this.getMonthlyUsage();\n    return (currentUsage \u002F dayOfMonth) * daysInMonth;\n  }\n}\n\nexport const usageTracker = new UsageTracker(\n  parseInt(process.env.APOLLO_MONTHLY_BUDGET || '10000'),\n  parseFloat(process.env.APOLLO_ALERT_THRESHOLD || '0.8')\n);\n```\n\n### 5. Budget-Aware Client\n\n```typescript\n\u002F\u002F src\u002Flib\u002Fapollo\u002Fbudget-client.ts\nexport class BudgetAwareApolloClient {\n  private dailyLimit: number;\n  private todayUsage = 0;\n  private lastResetDate: string = '';\n\n  constructor(dailyLimit: number = 500) {\n    this.dailyLimit = dailyLimit;\n  }\n\n  private checkDailyLimit(): void {\n    const today = new Date().toISOString().split('T')[0];\n    if (today !== this.lastResetDate) {\n      this.todayUsage = 0;\n      this.lastResetDate = today;\n    }\n\n    if (this.todayUsage >= this.dailyLimit) {\n      throw new Error('Daily Apollo credit limit reached. Try again tomorrow.');\n    }\n  }\n\n  async searchPeople(params: any): Promise\u003Cany> {\n    this.checkDailyLimit();\n\n    const result = await apollo.searchPeople(params);\n    const creditsUsed = result.people.length;\n    this.todayUsage += creditsUsed;\n    usageTracker.track('search', creditsUsed, 'people\u002Fsearch');\n\n    return result;\n  }\n\n  async enrichPerson(params: any): Promise\u003Cany> {\n    this.checkDailyLimit();\n\n    \u002F\u002F Check cache first\n    const cacheKey = params.email || params.linkedin_url || params.id;\n    const cached = costAwareCache.getContact(cacheKey);\n    if (cached) {\n      return cached.data;\n    }\n\n    const result = await apollo.enrichPerson(params);\n    this.todayUsage += 1;\n    usageTracker.track('enrich', 1, 'people\u002Fenrich');\n    costAwareCache.setContact(cacheKey, result, 1);\n\n    return result;\n  }\n\n  getRemainingCredits(): number {\n    return this.dailyLimit - this.todayUsage;\n  }\n}\n\nexport const budgetClient = new BudgetAwareApolloClient();\n```\n\n## Cost Optimization Checklist\n\n- [ ] 7-day cache for contact data\n- [ ] Deduplication for emails and domains\n- [ ] Score leads before enrichment\n- [ ] Daily\u002Fmonthly usage limits\n- [ ] Usage alerts at 80% threshold\n- [ ] Cost metrics in monitoring dashboard\n- [ ] Regular usage report reviews\n- [ ] Team-level budget allocation\n\n## Output\n- Cost-aware caching strategy\n- Deduplication service\n- Smart search scoring\n- Usage tracking and alerts\n- Budget-aware API client\n\n## Error Handling\n| Issue | Resolution |\n|-------|------------|\n| Budget exceeded | Pause operations, alert team |\n| High cache misses | Extend TTL, review patterns |\n| Duplicate enrichments | Audit dedup logic |\n| Unexpected costs | Review usage reports |\n\n## Resources\n- [Apollo Pricing](https:\u002F\u002Fwww.apollo.io\u002Fpricing)\n- [Apollo Credit System](https:\u002F\u002Fknowledge.apollo.io\u002Fhc\u002Fen-us\u002Farticles\u002F4415144183053)\n- [Usage Dashboard](https:\u002F\u002Fapp.apollo.io\u002Fsettings\u002Fbilling)\n\n## Next Steps\nProceed to `apollo-reference-architecture` for architecture patterns.\n",{"name":5,"author":45,"license":15,"version":46,"description":47,"allowed-tools":48},"Jeremy Longshore \u003Cjeremy@intentsolutions.io>","1.0.0","Optimize Apollo.io costs and credit usage.\nUse when managing Apollo credits, reducing API costs,\nor optimizing subscription usage.\nTrigger with phrases like \"apollo cost\", \"apollo credits\",\n\"apollo billing\", \"reduce apollo costs\", \"apollo usage\".\n","Read, Write, Edit, Bash(gh:*), Bash(curl:*)","main","7439377908fdee98c9bb5863391212b95453de95","tests\u002Fext_conformance\u002Fartifacts\u002Fplugins-community\u002Fplugins\u002Fsaas-packs\u002Fapollo-pack\u002Fskills\u002Fapollo-cost-tuning",233,"https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust","https:\u002F\u002Fgithub.com\u002FDicklesworthstone","https:\u002F\u002Fwww.jeffreyemanuel.com\u002F","Building in NY","2026-11-15 01:54:15",{"source":8,"skillName":5,"commands":59,"prompt":69,"zipAvailable":70},[60,63,66],{"tool":61,"command":62},"npx","npx skills add Dicklesworthstone\u002Fpi_agent_rust --skill apollo-cost-tuning",{"tool":64,"command":65},"bunx","bunx skills add Dicklesworthstone\u002Fpi_agent_rust --skill apollo-cost-tuning",{"tool":67,"command":68},"pnpm","pnpm dlx skills add Dicklesworthstone\u002Fpi_agent_rust --skill apollo-cost-tuning","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Fplugins-community\u002Fplugins\u002Fsaas-packs\u002Fapollo-pack\u002Fskills\u002Fapollo-cost-tuning\u002FSKILL.md",true,[],[73,106,141,164,190,217],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":77,"licenseFileUrl":78,"sourceHtmlUrl":79,"categories":80,"keywords":86,"publishedAt":105},"01M6FCR7G5A005P364Z6ZWCJDP","theme-factory","Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors\u002Ffonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.","Apache-2.0","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fcreative-design\u002Ftheme-factory\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fcreative-design\u002Ftheme-factory\u002FSKILL.md",[81],{"categoryNo":82,"categoryName":83,"taxonomyType":84,"taxonomyTypeDesc":85},"01JBSEEDCAT000000000000015","视觉设计","SCENARIO","使用场景",[87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,26,103,104],"theme factory","factory","theme","docs","toolkit","generate","artifacts","SET","fly","slides","landing","html","styling","artifact","pages","themes","you","fonts","2026-11-11 15:11:14",{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":77,"licenseFileUrl":110,"sourceHtmlUrl":111,"categories":112,"keywords":116,"publishedAt":40},"01M6FEGPPK0ZTKCCM0R3E3KS33","web-artifacts-builder","Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn\u002Fui). Use for complex artifacts requiring state management, routing, or shadcn\u002Fui components - not for simple single-file HTML\u002FJSX artifacts.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Futilities\u002Fweb-artifacts-builder\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Futilities\u002Fweb-artifacts-builder\u002FSKILL.md",[113],{"categoryNo":114,"categoryName":115,"taxonomyType":84,"taxonomyTypeDesc":85},"01JBSEEDCAT000000000000009","前端开发",[117,118,93,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,32,98,134,135,136,137,138,139,140],"web artifacts builder","web","artifacts builder","builder","frontend","css","components","react","component","routing","state management","state","shadcn","file","ui","Tools","Tailwind","single-file","simple","ui components","multi","for","jsx","suite",{"skillNo":142,"name":143,"nameZh":6,"description":144,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":77,"licenseFileUrl":145,"sourceHtmlUrl":146,"categories":147,"keywords":152,"publishedAt":40},"01M6FEE9VTK1W4GY21AKREJXRG","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fsecurity\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fsecurity\u002Fwebapp-testing\u002FSKILL.md",[148,151],{"categoryNo":149,"categoryName":150,"taxonomyType":84,"taxonomyTypeDesc":85},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":114,"categoryName":115,"taxonomyType":84,"taxonomyTypeDesc":85},[153,154,155,121,156,157,118,158,91,159,131,160,161,162,163,26,138],"testing","webapp testing","webapp","screenshots","playwright","debugging","browser","logs","applications","behavior","local",{"skillNo":165,"name":166,"nameZh":6,"description":167,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":168,"sourceHtmlUrl":169,"categories":170,"keywords":171,"publishedAt":40},"01M6FE20F7ZTQBFWKF4MPJ2SBX","neuropixels-analysis","Neuropixels neural recording analysis. Load SpikeGLX\u002FOpenEphys data, preprocess, motion correction, Kilosort4 spike sorting, quality metrics, Allen\u002FIBL curation, AI-assisted visual analysis, for Neuropixels 1.0\u002F2.0 extracellular electrophysiology. Use when working with neural recordings, spike sorting, extracellular electrophysiology, or when the user mentions Neuropixels, SpikeGLX, Open Ephys, Kilosort, quality metrics, or unit curation.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fneuropixels-analysis\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fneuropixels-analysis\u002FSKILL.md",[],[172,173,174,175,176,177,178,179,32,180,181,182,183,184,185,186,26,187,188,189,138,23],"analysis","neuropixels analysis","spike","metrics","data","open","quality","user","recordings","Neural","motion","visual","quality metrics","unit","sorting","curation","recording","load",{"skillNo":191,"name":192,"nameZh":6,"description":193,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":77,"licenseFileUrl":194,"sourceHtmlUrl":195,"categories":196,"keywords":200,"publishedAt":40},"01M6FDP0PDK6F1GGX395C7625Z","skill-creator","Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fskill-creator\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fskill-creator\u002FSKILL.md",[197],{"categoryNo":198,"categoryName":199,"taxonomyType":84,"taxonomyTypeDesc":85},"01JBSEEDCAT000000000000023","Skill与智能体开发",[201,202,203,204,205,206,207,208,209,210,211,212,213,214,26,138,215,23,216],"skill creator","creator","workflows","create","update","capabilities","knowledge","tool","integrations","specialized","guide","new skill","existing skill","users","Existing","new",{"skillNo":218,"name":219,"nameZh":6,"description":220,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":221,"sourceHtmlUrl":222,"categories":223,"keywords":225,"publishedAt":40},"01M6FDM8Y7VK7NYG9SM7QPA3PW","notebooklm","Use this skill to query your Google NotebookLM notebooks directly from Claude Code for source-grounded, citation-backed answers from Gemini. Browser automation, library management, persistent auth. Drastically reduced hallucinations through document-only responses.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fnotebooklm\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fnotebooklm\u002FSKILL.md",[224],{"categoryNo":198,"categoryName":199,"taxonomyType":84,"taxonomyTypeDesc":85},[219,226,227,228,229,230,231,159,232,233,32,234,235,236,237,138,238],"google","browser automation","gemini","automation","auth","code","library","management","only","document","query","Citation","source"]