/intercom-pack:intercom-performance-tuningfrom intercom-pack
Optimizes Intercom API performance with response caching, efficient search queries, and cursor-based pagination. Use when Intercom responses are slow or for optimizing request throughput.
Ships in intercom-pack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Optimize Intercom API performance through response caching, efficient search queries, cursor-based pagination, connection pooling, and request batching.
intercom-client SDK installedAll requests authenticate with an Intercom access token passed as a bearer token. Store it as INTERCOM_ACCESS_TOKEN in the environment and let the SDK read it — never hardcode it:
const client = new IntercomClient({ token: process.env.INTERCOM_ACCESS_TOKEN! });
For raw fetch calls, send Authorization: Bearer ${token}.
| Operation | Typical P50 | Typical P95 | Notes |
|---|---|---|---|
GET /me (health check) | 50ms | 150ms | Lightest endpoint |
GET /contacts/:id | 80ms | 200ms | Single lookup |
POST /contacts/search | 120ms | 400ms | Depends on query complexity |
GET /conversations/:id | 100ms | 300ms | Heavier with parts (up to 500) |
POST /contacts (create) | 150ms | 400ms | Write operation |
GET /contacts (list) | 100ms | 350ms | Paginated, 50 per page |
POST /messages | 200ms | 500ms | Triggers delivery pipeline |
Apply these six techniques in order of impact. Each has a complete, copy-pasteable implementation in references/implementation.md; the summaries and the caching skeleton below are enough to follow the workflow at a high level.
LRUCache (read-through), and invalidate on update or via webhook so cached data never goes stale. This is the single biggest win for read-heavy integrations.AND-combined query and request only the per_page you need (max 150), rather than fetching broadly and filtering client-side.startingAfter) to keep memory flat, and process in fixed-size batches.https.Agent (keepAlive: true) so you pay the TLS handshake cost once, not per request.p-queue bounded by concurrency + intervalCap so batches stay under the rate limit.measuredCall helper that emits a structured latency metric, so you can chart real P50/P95 against the baselines above.The read-through cache skeleton (Step 1) — the foundation everything else builds on:
import { LRUCache } from "lru-cache";
import { IntercomClient } from "intercom-client";
import { Intercom } from "intercom-client";
const contactCache = new LRUCache<string, Intercom.Contact>({
max: 5000,
ttl: 5 * 60 * 1000, // 5 minutes
});
const client = new IntercomClient({ token: process.env.INTERCOM_ACCESS_TOKEN! });
async function getContact(contactId: string): Promise<Intercom.Contact> {
const cached = contactCache.get(contactId);
if (cached) return cached;
const contact = await client.contacts.find({ contactId });
contactCache.set(contactId, contact);
return contact;
}
See references/implementation.md for the full code of all six steps, including invalidation, streaming pagination, connection pooling, the rate-aware queue, and the monitoring wrapper.
Applying these techniques produces:
Map<contactId, Contact>.{"metric":"intercom.api.call","operation":...,"duration_ms":...,"status":...}) ready to ship to your metrics pipeline and compare against the latency baselines table.| Issue | Cause | Solution |
|---|---|---|
| Cache stampede | Many concurrent cache misses | Use mutex/lock per key |
| Memory pressure | Cache too large | Set max on LRUCache |
| Stale data | TTL too long | Use webhook invalidation |
| Pagination timeouts | Large data set + slow network | Reduce per_page, add delays |
| Rate limit during batch | Too many parallel requests | Lower PQueue concurrency |
Quick reference — full runnable versions are in references/examples.md:
measuredCall to emit a per-call metric line.Minimal instrumentation example:
const contact = await measuredCall("contacts.find", () =>
client.contacts.find({ contactId: "abc123" })
);
// → {"metric":"intercom.api.call","operation":"contacts.find","duration_ms":84,"status":"success"}
For cost optimization, see the intercom-cost-tuning skill, which covers request-volume reduction, webhook-driven syncing instead of polling, and tiered caching to lower monthly API spend.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
intercom, api-performance, caching, pagination, search-optimization
24 skills in this plugin
/intercom-ci-integrationConfigure CI/CD pipelines for Intercom integrations with GitHub Actions.
Use when setting up automated testing, configuring CI with Intercom secrets,
or integrating Intercom API tests into your build process.
Trigger with phrases like "intercom CI", "intercom GitHub Actions",
"intercom automated tests", "CI intercom", "intercom pipeline".
/intercom-common-errorsDiagnose and fix Intercom API errors by HTTP status code and error type.
Use when encountering Intercom errors, debugging failed API requests,
or troubleshooting integration issues.
Trigger with phrases like "intercom error", "fix intercom",
"intercom not working", "debug intercom", "intercom 401", "intercom 429".
/intercom-core-workflow-aManage Intercom contacts: create, search, update, merge leads into users.
Use when building contact management features, syncing user data, or implementing contact search and segmentation against the Intercom REST API.
Trigger with phrases like "intercom contacts", "intercom users", "intercom leads", "create intercom contact", "search intercom contacts", "merge intercom lead".
/intercom-core-workflow-bManage Intercom conversations: create, reply, close, snooze, assign, and tag.
Use when building conversation management features, automating replies,
or implementing support workflow automation.
Trigger with phrases like "intercom conversations", "intercom reply",
"intercom assign conversation", "intercom close conversation",
"intercom snooze", "manage intercom conversations".
/intercom-cost-tuningOptimize Intercom API costs through caching, request reduction, and usage monitoring.
Use when analyzing Intercom API usage, reducing unnecessary requests,
or implementing usage tracking and budget awareness.
Trigger with phrases like "intercom cost", "intercom billing",
"reduce intercom requests", "intercom pricing", "intercom usage", "intercom budget".
/intercom-data-handlingImplement Intercom data handling for GDPR, contact export, data retention, and PII.
Use when handling sensitive Intercom contact data, fulfilling a data subject access or deletion request, redacting PII in logs, or setting retention policy for cached Intercom records.
Trigger with phrases like "intercom data", "intercom PII",
"intercom GDPR", "intercom data retention", "intercom privacy", "intercom CCPA",
"intercom data export", "intercom delete contact".
npx claudepluginhub jeremylongshore/tons-of-skills-marketplace --plugin intercom-packOther plugins' skills for the same job