intercom-frontend
Installation
SKILL.md
Intercom Frontend Integration
Core Philosophy
- The Messenger is a guest in your app -- boot it intentionally, shut it down on logout, and call update() on every route change. Stale sessions cause data leaks and ghost conversations.
- There is no startCall() -- phone and video calls cannot be initiated from the JS API. Use trackEvent to trigger Workflows that route to phone support. This is the most common misconception.
- Identity verification is non-negotiable -- without JWT or HMAC, anyone can impersonate users by booting with their email. Generate tokens server-side only.
- Performance is opt-in -- the widget is ~300KB+ with heartbeat timers. Lazy load with facade pattern or initializeDelay to protect Core Web Vitals.
- Custom attributes go inline -- pass them at the top level of boot/update, never nested under a custom_attributes key.