/intercom-pack:intercom-security-basicsfrom intercom-pack
Applies Intercom security best practices for access tokens, webhook signature verification, identity verification (HMAC), and least-privilege OAuth scopes.
Ships in intercom-pack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Security best practices for Intercom access tokens, webhook signature verification, Identity Verification (HMAC), and least-privilege OAuth scopes.
# .env (NEVER commit to git)
INTERCOM_ACCESS_TOKEN=dG9rOmFiY2RlZmdoaQ==
INTERCOM_WEBHOOK_SECRET=your-webhook-signing-secret
INTERCOM_IDENTITY_SECRET=your-identity-verification-secret
# .gitignore (mandatory entries)
.env
.env.local
.env.*.local
Verify no tokens are committed:
# Scan git history for leaked tokens
git log --all -p | grep -i "INTERCOM_ACCESS_TOKEN\|dG9r" | head -5
# If found: rotate token immediately, then use git-filter-repo to remove
Intercom signs webhook notifications with HMAC-SHA1 using X-Hub-Signature. You must verify this on every incoming webhook.
import crypto from "crypto";
import express from "express";
function verifyIntercomWebhook(
payload: Buffer,
signature: string,
secret: string
): boolean {
// Intercom uses X-Hub-Signature with HMAC-SHA1
const expectedSignature = "sha1=" + crypto
.createHmac("sha1", secret)
.update(payload)
.digest("hex");
// Timing-safe comparison to prevent timing attacks
return crypto.timingSafeEqual(
Buffer.from(signature),
Buffer.from(expectedSignature)
);
}
const app = express();
app.post(
"/webhooks/intercom",
express.raw({ type: "application/json" }),
(req, res) => {
const signature = req.headers["x-hub-signature"] as string;
if (!signature) {
return res.status(401).json({ error: "Missing signature" });
}
if (!verifyIntercomWebhook(req.body, signature, process.env.INTERCOM_WEBHOOK_SECRET!)) {
return res.status(401).json({ error: "Invalid signature" });
}
const event = JSON.parse(req.body.toString());
// Process verified webhook...
res.status(200).json({ received: true });
}
);
Intercom Identity Verification prevents impersonation by requiring an HMAC of the user's identifier.
import crypto from "crypto";
// Server-side: generate user hash
function generateIntercomUserHash(userId: string): string {
return crypto
.createHmac("sha256", process.env.INTERCOM_IDENTITY_SECRET!)
.update(userId)
.digest("hex");
}
// Pass to frontend for Messenger initialization
app.get("/api/intercom-settings", (req, res) => {
const userId = req.user.id;
res.json({
app_id: process.env.INTERCOM_APP_ID,
user_id: userId,
user_hash: generateIntercomUserHash(userId),
});
});
Only request scopes your app actually needs:
| Use Case | Required Scopes |
|---|---|
| Read contact data only | Read contacts |
| Manage conversations | Read conversations, Write conversations |
| Send messages | Write messages |
| Manage Help Center | Read articles, Write articles |
| Full CRM integration | Read/write contacts, Read/write conversations, Read/write tags |
# 1. Generate new token in Developer Hub
# Settings > Developer Hub > Your App > Authentication
# 2. Update in secret manager (examples)
# AWS
aws secretsmanager update-secret \
--secret-id intercom/access-token \
--secret-string "new_token_here"
# GCP
echo -n "new_token_here" | gcloud secrets versions add intercom-token --data-file=-
# Vault
vault kv put secret/intercom access_token="new_token_here"
# 3. Verify new token
curl -s https://api.intercom.io/me \
-H "Authorization: Bearer $NEW_TOKEN" | jq '.type'
# Should return "admin"
# 4. Deploy updated config
# 5. Revoke old token in Developer Hub
.env files in .gitignore| Security Issue | Detection | Mitigation |
|---|---|---|
| Leaked token in git | git log -p | grep dG9r | Rotate immediately, remove from history |
| Invalid webhook signature | 401 from verification | Check secret matches Developer Hub |
| Missing Identity Verification | Intercom dashboard warning | Implement user_hash on server |
| Excessive OAuth scopes | Scope audit | Remove unnecessary scopes |
| Token never rotated | Age tracking | Schedule quarterly rotation |
For production deployment, see intercom-prod-checklist.
What SKILL.md sets; muted values are Claude Code's defaults
24 skills in this plugin
/intercom-ci-integrationConfigure CI/CD pipelines for Intercom integrations with GitHub Actions.
Use when setting up automated testing, configuring CI with Intercom secrets,
or integrating Intercom API tests into your build process.
Trigger with phrases like "intercom CI", "intercom GitHub Actions",
"intercom automated tests", "CI intercom", "intercom pipeline".
/intercom-common-errorsDiagnose and fix Intercom API errors by HTTP status code and error type.
Use when encountering Intercom errors, debugging failed API requests,
or troubleshooting integration issues.
Trigger with phrases like "intercom error", "fix intercom",
"intercom not working", "debug intercom", "intercom 401", "intercom 429".
/intercom-core-workflow-aManage Intercom contacts: create, search, update, merge leads into users.
Use when building contact management features, syncing user data,
or implementing contact search and segmentation.
Trigger with phrases like "intercom contacts", "intercom users",
"intercom leads", "create intercom contact", "search intercom contacts",
"merge intercom lead".
/intercom-core-workflow-bManage Intercom conversations: create, reply, close, snooze, assign, and tag.
Use when building conversation management features, automating replies,
or implementing support workflow automation.
Trigger with phrases like "intercom conversations", "intercom reply",
"intercom assign conversation", "intercom close conversation",
"intercom snooze", "manage intercom conversations".
/intercom-cost-tuningOptimize Intercom API costs through caching, request reduction, and usage monitoring.
Use when analyzing Intercom API usage, reducing unnecessary requests,
or implementing usage tracking and budget awareness.
Trigger with phrases like "intercom cost", "intercom billing",
"reduce intercom requests", "intercom pricing", "intercom usage", "intercom budget".
/intercom-data-handlingImplement Intercom data handling for GDPR, contact export, data retention, and PII.
Use when handling sensitive data, implementing data export/deletion requests,
or ensuring compliance with privacy regulations for Intercom integrations.
Trigger with phrases like "intercom data", "intercom PII",
"intercom GDPR", "intercom data retention", "intercom privacy", "intercom CCPA",
"intercom data export", "intercom delete contact".
npx claudepluginhub flight505/skill-forge --plugin intercom-packOther plugins' skills for the same job