Agent skill

Intercom SDK Patterns

by jeremylongshore in jeremylongshore/tons-of-skills-marketplace

Apply production-ready intercom-client SDK patterns for TypeScript.

MITAuto-check passedDevelopment

Install Intercom SDK Patterns

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill intercom-sdk-patterns -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace intercom-sdk-patterns --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/intercom-sdk-patterns .claude/skills/intercom-sdk-patterns && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
intercom-sdk-patterns
GitHub stars
2.8k
Token cost
~1.7k tokens
SKILL.md length
507 words
Files
3 (incl. references)
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Apply production-ready intercom-client SDK patterns for TypeScript.

  • Works in 3 steps: Type-Safe Client Wrapper → Cursor-Based Pagination → Error Handling and Retry
  • Implementing Intercom integrations
  • SKILL.md covers Overview, Prerequisites, Authentication and Instructions, plus 5 more sections
  • Calls npm; needs INTERCOM_ACCESS_TOKEN

What it does

Intercom SDK Patterns is an agent skill from jeremylongshore/tons-of-skills-marketplace. Apply production-ready intercom-client SDK patterns for TypeScript. Use when implementing Intercom integrations, refactoring SDK usage, or establishing team coding standards for Intercom API calls. Trigger with phrases like "intercom SDK patterns", "intercom best practices", "intercom code patterns", "idiomatic intercom", "intercom typescript".

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/examples.md` and `references/implementation.md`). Compatibility notes: Designed for Claude Code

It sits in Development, covering Code quality and Refactoring. It works with Intercom and TypeScript. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • Implementing Intercom integrations
  • Refactoring SDK usage
  • Establishing team coding standards for Intercom API calls
  • With phrases like intercom SDK patterns

Example prompts

  • “intercom SDK patterns”
  • “intercom best practices”
  • “intercom code patterns”
  • “/intercom-sdk-patterns”

Requirements

  • Node.js
  • A credential in INTERCOM_ACCESS_TOKEN
  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Write, Edit

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Type-Safe Client Wrapper
  2. Cursor-Based Pagination
  3. Error Handling and Retry

What it can do on your machine

Read from SKILL.md and the folder at commit 23ea8d4. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • developers.intercom.com
    • npmjs.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • INTERCOM_ACCESS_TOKEN

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Designed for Claude Code

    From compatibility in the SKILL.md frontmatter.

Context cost

Intercom SDK Patterns loads about 1.7k tokens when it runs, and up to ~3.4k if it reads all its reference files. Until then it costs about 92 tokens; SKILL.md has 507 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~92
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit 23ea8d4, republished under its MIT licence (© jeremylongshore). 507 words, ~1,700 tokens.

Download SKILL.mdSave it as .claude/skills/intercom-sdk-patterns/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
intercom-sdk-patterns
description
Apply production-ready intercom-client SDK patterns for TypeScript. Use when implementing Intercom integrations, refactoring SDK usage, or establishing team coding standards for Intercom API calls. Trigger with phrases like "intercom SDK patterns", "intercom best practices", "intercom code patterns", "idiomatic intercom", "intercom typescript".
allowed-tools
Read, Write, Edit
compatibility
Designed for Claude Code
version
1.6.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
saas, support, messaging, intercom

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:

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 INTERCOM_ACCESS_TOKEN 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.

typescript
// src/intercom/client.ts
import { IntercomClient } from "intercom-client";
import { Intercom } from "intercom-client";

let instance: IntercomClient | null = null;

export function getClient(): IntercomClient {
  if (!instance) {
    instance = new IntercomClient({
      token: process.env.INTERCOM_ACCESS_TOKEN!,
    });
  }
  return instance;
}

// Type-safe contact creation helper
export async function createContact(
  params: Intercom.CreateContactRequest
): Promise<Intercom.Contact> {
  return getClient().contacts.create(params);
}
Step 2: Cursor-Based Pagination

Intercom lists are cursor-paginated — starting_after points to the next page. Prefer the SDK's built-in async iteration, which manages the cursor for you:

typescript
const response = await client.articles.list();
for await (const article of response) {
  console.log(article.title);
}

When explicit control is needed, an alternative option is a custom generator that yields each item and advances startingAfter until the cursor is exhausted. Choose auto-iteration for simplicity, or the manual generator when a custom perPage, early exit, or per-page side effects are required. Both variants: references/examples.md.

Step 3: Error Handling and Retry

Wrap every call so a thrown IntercomError becomes a normalized { data, error } result, then layer retry/backoff on transient failures (429, 5xx). Skeleton:

typescript
import { IntercomError } from "intercom-client";

try {
  const data = await client.contacts.find({ contactId: "abc123" });
  // use data
} catch (err) {
  if (err instanceof IntercomError) {
    // inspect err.statusCode (401/404/409/422/429), err.body?.errors
  }
  throw err; // re-throw non-Intercom errors
}

Full safeIntercomCall wrapper, withRetry exponential-backoff helper (with Retry-After support), and compound search live in references/implementation.md.

Show full SKILL.md (185 more words)Show less

Output

Applying this skill produces TypeScript source that follows these patterns:

  • A singleton client module (e.g. src/intercom/client.ts) exporting getClient and typed helpers.
  • Pagination code that streams items via async iteration instead of buffering full result sets.
  • API calls wrapped in safeIntercomCall returning { data, error }, with withRetry applied to rate-limited and server-error responses.
  • No hardcoded tokens — all auth reads INTERCOM_ACCESS_TOKEN (or a per-workspace token via the factory).

Error Handling

PatternUse CaseBenefit
safeIntercomCall wrapperAll API callsPrevents uncaught exceptions
withRetryTransient failures (429, 5xx)Automatic recovery
Cursor pagination generatorLarge data setsMemory-efficient streaming
Client factoryMulti-tenant appsWorkspace isolation

Status codes to handle explicitly: 401 (bad/expired token), 404 (missing resource), 409 (conflict/duplicate), 422 (validation — check err.body?.errors), 429 (rate limited — back off). Full switch-based handler: references/implementation.md.

Examples

Minimal end-to-end shape:

typescript
import { getClient } from "./intercom/client";

const client = getClient();
const contact = await client.contacts.create({
  role: "user",
  email: "new@acme.com",
});
console.log(contact.id);

Resources

Next Steps

Apply these patterns alongside intercom-core-workflow-a for contact management workflows. For the full implementation catalog and worked examples, open references/implementation.md and references/examples.md.

© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in skills/.curated/intercom-sdk-patterns of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • references/examples.md
  • references/implementation.md

Open the folder on GitHubat commit 23ea8d4

Compare with similar skills

Intercom SDK Patterns next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Intercom SDK Patterns compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Intercom SDK Patterns this skilljeremylongshore/tons-of-skills-marketplace2.8k—~1.7kAutomated safety check: PassMIT
DRY Refactoring With jscpdkucherenko/jscpd6.4k—~2.1kAutomated safety check: PassMIT
Qovery Console StandardsQovery/console227—~924Automated safety check: PassMIT
jscpd Duplicate Code Detectorkucherenko/jscpd6.4k—~4.5kAutomated safety check: PassMIT
Coding Standardsmrzmyr/pixy-mood-tracker-app154—~2.2kAutomated safety check: PassMIT
Typescript Best Practicesjwynia/agent-skills166—~2.5kAutomated safety check: PassMIT

Similar skills

  • Removes copy-paste duplication found by jscpd, starting with exact clones and hotspots, then renamed and near-miss copies, using proven refactoring strategies.

    6.4k GitHub stars~2.1k tokensUpdated today
    DevelopmentAuto-check passed
  • Qovery Console coding standards, architecture guidelines, naming conventions, testing practices, and development workflows.

    227 GitHub stars~924 tokensUpdated today
    DevelopmentAuto-check passed
  • Finds duplicated code in 220+ languages with jscpd, reports exact, renamed and near-miss clones in a compact agent-friendly format and measures duplication.

    6.4k GitHub stars~4.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Coding Standards

    mrzmyr/pixy-mood-tracker-app

    A skill your agent uses when writing, reviewing, or refactoring TypeScript

    154 GitHub stars~2.2k tokensUpdated today
    DevelopmentAuto-check passed
  • Typescript Best Practices

    jwynia/agent-skills

    Guide AI agents through TypeScript coding best practices including type safety, error handling, code organization, and architecture patterns.

    166 GitHub stars~2.5k tokensUpdated 7 mo ago
    DevelopmentAuto-check passed
  • Clean Tests

    ertugrul-dmr/clean-code-skills

    A skill your agent uses when writing, fixing, editing, or refactoring TypeScript tests.

    196 GitHub stars~1.4k tokensUpdated 5 mo ago
    DevelopmentAuto-check passed

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Analyzing Text With NLP

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to perform natural language processing and text analysis using the nlp-text-analyzer plugin.

    2.8k GitHub starsUsed in 1 repo~819 tokens
    Auto-check passed
  • Building Neural Networks

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill allows AI assistant to construct and configure neural network architectures using the neural-network-builder plugin.

    2.8k GitHub starsUsed in 1 repo~1k tokens
    Auto-check passed
  • Detecting Data Anomalies

    jeremylongshore/tons-of-skills-marketplace

    Process identify anomalies and outliers in datasets using machine learning algorithms.

    2.8k GitHub starsUsed in 1 repo~1.4k tokens
    Auto-check passed
  • Explaining Machine Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill enables AI assistant to provide interpretability and explainability for machine learning models.

    2.8k GitHub starsUsed in 1 repo~1k tokens
    Auto-check passed
  • Optimizing Prompts

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill optimizes prompts for large language models (llms) to reduce token usage, lower costs, and improve performance.

    2.8k GitHub starsUsed in 1 repo~1k tokens
    Auto-check passed

Categories

Questions about Intercom SDK Patterns

What does Intercom SDK Patterns do?

Apply production-ready intercom-client SDK patterns for TypeScript. Intercom SDK Patterns is an agent skill from jeremylongshore/tons-of-skills-marketplace. Apply production-ready intercom-client SDK patterns for TypeScript.

When should I use Intercom SDK Patterns?

Intercom SDK Patterns fits situations like: implementing Intercom integrations; refactoring SDK usage; establishing team coding standards for Intercom API calls; with phrases like intercom SDK patterns.

How do I install Intercom SDK Patterns in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill intercom-sdk-patterns -a claude-code`. Or copy the skill folder (skills/.curated/intercom-sdk-patterns in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/intercom-sdk-patterns in your project. Claude Code loads it when a task matches its description.

How do I install Intercom SDK Patterns in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill intercom-sdk-patterns -a codex`. Or copy the skill folder (skills/.curated/intercom-sdk-patterns in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/intercom-sdk-patterns in your project. Codex loads it when a task matches its description.

Can I use Intercom SDK Patterns in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill intercom-sdk-patterns -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/intercom-sdk-patterns, .gemini/skills/intercom-sdk-patterns, .github/skills/intercom-sdk-patterns and .opencode/skills/intercom-sdk-patterns in your project.

What does Intercom SDK Patterns need to run?

Going by SKILL.md and its folder, Intercom SDK Patterns needs the command-line tools its instructions call (npm) and credentials named INTERCOM_ACCESS_TOKEN. Our summary lists: Node.js; A credential in INTERCOM_ACCESS_TOKEN. Its frontmatter pre-approves these tools: Read, Write, Edit. Compatibility (from SKILL.md): Designed for Claude Code.

Does Intercom SDK Patterns access the network?

SKILL.md names 2 domains. As links in the text: developers.intercom.com and npmjs.com. This is read from the text; nothing was executed.

Is Intercom SDK Patterns safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Intercom SDK Patterns use?

Intercom SDK Patterns is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Intercom SDK Patterns use?

About 1.7k tokens (SKILL.md is roughly 6.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.7k tokens, read only when the agent opens those files.

What are the alternatives to Intercom SDK Patterns?

Skills that share tags, products or a category with Intercom SDK Patterns: DRY Refactoring With jscpd (kucherenko/jscpd, 6.4k stars), Qovery Console Standards (Qovery/console, 227 stars), jscpd Duplicate Code Detector (kucherenko/jscpd, 6.4k stars) and Coding Standards (mrzmyr/pixy-mood-tracker-app, 154 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Intercom SDK Patterns?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,821 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 8, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.