apollo-reference-architecture
'Implement Apollo.io reference architecture.
Install / Use
npx skills add jeremylongshore/tons-of-skills-marketplace --skill apollo-reference-architectureInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
SalesSupported Platforms
Our assessment of apollo-reference-architecture
apollo-reference-architecture scores 86/100 on our quality scale, 29th of 40 Sales skills we index.
Its SKILL.md is 9.6 KB long, well organised into 15 sections with 6 code examples: a thorough specification that gives an agent plenty to work with.
With 2,785 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 44 days ago, so apollo-reference-architecture is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands.
Automated pattern scan on 2026-11-07. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
apollo-reference-architecture compared with similar skills
All 4 of these similar skills score higher than apollo-reference-architecture; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| apollo-reference-architecture (this skill)by jeremylongshore | 86 | 2.8k | 44d ago | SKILL.md |
| taste-skillby Leonxlnx | 100 | 111.4k | 2d ago | CLAUDE.md |
| algorithmic-artby anthropics | 100 | 177.9k | 46d ago | SKILL.md |
| pptxby anthropics | 100 | 177.9k | 46d ago | SKILL.md |
| designby nextlevelbuilder | 100 | 143.4k | 7d ago | SKILL.md |
Frequently asked questions
- How do I install apollo-reference-architecture?
- Run
npx skills add jeremylongshore/tons-of-skills-marketplace --skill apollo-reference-architecture. The install tabs above show the steps for each supported agent. - Which AI agents does apollo-reference-architecture work with?
- It is written for Claude Code, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is apollo-reference-architecture safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is apollo-reference-architecture still maintained?
- The repository was last updated 44 days ago, so apollo-reference-architecture is actively maintained.
Skill content
View source on GitHubname: apollo-reference-architecture description: 'Implement Apollo.io reference architecture.
Use when designing Apollo integrations, establishing patterns,
or building production-grade sales intelligence systems.
Trigger with phrases like "apollo architecture", "apollo system design",
"apollo integration patterns", "apollo best practices architecture".
' allowed-tools: Read, Write, Edit, Bash(gh:), Bash(curl:) version: 1.13.0 license: MIT author: Jeremy Longshore jeremy@intentsolutions.io tags:
- saas
- apollo
- apollo-reference compatibility: Designed for Claude Code
Apollo Reference Architecture
Overview
Production-ready reference architecture for Apollo.io integrations. Layered design with API client, service layer, background jobs, database models, CRM sync, and deals pipeline — all built around Apollo's REST API with correct endpoints and x-api-key authentication.
Prerequisites
- Apollo master API key
- Node.js 18+ with TypeScript
- PostgreSQL for data layer
- Redis for job queues
Instructions
Step 1: Architecture Diagram
┌───────────────────────────────────────────────┐
│ API Layer │ Express routes
│ POST /api/leads/search GET /api/org/:d │ POST /api/deals
├───────────────────────────────────────────────┤
│ Service Layer │ Business logic
│ LeadService EnrichService DealService │ SequenceService
├───────────────────────────────────────────────┤
│ Client Layer │ Apollo API wrapper
│ ApolloClient RateLimiter Cache │ CreditTracker
├───────────────────────────────────────────────┤
│ Background Jobs │ BullMQ queues
│ EnrichJob SyncJob StageChangeJob │ TaskCreatorJob
├───────────────────────────────────────────────┤
│ Data Layer │ Prisma/TypeORM
│ Contact Organization Deal AuditLog │
└───────────────────────────────────────────────┘
Step 2: Service Layer
// src/services/lead-service.ts
import { getApolloClient } from '../apollo/client';
import { withRetry } from '../apollo/retry';
import { cachedRequest } from '../apollo/cache';
export class LeadService {
private client = getApolloClient();
async searchPeople(params: { domains: string[]; titles?: string[]; seniorities?: string[]; page?: number }) {
return cachedRequest('/mixed_people/api_search',
() => withRetry(() => this.client.post('/mixed_people/api_search', {
q_organization_domains_list: params.domains,
person_titles: params.titles,
person_seniorities: params.seniorities,
page: params.page ?? 1, per_page: 100,
})),
params,
);
}
async enrichPerson(email: string) {
return withRetry(() => this.client.post('/people/match', { email }));
}
async enrichOrg(domain: string) {
return cachedRequest('/organizations/enrich',
() => withRetry(() => this.client.get('/organizations/enrich', { params: { domain } })),
{ domain },
);
}
}
Step 3: Deals/Opportunities Service
Apollo has a full Deals API for tracking revenue pipeline.
// src/services/deal-service.ts
export class DealService {
private client = getApolloClient();
async createDeal(params: {
name: string;
amount: number;
ownerId: string; // Apollo user ID
accountId?: string; // Apollo account ID
contactIds?: string[]; // Apollo contact IDs
stageId?: string; // Deal stage ID
}) {
const { data } = await this.client.post('/opportunities', {
name: params.name,
amount: params.amount,
owner_id: params.ownerId,
account_id: params.accountId,
contact_ids: params.contactIds,
opportunity_stage_id: params.stageId,
});
return { dealId: data.opportunity.id, name: data.opportunity.name };
}
async listDeals(page: number = 1) {
const { data } = await this.client.post('/opportunities/search', { page, per_page: 50 });
return data.opportunities.map((d: any) => ({
id: d.id, name: d.name, amount: d.amount,
stage: d.opportunity_stage?.name, owner: d.owner?.name,
}));
}
async getDealStages() {
const { data } = await this.client.get('/opportunity_stages');
return data.opportunity_stages.map((s: any) => ({ id: s.id, name: s.name, order: s.display_order }));
}
async updateDeal(dealId: string, updates: { amount?: number; stageId?: string }) {
await this.client.patch(`/opportunities/${dealId}`, {
amount: updates.amount,
opportunity_stage_id: updates.stageId,
});
}
}
Step 4: Background Job Processing
// src/jobs/enrichment-job.ts
import { Queue, Worker, Job } from 'bullmq';
import { LeadService } from '../services/lead-service';
const connection = { host: process.env.REDIS_HOST ?? 'localhost', port: 6379 };
export const enrichmentQueue = new Queue('apollo-enrichment', {
connection,
defaultJobOptions: {
attempts: 3,
backoff: { type: 'exponential', delay: 5000 },
removeOnComplete: 1000,
},
});
const leadService = new LeadService();
new Worker('apollo-enrichment', async (job: Job) => {
switch (job.name) {
case 'enrich-person':
return leadService.enrichPerson(job.data.email);
case 'enrich-org':
return leadService.enrichOrg(job.data.domain);
case 'bulk-search': {
const results: any[] = [];
for (const domain of job.data.domains) {
const { data } = await leadService.searchPeople({ domains: [domain] });
results.push(...data.people);
await job.updateProgress(results.length);
}
return { total: results.length };
}
}
}, { connection, concurrency: 3, limiter: { max: 50, duration: 60_000 } });
Step 5: Database Model
// src/models/contact.ts (Prisma schema excerpt)
// model Contact {
// id String @id @default(cuid())
// apolloId String @unique
// emailHash String @unique // keyed/blind index; not the email itself
// contactCiphertext Bytes // application-encrypted, minimized contact fields
// organizationId String?
// enrichedAt DateTime?
// createdAt DateTime @default(now())
// updatedAt DateTime @updatedAt
// }
// TypeORM version
import { Entity, Column, PrimaryColumn, CreateDateColumn, UpdateDateColumn } from 'typeorm';
@Entity('contacts')
export class Contact {
@PrimaryColumn() apolloId: string;
@Column({ unique: true }) emailHash: string; // keyed hash for deduplication
@Column({ type: 'bytea' }) contactCiphertext: Buffer; // app-encrypted fields only
@Column({ nullable: true }) organizationId: string;
@Column({ nullable: true }) enrichedAt: Date;
@CreateDateColumn() createdAt: Date;
@UpdateDateColumn() updatedAt: Date;
}
Step 6: API Routes
// src/api/routes.ts
import { Router } from 'express';
import { LeadService } from '../services/lead-service';
import { DealService } from '../services/deal-service';
const router = Router();
const leads = new LeadService();
const deals = new DealService();
router.post('/api/leads/search', async (req, res) => {
const { data } = await leads.searchPeople(req.body);
res.json({ leads: data.people, pagination: data.pagination });
});
router.post('/api/leads/enrich', async (req, res) => {
const { data } = await leads.enrichPerson(req.body.email);
res.json({ contact: data.person });
});
router.get('/api/organizations/:domain', async (req, res) => {
const { data } = await leads.enrichOrg(req.params.domain);
res.json({ organization: data.organization });
});
router.post('/api/deals', async (req, res) => {
const result = await deals.createDeal(req.body);
res.json(result);
});
router.get('/api/deals', async (req, res) => {
const list = await deals.listDeals(parseInt(req.query.page as string) || 1);
res.json({ deals: list });
});
export { router };
Output
- Layered architecture: API, Service, Client, Jobs, Data
LeadServicewith cached search and retried enrichmentDealServicewith create, list, update, and stage management- BullMQ background jobs for async enrichment
- Database model (Prisma + TypeORM)
- Express API routes for search, enrichment, and deals
Examples
For an initial architecture rollout, begin with free search behind an authenticated service boundary, retain only the organization and lead fields the approved use case needs, and encrypt contact data before it enters the database. Store a keyed hash only for deduplication; never persist raw Apollo responses or expose enrichment routes directly without authorization, budget, and audit controls. Run a small staging queue with an explicit dead-letter review path and validate that retrying a job cannot create duplicate contacts or deals. If encryption, authorization, budget enforcement, or idempotency is not demonstrably active, stop the rollout and keep the workflow in the non-production environment.
Error Handling
| Layer | Strategy | |-------|----------| | Client | Retry with backoff, circuit breaker for prolonged outages | | Service | Cache fallback on failure, credit budget enforcement | | Jobs | 3 retries with exponential backoff, dead letter after max | | API | Structured JSON error responses with error codes |
Resources
Next Steps
Proceed to apollo-multi-env-setup for environment configuration.
Related Skills
taste-skill
111.4kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
pptx
177.9kUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an em…
design
143.4kComprehensive design skill: brand identity, design tokens, UI styling, logo generation (55 styles, Gemini, Atlas Cloud, or MuAPI AI), corporate identity program (50 deliverables, CIP mockups), HTML presentations (Chart.js), banner design (22 styles, social/ads/web/print), icon design (15 styles, SVG…
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
