intercom-multi-env-setup
Configure Intercom across development, staging, and production workspaces. Use when setting up multi-environment deployments, configuring per-environment access tokens, or implementing workspace isolation. Trigger with phrases like "intercom environments", "intercom staging", "intercom dev prod", "intercom environment setup", "intercom workspace isolation".
Best use case
intercom-multi-env-setup is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Configure Intercom across development, staging, and production workspaces. Use when setting up multi-environment deployments, configuring per-environment access tokens, or implementing workspace isolation. Trigger with phrases like "intercom environments", "intercom staging", "intercom dev prod", "intercom environment setup", "intercom workspace isolation".
Teams using intercom-multi-env-setup should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/intercom-multi-env-setup/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How intercom-multi-env-setup Compares
| Feature / Agent | intercom-multi-env-setup | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Configure Intercom across development, staging, and production workspaces. Use when setting up multi-environment deployments, configuring per-environment access tokens, or implementing workspace isolation. Trigger with phrases like "intercom environments", "intercom staging", "intercom dev prod", "intercom environment setup", "intercom workspace isolation".
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
ChatGPT vs Claude for Agent Skills
Compare ChatGPT and Claude for AI agent skills across coding, writing, research, and reusable workflow execution.
SKILL.md Source
# Intercom Multi-Environment Setup
## Overview
Configure separate Intercom workspaces for development, staging, and production with environment-specific access tokens, webhook URLs, and safety guards.
## Prerequisites
- Separate Intercom workspaces (or at minimum, separate apps in Developer Hub)
- Secret management solution (Vault, AWS Secrets Manager, GCP Secret Manager)
- CI/CD pipeline with environment variable support
## Environment Strategy
| Environment | Workspace | Token Type | Data | Webhooks |
|-------------|-----------|-----------|------|----------|
| Development | Dev/sandbox workspace | Dev access token | Test data | localhost via ngrok |
| Staging | Staging workspace | Staging token | Seed data | staging.example.com |
| Production | Production workspace | Production token | Real data | api.example.com |
## Instructions
### Step 1: Environment Configuration
```typescript
// src/config/intercom.ts
interface IntercomEnvironmentConfig {
accessToken: string;
webhookSecret: string;
identitySecret: string;
environment: "development" | "staging" | "production";
baseUrl: string;
debug: boolean;
cache: { enabled: boolean; ttlSeconds: number };
rateLimit: { maxConcurrency: number };
}
function loadConfig(): IntercomEnvironmentConfig {
const env = (process.env.NODE_ENV || "development") as IntercomEnvironmentConfig["environment"];
const shared = {
accessToken: process.env.INTERCOM_ACCESS_TOKEN!,
webhookSecret: process.env.INTERCOM_WEBHOOK_SECRET!,
identitySecret: process.env.INTERCOM_IDENTITY_SECRET || "",
environment: env,
baseUrl: "https://api.intercom.io",
};
const envDefaults: Record<string, Partial<IntercomEnvironmentConfig>> = {
development: {
debug: true,
cache: { enabled: false, ttlSeconds: 0 },
rateLimit: { maxConcurrency: 2 },
},
staging: {
debug: false,
cache: { enabled: true, ttlSeconds: 60 },
rateLimit: { maxConcurrency: 5 },
},
production: {
debug: false,
cache: { enabled: true, ttlSeconds: 300 },
rateLimit: { maxConcurrency: 10 },
},
};
return { ...shared, ...envDefaults[env] } as IntercomEnvironmentConfig;
}
export const intercomConfig = loadConfig();
```
### Step 2: Environment-Aware Client Factory
```typescript
// src/intercom/client.ts
import { IntercomClient } from "intercom-client";
import { intercomConfig } from "../config/intercom";
let client: IntercomClient | null = null;
export function getClient(): IntercomClient {
if (!client) {
if (!intercomConfig.accessToken) {
throw new Error(
`INTERCOM_ACCESS_TOKEN not set for ${intercomConfig.environment}. ` +
`Create a .env.${intercomConfig.environment} file.`
);
}
client = new IntercomClient({
token: intercomConfig.accessToken,
});
if (intercomConfig.debug) {
console.log(`[Intercom] Connected to ${intercomConfig.environment} workspace`);
}
}
return client;
}
```
### Step 3: Secret Management by Platform
```bash
# Local development (.env.development - git-ignored)
INTERCOM_ACCESS_TOKEN=dG9rOmRldl90b2tlbg==
INTERCOM_WEBHOOK_SECRET=dev-webhook-secret
NODE_ENV=development
# GitHub Actions (for CI)
gh secret set INTERCOM_DEV_TOKEN --body "dev-token"
gh secret set INTERCOM_STAGING_TOKEN --body "staging-token"
gh secret set INTERCOM_PROD_TOKEN --body "prod-token"
# AWS Secrets Manager
aws secretsmanager create-secret \
--name intercom/production/access-token \
--secret-string "prod-token"
# GCP Secret Manager
echo -n "prod-token" | gcloud secrets create intercom-prod-token --data-file=-
# HashiCorp Vault
vault kv put secret/intercom/production \
access_token="prod-token" \
webhook_secret="prod-webhook-secret"
```
### Step 4: Production Safety Guards
```typescript
// Prevent destructive operations in wrong environment
class EnvironmentGuard {
constructor(private env: string) {}
requireProduction(operation: string): void {
if (this.env !== "production") {
throw new Error(
`${operation} is only allowed in production (current: ${this.env})`
);
}
}
preventProduction(operation: string): void {
if (this.env === "production") {
throw new Error(
`${operation} is blocked in production for safety`
);
}
}
}
const guard = new EnvironmentGuard(intercomConfig.environment);
// Usage
async function deleteAllTestContacts() {
guard.preventProduction("deleteAllTestContacts"); // Blocks in prod
const contacts = await client.contacts.search({
query: { field: "custom_attributes.is_test", operator: "=", value: true },
});
for (const contact of contacts.data) {
await client.contacts.delete({ contactId: contact.id });
}
}
async function sendBulkMessages(contactIds: string[], message: string) {
guard.requireProduction("sendBulkMessages"); // Only works in prod
// ... send messages
}
```
### Step 5: Webhook URL per Environment
```typescript
// CI/CD: Set webhook URL based on environment
const webhookUrls: Record<string, string> = {
development: "https://dev-abc123.ngrok.io/webhooks/intercom",
staging: "https://staging.example.com/webhooks/intercom",
production: "https://api.example.com/webhooks/intercom",
};
// In your webhook handler, log the environment for debugging
app.post("/webhooks/intercom", (req, res) => {
console.log(`[${intercomConfig.environment}] Webhook received: ${req.body.topic}`);
// ... process webhook
});
```
### Step 6: Environment Validation on Startup
```typescript
async function validateIntercomSetup(): Promise<void> {
const client = getClient();
const config = intercomConfig;
console.log(`[Intercom] Validating ${config.environment} setup...`);
try {
const admins = await client.admins.list();
const appName = admins.admins[0]?.name || "Unknown";
console.log(`[Intercom] Connected to workspace (admin: ${appName})`);
// Verify we're in the right workspace
if (config.environment === "production") {
// In production, verify the token has expected permissions
try {
await client.contacts.list({ perPage: 1 });
console.log("[Intercom] Contact access: OK");
} catch {
console.error("[Intercom] WARNING: Cannot access contacts");
}
}
} catch (err) {
console.error(`[Intercom] Setup validation FAILED for ${config.environment}:`, err);
if (config.environment === "production") {
throw err; // Fail fast in production
}
}
}
// Call during application startup
validateIntercomSetup().catch(console.error);
```
## GitHub Actions Environment Matrix
```yaml
jobs:
test:
strategy:
matrix:
environment: [development, staging]
runs-on: ubuntu-latest
env:
NODE_ENV: ${{ matrix.environment }}
INTERCOM_ACCESS_TOKEN: ${{ secrets[format('INTERCOM_{0}_TOKEN', matrix.environment)] }}
steps:
- uses: actions/checkout@v4
- run: npm ci
- run: npm test
```
## Error Handling
| Issue | Cause | Solution |
|-------|-------|----------|
| Wrong workspace | Dev token used in staging | Validate workspace on startup |
| Token not found | Missing env file | Copy `.env.example` to `.env.{env}` |
| Guard blocked operation | Environment mismatch | Verify `NODE_ENV` is correct |
| Webhook URL mismatch | Forgot to update URL | Use env-based URL config |
## Resources
- [Intercom Developer Hub](https://developers.intercom.com/docs/build-an-integration/getting-started)
- [Authentication](https://developers.intercom.com/docs/build-an-integration/learn-more/authentication)
- [12-Factor App Config](https://12factor.net/config)
## Next Steps
For observability setup, see `intercom-observability`.Related Skills
windsurf-multi-env-setup
Configure Windsurf IDE and Cascade AI across team members and project environments. Use when onboarding teams to Windsurf, setting up per-project Cascade configuration, or managing Windsurf settings across development, staging, and production contexts. Trigger with phrases like "windsurf team setup", "windsurf environments", "windsurf multi-project", "windsurf team config", "cascade rules per env".
webflow-multi-env-setup
Configure Webflow across development, staging, and production environments with per-environment API tokens, site IDs, and secret management via Vault/AWS/GCP. Trigger with phrases like "webflow environments", "webflow staging", "webflow dev prod", "webflow environment setup", "webflow config by env".
vercel-multi-env-setup
Configure Vercel across development, preview, and production environments with scoped secrets. Use when setting up per-environment configuration, managing environment-specific variables, or implementing environment isolation on Vercel. Trigger with phrases like "vercel environments", "vercel staging", "vercel dev prod", "vercel environment setup", "vercel env scoping".
veeva-multi-env-setup
Veeva Vault multi env setup for enterprise operations. Use when implementing advanced Veeva Vault patterns. Trigger: "veeva multi env setup".
vastai-multi-env-setup
Configure Vast.ai GPU cloud across dev, staging, and production environments. Use when isolating GPU pools per team, managing API key separation by env, or implementing spending controls per deployment tier. Trigger with phrases like "vastai environments", "vastai staging", "vastai dev prod", "vastai multi-env".
supabase-multi-env-setup
Configure Supabase across development, staging, and production with separate projects, environment-specific secrets, and safe migration promotion. Use when setting up multi-environment deployments, isolating dev from prod data, configuring per-environment Supabase projects, or promoting migrations through environments. Trigger: "supabase environments", "supabase staging", "supabase dev prod", "supabase multi-project", "supabase env config", "database branching".
speak-multi-env-setup
Configure Speak across dev, staging, and production with separate API keys and mock modes. Use when implementing multi env setup, or managing Speak language learning platform operations. Trigger with phrases like "speak multi env setup", "speak multi env setup".
snowflake-multi-env-setup
Configure Snowflake across dev, staging, and production with account-level isolation, zero-copy clones, and environment-specific RBAC. Trigger with phrases like "snowflake environments", "snowflake staging", "snowflake dev prod", "snowflake clone", "snowflake environment setup".
windsurf-workspace-setup
Initialize Windsurf workspace with project-specific AI rules. Activate when users mention "create windsurfrules", "setup workspace", "configure project ai", "initialize windsurf workspace", or "migrate to windsurf". Handles workspace configuration and team standardization. Use when working with windsurf workspace setup functionality. Trigger with phrases like "windsurf workspace setup", "windsurf setup", "windsurf".
windsurf-multi-file-editing
Manage multi-file edits with Cascade coordination. Activate when users mention "multi-file edit", "edit multiple files", "cross-file changes", "refactor across files", or "batch modifications". Handles coordinated multi-file operations. Use when working with windsurf multi file editing functionality. Trigger with phrases like "windsurf multi file editing", "windsurf editing", "windsurf".
shopify-multi-env-setup
Configure Shopify apps across development, staging, and production environments with separate stores, API credentials, and app instances. Trigger with phrases like "shopify environments", "shopify staging", "shopify dev vs prod", "shopify multi-store", "shopify environment setup".
salesforce-multi-env-setup
Configure Salesforce across Developer, Sandbox, and Production environments with proper org management. Use when setting up multi-environment deployments, configuring per-environment credentials, or implementing sandbox-to-production promotion flows. Trigger with phrases like "salesforce environments", "salesforce sandbox", "salesforce dev prod", "salesforce org management", "salesforce sandbox types".