intercom-upgrade-migration
Upgrade intercom-client SDK versions and handle API version changes. Use when upgrading the SDK, migrating between API versions, or detecting breaking changes in Intercom releases. Trigger with phrases like "upgrade intercom", "intercom migration", "intercom breaking changes", "update intercom SDK", "intercom API version".
What this skill does
# Intercom Upgrade & Migration
## Overview
Guide for upgrading the `intercom-client` npm package and handling Intercom API version changes. The SDK was rewritten in TypeScript starting at v6, which introduced significant breaking changes from the v5 CommonJS API.
## Prerequisites
- Current `intercom-client` installed
- Git for version control
- Test suite available
## Instructions
### Step 1: Check Current Versions
```bash
# Current SDK version
npm list intercom-client
# Latest available
npm view intercom-client version
# Current API version (check response headers)
curl -s -D - -o /dev/null \
-H "Authorization: Bearer $INTERCOM_ACCESS_TOKEN" \
https://api.intercom.io/me 2>/dev/null | grep -i intercom-version
```
### Step 2: SDK v5 to v6 Migration (Major Breaking Change)
The v6 SDK is a full TypeScript rewrite with a new API surface.
**Client Initialization:**
```typescript
// v5 (CommonJS)
const Intercom = require("intercom-client");
const client = new Intercom.Client({ token: "xxx" });
// v6+ (TypeScript ESM)
import { IntercomClient } from "intercom-client";
const client = new IntercomClient({ token: "xxx" });
```
**Contact Operations:**
```typescript
// v5
await client.users.create({ email: "[email protected]" });
await client.leads.create({ email: "[email protected]" });
await client.users.find({ id: "abc" });
await client.users.list();
// v6+ (unified contacts API)
await client.contacts.create({ role: "user", email: "[email protected]" });
await client.contacts.create({ role: "lead", email: "[email protected]" });
await client.contacts.find({ contactId: "abc" });
await client.contacts.list();
```
**Conversation Operations:**
```typescript
// v5
await client.conversations.reply({ id: "123", body: "Hello", type: "admin", admin_id: "456" });
// v6+
await client.conversations.reply({
conversationId: "123",
body: "Hello",
type: "admin",
adminId: "456",
});
```
**Error Handling:**
```typescript
// v5
try { ... } catch (e) { console.log(e.statusCode, e.body); }
// v6+
import { IntercomError } from "intercom-client";
try { ... } catch (e) {
if (e instanceof IntercomError) {
console.log(e.statusCode, e.message, e.body);
}
}
```
**Pagination:**
```typescript
// v5 - callback style
client.users.scroll.each({}, (users) => { /* ... */ });
// v6+ - async iteration
const response = await client.contacts.list();
for await (const contact of response) {
// Auto-paginates
}
// Or manual cursor-based pagination
let startingAfter: string | undefined;
do {
const page = await client.contacts.list({ perPage: 50, startingAfter });
// process page.data
startingAfter = page.pages?.next?.startingAfter ?? undefined;
} while (startingAfter);
```
### Step 3: API Version Pinning
Intercom API versions control response shapes. The SDK defaults to a compatible version, but you can pin explicitly.
```typescript
// Current stable version: 2.11
// SDK handles version headers automatically
// To use specific version via raw requests:
const response = await fetch("https://api.intercom.io/contacts", {
headers: {
Authorization: `Bearer ${token}`,
"Intercom-Version": "2.11",
"Content-Type": "application/json",
},
});
```
### Step 4: Upgrade Procedure
```bash
# 1. Create upgrade branch
git checkout -b upgrade/intercom-client-v6
# 2. Install new version
npm install intercom-client@latest
# 3. Run type checks (will surface breaking changes)
npx tsc --noEmit 2>&1 | grep "intercom"
# 4. Run tests
npm test
# 5. Fix breaking changes identified by TypeScript and tests
# 6. Test against dev workspace
INTERCOM_ACCESS_TOKEN=$DEV_TOKEN npm run test:integration
# 7. Commit and PR
git add -A && git commit -m "chore: upgrade intercom-client to v6"
```
### Step 5: Type Import Changes
```typescript
// v6+ exports types under Intercom namespace
import { Intercom } from "intercom-client";
// Use typed request/response interfaces
const request: Intercom.CreateContactRequest = {
role: "user",
email: "[email protected]",
};
const contact: Intercom.Contact = await client.contacts.create(request);
```
## v5 to v6 Migration Cheat Sheet
| v5 Method | v6 Method |
|-----------|-----------|
| `client.users.create()` | `client.contacts.create({ role: "user" })` |
| `client.leads.create()` | `client.contacts.create({ role: "lead" })` |
| `client.users.find({ id })` | `client.contacts.find({ contactId })` |
| `client.users.update({ id })` | `client.contacts.update({ contactId })` |
| `client.users.list()` | `client.contacts.list()` |
| `client.conversations.reply({ id })` | `client.conversations.reply({ conversationId })` |
| `client.events.create()` | `client.dataEvents.create()` |
| `client.tags.tag()` | `client.contacts.tag()` |
| `new Intercom.Client({ token })` | `new IntercomClient({ token })` |
| `e.statusCode` | `e instanceof IntercomError ? e.statusCode : ...` |
## 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 |
## Resources
- [intercom-node GitHub](https://github.com/intercom/intercom-node)
- [SDK v6 Release Notes](https://github.com/intercom/intercom-node/discussions/416)
- [API Versioning](https://developers.intercom.com/docs/references/introduction)
- [intercom-client npm](https://www.npmjs.com/package/intercom-client)
## Next Steps
For CI integration during upgrades, see `intercom-ci-integration`.
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.