-
Notifications
You must be signed in to change notification settings - Fork 1
Restructure skills based on review: fix React bug, replace search with customer-360 #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 6 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
41fb6ad
Add CLAUDE.md to orient Claude Code in this repository
levindixon 2042dbf
Fix missing api_base in React SDK Messenger examples
levindixon 68e5f89
Remove intercom-search skill
levindixon 239733f
Rename intercom-insights to intercom-analysis and restructure
levindixon 12e5463
Add troubleshooting and improve install-messenger skill
levindixon 895ff12
Add customer-360 skill and update project documentation
levindixon 191e34d
Remove api_base from code examples; only require for EU/AU regions
levindixon d2668dc
Add missing installation methods from Intercom install page
levindixon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| # CLAUDE.md | ||
|
|
||
| This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. | ||
|
|
||
| ## What This Is | ||
|
|
||
| Intercom plugin for Claude Code — a skill-based integration (not compiled code). Skills are pure Markdown files that Claude reads at runtime to interact with Intercom workspaces via a remote MCP server. | ||
|
|
||
| ## Architecture | ||
|
|
||
| ``` | ||
| User → Claude Code CLI → Skill (SKILL.md) → MCP Server (https://mcp.intercom.com/mcp) → Intercom API | ||
| ``` | ||
|
|
||
| - **No build step, no dependencies, no tests.** The plugin is entirely declarative. | ||
| - `.mcp.json` routes the `intercom` namespace to the remote HTTP-based MCP server. | ||
| - `.claude-plugin/plugin.json` is the plugin manifest for Claude Code's plugin registry. | ||
| - `.claude/settings.local.json` manages local permissions (currently allows WebFetch from raw.githubusercontent.com). | ||
|
|
||
| ## Skills | ||
|
|
||
| Three skills live under `skills/`, each in its own directory: | ||
|
|
||
| | Skill | Trigger | Key Files | | ||
| | ------------------- | ---------------------------------------------------------- | -------------------------------------------- | | ||
| | `install-messenger` | Explicit: `/intercom:install-messenger [framework]` | `SKILL.md`, `references/framework-guides.md` | | ||
| | `intercom-analysis` | Auto-triggered by keywords | `SKILL.md`, `references/mcp-tools.md` | | ||
| | `customer-360` | Explicit: `/intercom:customer-360 [email or company name]` | `SKILL.md` | | ||
|
|
||
| ### Skill File Structure | ||
|
|
||
| Each skill directory contains: | ||
|
|
||
| - `SKILL.md` — Main skill file with YAML frontmatter (`name`, `description`, optional `disable-model-invocation`, `argument-hint`) followed by Markdown instructions Claude reads at runtime. | ||
| - `references/` — Supplementary docs loaded on demand for progressive disclosure (keeps SKILL.md concise). | ||
|
|
||
| ### Invocation Modes | ||
|
|
||
| - **Auto-triggered:** No `disable-model-invocation` in frontmatter. Claude activates the skill when the user's intent matches the `description` field. | ||
| - **Explicit:** `disable-model-invocation: true` in frontmatter. Only invoked via `/intercom:<skill-name>`. | ||
|
|
||
| ## Key Conventions | ||
|
|
||
| - **Security-first:** `install-messenger` defaults to JWT-based identity verification (HS256). Insecure mode requires explicit user opt-in. Never default to insecure installation. | ||
| - **Progressive disclosure:** Keep SKILL.md focused on workflow logic. Move API references, framework-specific code, and tool documentation into `references/` subdirectories. | ||
| - **Read-only access:** The MCP server only supports search and retrieval operations — no create, update, or delete. | ||
| - **Regional awareness:** Intercom supports US, EU (Ireland), and Australia data residency. Currently US-only; EU/AU planned. | ||
|
|
||
| ## Development Workflow | ||
|
|
||
| 1. Edit SKILL.md files or reference documents | ||
| 2. Test by running skills in Claude Code CLI (e.g., `/intercom:install-messenger react`) | ||
| 3. For auto-triggered skills, test by typing natural language that matches the skill's `description` field | ||
| 4. Push to GitHub — the plugin registry picks up changes from the repository |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| --- | ||
| name: customer-360 | ||
| license: MIT | ||
| description: > | ||
| Build a comprehensive customer profile from Intercom data, including | ||
| conversation history, account context, and interaction timeline. Use when | ||
| the user asks to "look up a customer", "customer profile", "customer 360", | ||
| "tell me about this customer", "summarize a customer's history", or provides | ||
| a customer email or company name and wants a full picture. | ||
| disable-model-invocation: true | ||
| argument-hint: "[email or company name]" | ||
| --- | ||
|
|
||
| # Customer 360 | ||
|
|
||
| Produce a comprehensive customer profile by aggregating data from across the Intercom workspace. | ||
|
|
||
| ## Workflow | ||
|
|
||
| ### Step 1: Identify the Customer | ||
| - Parse the user's input for an email, name, or company | ||
| - Use `search_contacts` to find the contact (by email is most reliable) | ||
| - If company name given, search contacts by email domain | ||
| - Use `get_contact` to fetch the full profile (attributes, tags, segments, companies) | ||
|
|
||
| ### Step 2: Gather Conversation History | ||
| - Use `search_conversations` filtered to this contact's conversations | ||
| - Paginate to get all conversations (not just the first page) | ||
| - For the most recent/relevant conversations, use `get_conversation` for full threads | ||
|
|
||
| ### Step 3: Build the Profile | ||
| Produce a markdown profile with these sections: | ||
|
|
||
| #### Contact Summary | ||
| - Name, email, role (user/lead), company | ||
| - Location, timezone, last seen | ||
| - Plan/tier (if available via custom attributes) | ||
| - Tags and segments | ||
|
|
||
| #### Conversation History | ||
| - Total conversation count | ||
| - Table: ID | Subject | State | Channel | Date | ||
| - Highlight any currently open/snoozed conversations | ||
|
|
||
| #### Key Themes | ||
| - Common topics across conversations | ||
| - Recurring issues or feature requests | ||
| - Sentiment signals (escalations, positive feedback) | ||
|
|
||
| #### Timeline | ||
| - Chronological list of significant interactions | ||
| - First contact → most recent activity | ||
|
|
||
| #### Open Items | ||
| - Unresolved conversations | ||
| - Pending questions or follow-ups | ||
|
|
||
| ### Step 4: Present and Offer Next Steps | ||
| - Present the profile | ||
| - Offer to dive deeper into any conversation | ||
| - Offer to search for similar customers (same company, same issues) | ||
|
|
||
| ## Best Practices | ||
| - Always cite conversation IDs so the user can find them in the Intercom inbox | ||
| - Note data freshness — states may have changed since events occurred | ||
| - If the contact has many conversations, summarize the most recent 10-15 and note the total count | ||
| - Handle cases where the contact exists but has no conversations | ||
|
|
||
| ## Troubleshooting | ||
|
|
||
| ### Contact Not Found | ||
| Symptom: No results for the provided email or name. | ||
| Solution: Check for typos. Try searching by email domain to find related contacts. Ask the user to confirm the identifier. | ||
|
|
||
| ### Too Many Conversations | ||
| Symptom: Contact has 50+ conversations, making full analysis impractical. | ||
| Solution: Focus on the most recent 10-15 conversations. Summarize older ones by theme rather than individually. Note the total count. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,101 @@ | ||
| --- | ||
| name: intercom-analysis | ||
| license: MIT | ||
| description: > | ||
| Analyze Intercom conversations to identify support patterns, investigate | ||
| customer issues, and look up contacts and companies. Use when the user asks | ||
| to "analyze conversations", "find support patterns", "search Intercom", | ||
| "look up a customer", "investigate a customer issue", "check contact info", | ||
| or asks questions about their Intercom data. | ||
| --- | ||
|
|
||
| # Intercom Analysis | ||
|
|
||
| Use the Intercom MCP server to analyze customer conversations, look up contacts and companies, identify support patterns, and investigate customer issues. | ||
|
|
||
| Refer to `references/mcp-tools.md` for detailed tool reference, query DSL syntax, search strategies, and field-level documentation for each MCP tool. | ||
|
|
||
| ## Pattern Analysis Workflow | ||
|
|
||
| When the user asks to analyze patterns or trends in their support data, follow this workflow: | ||
|
|
||
| 1. **Define scope.** Clarify what the user wants to analyze — a time period, topic, customer segment, or conversation state. Ask if unclear. | ||
|
|
||
| 2. **Fetch a representative sample.** Search for conversations matching the scope. Retrieve at least 10–20 conversations to establish meaningful patterns. Paginate if the first page is insufficient. | ||
|
|
||
| 3. **Read conversation details.** For each relevant conversation, fetch the full conversation to read the actual messages. Summaries from search results alone are often insufficient for pattern analysis. | ||
|
|
||
| 4. **Identify recurring themes.** Group conversations by: | ||
| - Common topics or keywords | ||
| - Product areas or features mentioned | ||
| - Error messages or symptoms reported | ||
| - Resolution approaches used | ||
| - Time to resolution | ||
|
|
||
| 5. **Quantify and summarize.** Present findings with counts and proportions (e.g., "8 of 15 conversations mention timeout errors"). Highlight the most common patterns first. | ||
|
|
||
| 6. **Recommend actions.** Based on patterns, suggest concrete next steps — knowledge base articles to create, bugs to investigate, or process improvements. | ||
|
|
||
| **Output artifact:** Produce a markdown report with the following structure: | ||
|
|
||
| - **Theme Summary** — Table of identified themes with conversation counts and percentage of total | ||
| - **Top Issues** — The 3–5 most common issues with representative conversation excerpts | ||
| - **Recommended Actions** — Prioritized list of concrete next steps based on the patterns found | ||
|
|
||
| ## Issue Investigation Steps | ||
|
|
||
| When a user asks you to investigate a specific customer issue or incident: | ||
|
|
||
| 1. **Identify the customer.** Look up the contact by email, name, or ID. Get their full profile to understand their account context (plan, company, location, custom attributes). | ||
|
|
||
| 2. **Trace the timeline.** Search for all conversations from this contact, ordered by date. Fetch each conversation to build a chronological narrative of their interactions. | ||
|
|
||
| 3. **Check for multi-customer impact.** Search for conversations from other contacts mentioning the same symptoms, error messages, or affected feature. This determines if the issue is isolated or widespread. | ||
|
|
||
| 4. **Examine conversation details.** For the most relevant conversations, read through the full thread including internal notes. Notes from teammates often contain diagnostic information and root cause analysis. | ||
|
|
||
| 5. **Summarize findings.** Present: | ||
| - A timeline of the customer's interactions | ||
| - The core issue and any error messages | ||
| - What was tried and what resolved it (if anything) | ||
| - Whether other customers are affected | ||
| - Links to the relevant conversations | ||
|
|
||
| **Output artifact:** Produce a timeline summary with: | ||
|
|
||
| - **Customer Context** — Contact details, company, plan, and account attributes | ||
| - **Interaction Timeline** — Chronological list of conversations with dates, channels, and outcomes | ||
| - **Impact Assessment** — Whether the issue affects other customers, with links to related conversations | ||
|
|
||
| ## Best Practices | ||
|
|
||
| - **Start broad, then narrow.** Begin with a general search to understand the landscape, then apply filters to focus on what matters. | ||
|
|
||
| - **Always cite conversation links.** When referencing specific conversations, include their IDs so the user can find them in the Intercom inbox. Format as: `Conversation #12345`. | ||
|
|
||
| - **State data limitations.** If search results are paginated and you've only seen the first page, say so. If the data doesn't support a conclusion, be explicit about what would be needed to confirm it. | ||
|
|
||
| - **Respect data freshness.** The MCP server returns live data from the Intercom workspace. Results reflect the current state — if the user asks about historical trends, note that conversation states may have changed since the events occurred. | ||
|
|
||
| - **Combine tools effectively.** A typical workflow involves `search` or `search_conversations` to find relevant items, then `get_conversation` or `get_contact` to get full details. Don't try to answer complex questions from search results alone. | ||
|
|
||
| - **Handle empty results gracefully.** If a search returns no results, suggest alternatives: broaden the query with fewer or different keywords, try a different object type (contacts instead of conversations, or vice versa), check for typos in email addresses or names, or run an unfiltered search first to confirm data exists. | ||
|
|
||
| - **Format search results for scannability.** Present results as clean tables. For conversations: ID | Subject | State | Last Updated (with relative timestamps). For contacts: ID | Name | Email | Last Seen. After displaying results, offer to fetch full details (e.g., "Want me to pull up the full thread for conversation #12345?" or "I can get the complete profile — want to see it?"). | ||
|
|
||
| ## Troubleshooting | ||
|
|
||
| ### MCP Server Disconnected | ||
| Error: Tool calls fail with connection/timeout errors | ||
| Cause: MCP server unreachable or authentication expired | ||
| Solution: Re-authenticate, check network, try again later | ||
|
|
||
| ### Search Returns 0 Results | ||
| Error: Empty result set when matches expected | ||
| Cause: Query too narrow, wrong field names, or no matching data | ||
| Solution: Broaden filters, try different object type, run unfiltered search first | ||
|
|
||
| ### Workspace Has No Conversations | ||
| Error: All conversation searches return empty | ||
| Cause: New/unused workspace or access scope limitation | ||
| Solution: Confirm workspace has data, try contact/company searches instead |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.