Skip to content
OpenSmartRoute
Skillv1.0.0

intercom-upgrade-migration

Upgrade the intercom-client SDK across major versions and handle Intercom API version changes safely. Use when a project is pinned to an old intercom-client release, when the v5 CommonJS API must move

by jeremylongshore(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from jeremylongshore/tons-of-skills-marketplace (plugins/saas-packs/intercom-pack/skills/intercom-upgrade-migration/SKILL.md). Install upstream with npx skills add jeremylongshore/tons-of-skills-marketplace --skill intercom-upgrade-migration. Copyright stays with the author (MIT).

Intercom Upgrade & Migration

Overview

Upgrade the intercom-client npm package and handle Intercom API version changes without breaking production traffic. The v6 TypeScript rewrite changed the API surface — most notably unifying users/leads into a single contacts API — so this skill drives a branch-based, type-checked upgrade that surfaces every breaking change through the compiler and test suite before merge.

Deep material lives in references/ so this file stays scannable:

  • Full v5 → v6 migration guide — every changed operation with before/after code, API-version pinning, the upgrade procedure, type-import changes, and the method cheat sheet.
  • Worked examples — three end-to-end runs from version detection through a committed upgrade branch.

Prerequisites

  • A project with intercom-client already installed (npm list intercom-client shows the current version).
  • Git available for branch-based upgrades and reviewable diffs.
  • A working test suite, ideally including an integration suite that can run against a dev Intercom workspace.
  • TypeScript (tsc) configured if migrating to v6+, since the compiler is the primary breaking-change detector.

Authentication

Intercom API calls authenticate with a workspace access token passed as a Bearer token. Read it from the INTERCOM_ACCESS_TOKEN environment variable — never hardcode it. Version-detection curls and the integration test step both consume this variable:

export INTERCOM_ACCESS_TOKEN="<workspace-access-token>"   # from Intercom > Developer Hub

Use a separate dev-workspace token ($DEV_TOKEN) for the integration test step so the upgrade is validated without touching production data.

Instructions

Follow the workflow at a high level here; drill into the migration guide for the exact code diffs.

Step 1: Check current versions

Read (with the Read tool or npm list) the installed version, the latest published version, and the live API version to size the upgrade:

npm list intercom-client                  # installed SDK version
npm view intercom-client version          # latest available
curl -s -D - -o /dev/null \
  -H "Authorization: Bearer $INTERCOM_ACCESS_TOKEN" \
  https://api.intercom.io/me 2>/dev/null | grep -i intercom-version

If the installed major is < 6 and the target is ≥ 6, expect the TypeScript-rewrite breaking changes.

Step 2: Migrate the code (v5 → v6)

For a major crossing, apply the breaking-change diffs with the Edit/Write tools: swap new Intercom.Client() for new IntercomClient(), move users/leads calls to the unified contacts API, rename positional params (idcontactId/conversationId), and update error handling to the IntercomError instance check. The full before/after set and a one-line-per-method cheat sheet are in the migration guide.

Step 3: Pin the API version if needed

The SDK sends a compatible Intercom-Version header automatically. Pin it explicitly only when using raw fetch requests or when a response shape must be frozen — see the API-version-pinning section of the migration guide.

Step 4: Run the type-checked upgrade on a branch

Do the whole upgrade on a dedicated branch so TypeScript and the tests gate it:

git checkout -b upgrade/intercom-client-v6
npm install intercom-client@latest
npx tsc --noEmit 2>&1 | grep "intercom"    # surfaces every breaking change
npm test

Fix each error the compiler reports, re-run until clean, then validate against a dev workspace and commit. The complete procedure is in the migration guide.

Output

Running this skill produces:

  • A dedicated upgrade branch (e.g. upgrade/intercom-client-v6) with intercom-client bumped in package.json / lockfile.
  • Source edits that migrate every v5 call site to the v6 API surface.
  • A clean npx tsc --noEmit run (no remaining intercom-client type errors) and a green npm test / integration run against a dev workspace.
  • A commit ready for PR, e.g. chore: upgrade intercom-client to v6.

Error Handling

Issue Detection Solution
Cannot find module 'intercom-client' Import fails npm install intercom-client
Property 'users' does not exist TypeScript error Migrate users/leads to contacts
Property 'id' does not exist Changed param names Use contactId, conversationId
Response shape changed Runtime errors Check API version headers, pin Intercom-Version
401 Unauthorized curl/test fails Verify INTERCOM_ACCESS_TOKEN is set and valid

Examples

Quick skeleton — detect, then migrate one call:

npm list intercom-client        # e.g. 5.4.0
npm view intercom-client version # e.g. 6.4.0 → major upgrade
// v5  → migrate to →  v6
// await client.users.create({ email });
await client.contacts.create({ role: "user", email });

Three full end-to-end runs — version detection, a single-call migration, and a complete branch upgrade — are in references/examples.md.

Resources

Next Steps

After the upgrade branch is green, wire the version bump into CI so future regressions are caught automatically — see the intercom-ci-integration skill for the pipeline configuration.

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/jeremylongshore-tons-of-skills-marketplace-intercom-upgr-f39a6d/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

jeremylongshore-tons-of-skills-marketplace-intercom-upgr-f39a6d.ocm.jsonjson
{
  "ocm": "1",
  "id": "jeremylongshore-tons-of-skills-marketplace-intercom-upgr-f39a6d",
  "kind": "skill",
  "name": "intercom-upgrade-migration",
  "description": "Upgrade the intercom-client SDK across major versions and handle Intercom API version changes safely. Use when a project is pinned to an old intercom-client release, when the v5 CommonJS API must move to the v6 TypeScript rewrite, or when detecting breaking changes in a new Intercom release before shipping. Trigger with phrases like \"upgrade intercom\", \"intercom migration\", \"intercom breaking changes\", \"update intercom SDK\", \"intercom API version\".",
  "publisher": "jeremylongshore",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "coding"
    ],
    "tags": [
      "skill-md",
      "saas",
      "support",
      "messaging",
      "intercom",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Upgrade the intercom-client SDK across major versions and handle Intercom API version changes safely. Use when a project is pinned to an old intercom-client release, when the v5 CommonJS API must move to the v6 TypeScript rewrite, or when detecting breaking changes in a new Intercom release before shipping. Trigger with phrases like \"upgrade intercom\", \"intercom migration\", \"intercom breaking changes\", \"update intercom SDK\", \"intercom API version\"."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/jeremylongshore/tons-of-skills-marketplace",
      "path": "plugins/saas-packs/intercom-pack/skills/intercom-upgrade-migration/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/jeremylongshore/tons-of-skills-marketplace/blob/HEAD/plugins/saas-packs/intercom-pack/skills/intercom-upgrade-migration/SKILL.md",
      "key": "jeremylongshore/tons-of-skills-marketplace/plugins/saas-packs/intercom-pack/skills/intercom-upgrade-migration/SKILL.md"
    },
    "compatibility": "Designed for Claude Code",
    "allowed_tools": [
      "Read,",
      "Write,",
      "Edit,",
      "Bash(npm:*),",
      "Bash(git:*)"
    ],
    "license": "MIT"
  },
  "instructions": "# Intercom Upgrade & Migration\n\n## Overview\n\nUpgrade the `intercom-client` npm package and handle Intercom API version\nchanges without breaking production traffic. The v6 TypeScript rewrite changed\nthe API surface — most notably unifying `users`/`leads` into a single `contacts`\nAPI — so this skill drives a branch-based, type-checked upgrade that surfaces\nevery breaking change through the compiler and test suite before merge.\n\nDeep material lives in `references/` so this file stays scannable:\n\n- [Full v5 → v6 migration guide](references/migration-guide.md) — every changed\n  operation with befor",
  "cost": {
    "context_tokens": 1436
  }
}

Fetch it by URL: GET /api/v1/registry/jeremylongshore-tons-of-skills-marketplace-intercom-upgr-f39a6d/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.