intercom
БесплатноБез исполняемых скриптовНе проверенAdds customer messaging and support to a product with Intercom: the Messenger chat widget, user identification, product tours, help center, and the REST API…
от TerminalSkills★ 221 звезда на GitHubОб этом скилле
Intercom
Overview
Intercom is a customer messaging platform: live chat, a shared inbox, help center, product tours, in-app messages and the Fin AI agent. Two integration surfaces matter to developers. The Messenger runs in the browser (or iOS/Android) and shows the chat widget for a visitor or logged-in user. The REST API (https://api.intercom.io) runs on your server to manage contacts, conversations and messages with an access token.
Checked against the Intercom developer docs in October 2026. Two older practices are outdated: the HMAC user_hash identity verification is deprecated in favour of JWTs (intercom_user_jwt), and a hand-pasted loader snippet is no longer needed in React apps because the @intercom/messenger-js-sdk package loads the widget.
Instructions
Step 1: Install the Messenger in a React or Next.js app
Your workspace ID (app_id) is in the Intercom URL after apps/. It is public, so a NEXT_PUBLIC_ variable is fine.
npm install @intercom/messenger-js-sdk
// components/IntercomProvider.tsx
'use client'
import { useEffect } from 'react'
import Intercom, { shutdown } from '@intercom/messenger-js-sdk'
type Props = {
user?: { id: string; email: string; name: string; createdAt: number; intercomJwt: string }
}
export function IntercomProvider({ user }: Props) {
useEffect(() => {
Intercom({
app_id: process.env.NEXT_PUBLIC_INTERCOM_APP_ID!,
// api_base: 'https://api-iam.eu.intercom.io', // EU-hosted workspaces; AU: api-iam.au.intercom.io
...(user && {
user_id: user.id,
name: user.name,
email: user.email,
created_at: user.createdAt, // Unix seconds
intercom_user_jwt: user.intercomJwt, // signed on your server, see Step 2
}),
})
return () => shutdown() // clears the session; also call on logout
}, [user?.id])
return null
}
Other exports of the package: update, trackEvent, show, hide, showNewMessage, startTour, showArticle. The plain window.Intercom('boot' | 'update' | 'trackEvent' | 'shutdown', ...) API works the same if you use the JavaScript snippet instead. Anonymous visitors: boot with only app_id.
Step 2: Secure the Messenger with a JWT
Without verification anyone can impersonate a user by changing user_id in the browser. Take the Messenger secret key from Settings, Messenger, Security, keep it as INTERCOM_MESSENGER_SECRET, and sign a token on the server for the logged-in user.
// app/api/intercom-jwt/route.ts — server only
import jwt from 'jsonwebtoken'
export function signIntercomJwt(user: { id: string; email: string; name: string }) {
return jwt.sign(
{ user_id: user.id, email: user.email, name: user.name }, // user_id is required
process.env.INTERCOM_MESSENGER_SECRET!,
{ algorithm: 'HS256', expiresIn: '1h' },
)
}
Send exactly one of intercom_user_jwt or user_hash; both together returns HTTP 400. After tests pass, enforce verification in the Messenger security settings.
Step 3: Track events and update on navigation
import { trackEvent, update } from '@intercom/messenger-js-sdk'
update() // after a client-side route change
trackEvent('completed-onboarding', { plan: 'pro', team_size: 5 }) // targets tours, messages, workflows
Step 4: Server-side API
Create a token under Developer Hub, then use a version header so behaviour does not change under you. Regional workspaces use api.eu.intercom.io or api.au.intercom.io.
const headers = {
'Content-Type': 'application/json',
Authorization: `Bearer ${process.env.INTERCOM_ACCESS_TOKEN}`,
'Intercom-Version': '2.16',
}
// Create a contact (a user needs an email or an external_id)
const contact = await fetch('https://api.intercom.io/contacts', {
method: 'POST',
headers,
body: JSON.stringify({
role: 'user',
external_id: 'usr_8f31c2',
email: '[email protected]',
name: 'Maria Keller',
custom_attributes: { plan: 'pro', mrr: 49, company_size: 10 },
}),
}).then((r) => r.json())
// Send an in-app message from an admin to that contact
await fetch('https://api.intercom.io/messages', {
method: 'POST',
headers,
body: JSON.stringify({
message_type: 'inapp',
from: { type: 'admin', id: '394051' },
to: { type: 'user', id: contact.id },
body: 'Hi Maria, how are you finding the new dashboard?',
}),
})
Creating a contact and messaging it immediately can return 404 for a moment; retry after a short delay. The official Node client is intercom-client (new IntercomClient({ token })), which has typed methods for the same endpoints. Custom attributes must exist as data attributes in the workspace to be used for segmentation.
Examples
Example 1: Add chat to a Next.js SaaS for logged-in users
Request: "Put the Intercom chat widget in our Next.js app and ma
Установить intercom в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл intercom?
Adds customer messaging and support to a product with Intercom: the Messenger chat widget, user identification, product tours, help center, and the REST API for contacts and messages. Use when a user asks to add in-app chat, install Intercom in a React or Next.js app, secure the Messenger with JWTs, track events for targeting, sync users to Intercom from a backend, or send in-app messages.
Как установить скилл intercom?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл intercom запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic