apollo-local-dev-loop
Configure Apollo.io local development workflow. Use when setting up development environment, testing API calls locally, or establishing team development practices. Trigger with phrases like "apollo local dev", "apollo development setup", "apollo dev environment", "apollo testing locally".
What this skill does
# Apollo Local Dev Loop
## Overview
Set up an efficient local development workflow for Apollo.io integrations. Includes sandbox API key support, MSW mock server for offline testing, request logging, and npm scripts for daily development. Apollo provides a **sandbox API token** that returns dummy data without consuming credits.
## Prerequisites
- Completed `apollo-install-auth` setup
- Node.js 18+
- Git repository initialized
## Instructions
### Step 1: Set Up Environment Files
Apollo offers a sandbox token for testing. Generate one at Settings > Integrations > API Keys > Sandbox.
```bash
# .env.example (commit this — team reference)
APOLLO_API_KEY=your-api-key-here
APOLLO_SANDBOX_KEY=your-sandbox-key-here
APOLLO_USE_SANDBOX=false
# .env (gitignored — copy from example)
cp .env.example .env
echo '.env' >> .gitignore
echo '.env.local' >> .gitignore
```
### Step 2: Create a Dev Client with Request Logging
```typescript
// src/apollo/dev-client.ts
import axios from 'axios';
import dotenv from 'dotenv';
dotenv.config();
const apiKey = process.env.APOLLO_USE_SANDBOX === 'true'
? process.env.APOLLO_SANDBOX_KEY
: process.env.APOLLO_API_KEY;
export const devClient = axios.create({
baseURL: 'https://api.apollo.io/api/v1',
headers: {
'Content-Type': 'application/json',
'x-api-key': apiKey!,
},
timeout: 30_000,
});
// Log all requests in development
devClient.interceptors.request.use((config) => {
console.log(`[Apollo] ${config.method?.toUpperCase()} ${config.url}`);
if (config.data) console.log('[Apollo] Body:', JSON.stringify(config.data, null, 2));
return config;
});
devClient.interceptors.response.use(
(res) => {
const remaining = res.headers['x-rate-limit-remaining'];
console.log(`[Apollo] ${res.status} ${res.config.url}${remaining ? ` — ${remaining} req remaining` : ''}`);
return res;
},
(err) => {
console.error(`[Apollo] ERROR ${err.response?.status}: ${err.response?.data?.message ?? err.message}`);
return Promise.reject(err);
},
);
```
### Step 3: Set Up MSW Mock Server for Offline Testing
```typescript
// src/mocks/apollo-handlers.ts
import { http, HttpResponse } from 'msw';
const BASE = 'https://api.apollo.io/api/v1';
export const apolloHandlers = [
// People Search (free endpoint)
http.post(`${BASE}/mixed_people/api_search`, () =>
HttpResponse.json({
people: [
{ id: 'mock-1', name: 'Jane Doe', title: 'VP Sales', organization: { name: 'Acme Corp' } },
{ id: 'mock-2', name: 'John Smith', title: 'Director Engineering', organization: { name: 'Acme Corp' } },
],
pagination: { page: 1, per_page: 25, total_entries: 2, total_pages: 1 },
}),
),
// People Enrichment
http.post(`${BASE}/people/match`, () =>
HttpResponse.json({
person: {
id: 'mock-enriched', name: 'Jane Doe', email: '[email protected]',
title: 'VP Sales', organization: { name: 'Acme Corp' },
phone_numbers: [{ sanitized_number: '+14155551234' }],
linkedin_url: 'https://www.linkedin.com/in/janedoe',
},
}),
),
// Organization Enrichment
http.get(`${BASE}/organizations/enrich`, ({ request }) => {
const url = new URL(request.url);
return HttpResponse.json({
organization: {
id: 'mock-org', name: 'Acme Corp', industry: 'Technology',
estimated_num_employees: 250, annual_revenue_printed: '$25M',
primary_domain: url.searchParams.get('domain') ?? 'acme.com',
},
});
}),
// Search for Sequences
http.post(`${BASE}/emailer_campaigns/search`, () =>
HttpResponse.json({
emailer_campaigns: [
{ id: 'seq-1', name: 'Q1 Outbound', active: true, num_steps: 4 },
],
}),
),
// Auth Health
http.get(`${BASE}/auth/health`, () =>
HttpResponse.json({ is_logged_in: true }),
),
];
```
```typescript
// src/mocks/server.ts
import { setupServer } from 'msw/node';
import { apolloHandlers } from './apollo-handlers';
export const mockServer = setupServer(...apolloHandlers);
```
### Step 4: Configure Vitest
```typescript
// vitest.config.ts
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: { setupFiles: ['./src/mocks/setup.ts'], environment: 'node' },
});
// src/mocks/setup.ts
import { mockServer } from './server';
import { beforeAll, afterAll, afterEach } from 'vitest';
beforeAll(() => mockServer.listen({ onUnhandledRequest: 'warn' }));
afterEach(() => mockServer.resetHandlers());
afterAll(() => mockServer.close());
```
```typescript
// src/__tests__/people-search.test.ts
import { describe, it, expect } from 'vitest';
import { devClient } from '../apollo/dev-client';
describe('Apollo People Search', () => {
it('returns contacts from mock server', async () => {
const { data } = await devClient.post('/mixed_people/api_search', {
q_organization_domains_list: ['acme.com'],
per_page: 10,
});
expect(data.people).toHaveLength(2);
expect(data.people[0].name).toBe('Jane Doe');
});
});
```
### Step 5: Add Development Scripts
```json
{
"scripts": {
"dev": "tsx watch src/index.ts",
"test": "vitest",
"test:watch": "vitest --watch",
"test:live": "APOLLO_USE_SANDBOX=false vitest --run",
"test:sandbox": "APOLLO_USE_SANDBOX=true vitest --run",
"apollo:check": "tsx src/scripts/verify-auth.ts",
"apollo:search": "tsx src/scripts/quick-search.ts"
}
}
```
## Output
- `.env.example` template with sandbox key support
- Dev client with request/response logging and rate-limit display
- MSW mock handlers for people search, enrichment, org enrichment, and sequences
- Vitest config with mock server setup/teardown
- npm scripts for dev, test, sandbox testing, and credential checks
## Error Handling
| Error | Cause | Solution |
|-------|-------|----------|
| Missing API Key | `.env` not loaded | Run `cp .env.example .env` and add your key |
| Mock Not Working | MSW not configured | Ensure `setupFiles` includes mock setup |
| Unexpected credits used | Sandbox mode off | Set `APOLLO_USE_SANDBOX=true` in `.env` |
| Stale Credentials | Key rotated in dashboard | Run `npm run apollo:check` to verify |
## Resources
- [Apollo Sandbox Testing](https://docs.apollo.io/docs/test-api-key)
- [MSW (Mock Service Worker)](https://mswjs.io/)
- [Vitest Testing Framework](https://vitest.dev/)
## Next Steps
Proceed to `apollo-sdk-patterns` for production-ready code patterns.
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.