/intercom-pack:intercom-observabilityfrom intercom-pack
Sets up production monitoring for Intercom integrations with Prometheus metrics, OpenTelemetry traces, structured logging, and alert rules.
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.
Comprehensive observability for Intercom integrations covering Prometheus metrics,
OpenTelemetry traces, structured logging, and alert rules for error rates, latency,
and rate-limit usage. Read this page for the workflow and shape of each layer, then
drill into references/implementation.md for the full,
copy-pasteable code and references/examples.md for
end-to-end worked scenarios.
Build the six observability layers in order. Each step below is the summary and the
essential skeleton — the complete implementation for every step lives in
references/implementation.md.
Define five instruments on a shared Registry: a request counter, a duration
histogram, an error counter, a rate-limit gauge, and a webhook counter. Label by
endpoint/method/status (never by unbounded IDs — see Error Handling).
import { Registry, Counter, Histogram, Gauge } from "prom-client";
const registry = new Registry();
const intercomRequests = new Counter({
name: "intercom_api_requests_total",
help: "Total Intercom API requests",
labelNames: ["endpoint", "method", "status"] as const,
registers: [registry],
});
// + duration Histogram, error Counter, rate-limit Gauge, webhook Counter
Full metric set → references/implementation.md, Step 1.
Wrap IntercomClient in a Proxy that times every service method, increments the
success/error counters, records error/status codes on IntercomError, and zeros the
rate-limit gauge on a 429 — so instrumentation is automatic for all endpoints.
Full proxy → references/implementation.md, Step 2.
Configure Pino with a contact serializer that emits only id/role and never
logs email, name, or phone. Add logIntercomOp and logWebhook helpers for
consistent operation/webhook log lines.
Full logger → references/implementation.md, Step 3.
Wrap calls in tracedIntercomCall, which opens a per-operation intercom.* span, sets
OK/ERROR status, records exceptions, and attaches status_code/error_code/request_id
attributes on Intercom errors.
Full tracer → references/implementation.md, Step 4.
Ship the Prometheus rule group with five alerts: high error rate (>5%), high P95 latency (>3s), low rate limit (<1000), auth failures (401s), and webhook failures. Full YAML → references/implementation.md, Step 5.
Expose the registry on GET /metrics for Prometheus to scrape.
Full route → references/implementation.md, Step 6.
Applying this skill produces:
IntercomClient proxy that emits metrics on every call, with zero per-call changes to existing code.intercom_api_requests_total, intercom_api_request_duration_seconds, intercom_api_errors_total, intercom_rate_limit_remaining, intercom_webhooks_processed_total, scraped at GET /metrics.intercom.* span per call, with Intercom error attributes on failures.| Metric | Type | Alert Threshold |
|---|---|---|
intercom_api_requests_total | Counter | N/A (baseline) |
intercom_api_request_duration_seconds | Histogram | P95 > 3s |
intercom_api_errors_total | Counter | > 5% error rate |
intercom_rate_limit_remaining | Gauge | < 1000 |
intercom_webhooks_processed_total | Counter | Failed > 10% |
| Issue | Cause | Solution |
|---|---|---|
| High cardinality | Too many unique labels | Use endpoint groups, not IDs |
| Missing metrics | Uninstrumented calls | Wrap client with proxy |
| Alert storms | Wrong thresholds | Tune based on baseline data |
| Log volume too high | Debug logging in prod | Set LOG_LEVEL=info |
The following scenarios are covered in full in
references/examples.md:
contacts.find call producing a counter increment, a histogram sample, a span, and a PII-redacted log line./metrics — the raw Prometheus exposition and how it feeds Grafana and the alert rules.Minimal end-to-end skeleton:
const client = instrumentedClient(new IntercomClient({ token: process.env.INTERCOM_ACCESS_TOKEN! }));
const contact = await tracedIntercomCall(
"contacts.find",
{ "intercom.contact_id": contactId },
() => client.contacts.find({ contactId })
);
For incident response once these signals are firing, see the intercom-incident-runbook
skill, which turns these alerts into a triage-and-mitigation procedure.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
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