Agent skill · software engineering · jeremylongshore
intercom-sdk-patterns
Apply production-ready intercom-client SDK patterns for TypeScript.
Why this skill is useful
Provides specific patterns and best practices for using the intercom-client SDK in TypeScript that the AI wouldn't reliably generate on its own.
What it needs
Requires intercom-client installed locally. Requires intercom account access. About 3k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.
What this skill does
Intercom SDK Patterns Overview Production-ready patterns for the intercom-client TypeScript SDK covering client initialization, cursor-based pagination, error handling, retry with backoff, compound search, and multi-tenant client factories. Use this skill to Read existing Intercom code, then Write or Edit it to match these patterns — type-safe singletons, memory-efficient pagination, and resilient error handling. The SKILL.md body carries the essential skeletons (client wrapper, pagination, error-handling shape). Deep implementations and worked examples live in references/ so you can drill in only when you need them: Full implementation patterns — error handling, retry/backoff, multi-tenant factory, search-operator table. Worked examples — pagination, compound search, combined retry + safe-call. Prerequisites intercom-client package installed (npm install intercom-client). TypeScript 5.0+ project with strict mode enabled. Familiarity with async/await and async generators. An Intercom access token available at runtime (see Authentication below). Authentication The SDK authenticates with a workspace access token passed to the IntercomClient constructor. Store it in the INTERCOMACCESSTOKEN environment variable — never hardcode it. Generate the token from Intercom's Developer Hub (Settings → Authentication). For multi-workspace apps, each workspace has its own token; see the multi-tenant factory in references/implementation.md. Instructions Step 1: Type-Safe Client Wrapper Create one lazily-initialized singleton client plus thin, typed helpers. This keeps a single connection pool and gives every call-site full SDK types. Step 2: Cursor-Based Pagination Intercom lists are cursor-paginated — startingafter points to the next page. Prefer the SDK's built-in async iteration, which manages the cursor for you: When explicit control is needed, an alternative option is a custom generator that yields each item and advances startingAfter until the cursor is exhausted. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills jeremylongshore/intercom-sdk-patterns