Agent skill

Intercom Reference Architecture

by jeremylongshore in jeremylongshore/tons-of-skills-marketplace

Implement Intercom reference architecture with layered project structure.

MITAuto-check passedDevelopment

Install Intercom Reference Architecture

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill intercom-reference-architecture -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace intercom-reference-architecture --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/intercom-reference-architecture .claude/skills/intercom-reference-architecture && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
intercom-reference-architecture
GitHub stars
2.8k
Token cost
~1.6k tokens
SKILL.md length
583 words
Files
4 (incl. references)
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Implement Intercom reference architecture with layered project structure.

  • Works in 5 steps: Client layer (src/intercom/client.ts) —… → Contacts service… → Conversations service… → …
  • Designing new Intercom integrations
  • SKILL.md covers Overview, Prerequisites, Instructions and Output, plus 4 more sections
  • Needs INTERCOM_ACCESS_TOKEN

What it does

Intercom Reference Architecture is an agent skill from jeremylongshore/tons-of-skills-marketplace. Implement Intercom reference architecture with layered project structure. Use when designing new Intercom integrations, reviewing project structure, or establishing architecture standards for Intercom applications. Trigger with phrases like "intercom architecture", "intercom project structure", "how to organize intercom", "intercom layout", "intercom design patterns".

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `references/examples.md`, `references/implementation.md` and `references/project-structure.md`). Compatibility notes: Designed for Claude Code

It sits in Development, covering Design patterns. It works with Intercom. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • Designing new Intercom integrations
  • Reviewing project structure
  • Establishing architecture standards for Intercom applications
  • With phrases like intercom architecture

Example prompts

  • “intercom architecture”
  • “intercom project structure”
  • “how to organize intercom”
  • “/intercom-reference-architecture”

Requirements

  • Node.js
  • A credential in INTERCOM_ACCESS_TOKEN
  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Grep

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Client layer (src/intercom/client.ts) — a lazy singleton
  2. Contacts service (src/services/contacts.service.ts) —
  3. Conversations service (src/services/conversations.service.ts) —
  4. Articles service (src/services/articles.service.ts) — Help Center
  5. Wire the data flow — Intercom pushes events to your webhook router; the

What it can do on your machine

Read from SKILL.md and the folder at commit 23ea8d4. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Grep

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • developers.intercom.com
    • npmjs.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • INTERCOM_ACCESS_TOKEN

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Designed for Claude Code

    From compatibility in the SKILL.md frontmatter.

Context cost

Intercom Reference Architecture loads about 1.6k tokens when it runs, and up to ~5.1k if it reads all its reference files. Until then it costs about 101 tokens; SKILL.md has 583 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~101
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit 23ea8d4, republished under its MIT licence (© jeremylongshore). 583 words, ~1,612 tokens.

Download SKILL.mdSave it as .claude/skills/intercom-reference-architecture/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
intercom-reference-architecture
description
Implement Intercom reference architecture with layered project structure. Use when designing new Intercom integrations, reviewing project structure, or establishing architecture standards for Intercom applications. Trigger with phrases like "intercom architecture", "intercom project structure", "how to organize intercom", "intercom layout", "intercom design patterns".
allowed-tools
Read, Grep
compatibility
Designed for Claude Code
version
1.6.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
saas, support, messaging, intercom

Intercom Reference Architecture

Overview

A production-ready reference architecture for Intercom integrations built on four layers — API/webhook, service, Intercom client, and infrastructure — with type-safe SDK usage, webhook processing, contact sync, and Help Center management. Use it to scaffold a new integration or to review an existing one against a known-good structure.

The layers (top to bottom): the API / Webhook layer (Express routes, webhook endpoints) calls into the service layer (contacts, conversations, articles — business logic and orchestration), which calls the Intercom client layer (a singleton intercom-client SDK wrapper with typed errors, caching, and rate limit handling), all resting on infrastructure (Redis cache, job queue, monitoring). Keeping dependencies flowing strictly downward is what prevents the circular imports and test-isolation problems listed under Error Handling.

Prerequisites

  • Node.js project with TypeScript and the intercom-client npm package installed.
  • An Intercom access token — the SDK authenticates every request with a Bearer token read from the INTERCOM_ACCESS_TOKEN environment variable (see Step 1). Create one under Intercom → Developer Hub → your app → Authentication. Never commit it; load it from the environment.
  • For webhook verification, your app's client secret to validate the X-Hub-Signature header on inbound webhook POSTs.
  • Redis (optional) if you enable the caching layer.

Instructions

Use Read/Grep to inspect the current project layout, then build each layer in order — the client layer is the dependency root for every service.

  1. Client layer (src/intercom/client.ts) — a lazy singleton getClient() that reads INTERCOM_ACCESS_TOKEN once, plus an IntercomServiceError that wraps raw SDK errors into a typed, retry-aware shape. Skeleton:

    typescript
    let instance: IntercomClient | null = null;
    export function getClient(): IntercomClient {
      if (!instance) {
        const token = process.env.INTERCOM_ACCESS_TOKEN;
        if (!token) throw new Error("INTERCOM_ACCESS_TOKEN required");
        instance = new IntercomClient({ token });
      }
      return instance;
    }
  2. Contacts service (src/services/contacts.service.ts) — findOrCreate (search-before-create to avoid 409s), syncFromCRM, mergeLead, and a searchAll async generator for cursor pagination.

  3. Conversations service (src/services/conversations.service.ts) — replyAsAdmin, addNote, closeWithMessage, and a scoped open-queue search.

  4. Articles service (src/services/articles.service.ts) — Help Center article create/list, defaulting new articles to draft.

  5. Wire the data flow — Intercom pushes events to your webhook router; the service layer makes API calls back and persists to your database + cache.

The full project tree, every service method, and the layer/data-flow diagrams are in the full implementation walkthrough; the complete directory layout is in project-structure.md.

Show full SKILL.md (244 more words)Show less

Output

Applying this skill produces a layered Intercom integration:

  • A src/intercom/ client layer (singleton SDK wrapper + typed errors).
  • A src/services/ layer with contacts, conversations, and articles services.
  • src/webhooks/, src/sync/, src/api/, and src/cache/ directories wired to the layers above.
  • Per-environment config/ files and a tests/ tree with unit + integration suites.

When used to review an existing project, the output is a gap report: which layers exist, which are missing, and where dependency direction is violated.

Error Handling

IssueCauseSolution
Circular dependenciesService A imports B imports AUse dependency injection
Client initialization raceAsync token fetchLazy singleton pattern
Cache inconsistencyStale data after updateWebhook-driven invalidation
Test isolationShared SDK stateresetClient() in beforeEach
401 UnauthorizedMissing/invalid INTERCOM_ACCESS_TOKENVerify the env var is loaded before getClient()
429 Too Many RequestsRate limit exceededRetry with backoff — IntercomServiceError.retryable is true here

Examples

Once the client and service layers exist, wiring them together is a few lines — sync a CRM user, reply to and close a conversation, page through contacts, or publish an article:

typescript
const contacts = new ContactsService();
const contact = await contacts.syncFromCRM({
  id: "crm_8842", email: "ada@example.com", name: "Ada Lovelace",
  plan: "enterprise", company: "Analytical Engines Ltd",
});

See examples.md for the full set of runnable usage snippets (conversation reply/close, paginated search, Help Center publish).

Resources

Next Steps

For multi-environment configuration and deployment, see the intercom-multi-env-setup skill, which extends the config/ layer described above into per-environment credential and rate-limit management.

© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (references) in skills/.curated/intercom-reference-architecture of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • references/examples.md
  • references/implementation.md
  • references/project-structure.md

Open the folder on GitHubat commit 23ea8d4

Compare with similar skills

Intercom Reference Architecture next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Intercom Reference Architecture compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Intercom Reference Architecture this skilljeremylongshore/tons-of-skills-marketplace2.8k—~1.6kAutomated safety check: PassMIT
Mastering Python SkillSpillwaveSolutions/agent-brain119—~1.4kAutomated safety check: NotesMIT
Content-Hash File Cache Patternaffaan-m/ECC275k5 repos~1.4kAutomated safety check: PassMIT
Rails ArchitectureThibautBaissac/rails_ai_agents665—~1.5kAutomated safety check: PassMIT
Architect ReviewAratKruglik/claude-laravel1558 repos~2.2kAutomated safety check: PassNone
API Docslangchain-ai/skills-benchmarks118—~358Automated safety check: PassMIT

Similar skills

  • Mastering Python Skill

    SpillwaveSolutions/agent-brain

    Modern Python coaching covering language foundations through advanced production patterns.

    119 GitHub stars~1.4k tokensUpdated 19 days ago
    DevelopmentAuto-check: notes
  • Caches slow file processing results in Python keyed by a SHA-256 hash of the file content, so renames still hit the cache and edits invalidate it automatically.

    275k GitHub starsUsed in 5 repos~1.4k tokens
    DevelopmentAuto-check passed
  • Rails Architecture

    ThibautBaissac/rails_ai_agents

    Guides modern Rails 8 code architecture decisions and patterns.

    665 GitHub stars~1.5k tokensUpdated 4 mo ago
    DevelopmentAuto-check passed
  • Architect Review

    AratKruglik/claude-laravel

    Master software architect specializing in modern architecture patterns, clean architecture, microservices, event-driven systems, and DDD.

    155 GitHub starsUsed in 8 repos~2.2k tokens
    DevelopmentAuto-check passed
  • API Docs

    langchain-ai/skills-benchmarks

    Official

    OpenAPI documentation and REST API design patterns. An agent skill from langchain-ai/skills-benchmarks.

    118 GitHub stars~358 tokensUpdated 17 days ago
    DevelopmentAuto-check passed
  • Library Patterns

    ccashwell/evm-cortex

    Library design patterns for reusable Solidity code. An agent skill from ccashwell/evm-cortex.

    131 GitHub stars~1.6k tokensUpdated 9 days ago
    DevelopmentAuto-check passed

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Analyzing Text With NLP

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to perform natural language processing and text analysis using the nlp-text-analyzer plugin.

    2.8k GitHub starsUsed in 1 repo~819 tokens
    Auto-check passed
  • Building Neural Networks

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill allows AI assistant to construct and configure neural network architectures using the neural-network-builder plugin.

    2.8k GitHub starsUsed in 1 repo~1k tokens
    Auto-check passed
  • Detecting Data Anomalies

    jeremylongshore/tons-of-skills-marketplace

    Process identify anomalies and outliers in datasets using machine learning algorithms.

    2.8k GitHub starsUsed in 1 repo~1.4k tokens
    Auto-check passed
  • Explaining Machine Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill enables AI assistant to provide interpretability and explainability for machine learning models.

    2.8k GitHub starsUsed in 1 repo~1k tokens
    Auto-check passed
  • Optimizing Prompts

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill optimizes prompts for large language models (llms) to reduce token usage, lower costs, and improve performance.

    2.8k GitHub starsUsed in 1 repo~1k tokens
    Auto-check passed

Works with

Questions about Intercom Reference Architecture

What does Intercom Reference Architecture do?

Implement Intercom reference architecture with layered project structure. Intercom Reference Architecture is an agent skill from jeremylongshore/tons-of-skills-marketplace. Implement Intercom reference architecture with layered project structure.

When should I use Intercom Reference Architecture?

Intercom Reference Architecture fits situations like: designing new Intercom integrations; reviewing project structure; establishing architecture standards for Intercom applications; with phrases like intercom architecture.

How do I install Intercom Reference Architecture in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill intercom-reference-architecture -a claude-code`. Or copy the skill folder (skills/.curated/intercom-reference-architecture in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/intercom-reference-architecture in your project. Claude Code loads it when a task matches its description.

How do I install Intercom Reference Architecture in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill intercom-reference-architecture -a codex`. Or copy the skill folder (skills/.curated/intercom-reference-architecture in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/intercom-reference-architecture in your project. Codex loads it when a task matches its description.

Can I use Intercom Reference Architecture in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill intercom-reference-architecture -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/intercom-reference-architecture, .gemini/skills/intercom-reference-architecture, .github/skills/intercom-reference-architecture and .opencode/skills/intercom-reference-architecture in your project.

What does Intercom Reference Architecture need to run?

Going by SKILL.md and its folder, Intercom Reference Architecture needs credentials named INTERCOM_ACCESS_TOKEN. Our summary lists: Node.js; A credential in INTERCOM_ACCESS_TOKEN. Its frontmatter pre-approves these tools: Read, Grep. Compatibility (from SKILL.md): Designed for Claude Code.

Does Intercom Reference Architecture access the network?

SKILL.md names 2 domains. As links in the text: developers.intercom.com and npmjs.com. This is read from the text; nothing was executed.

Is Intercom Reference Architecture safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Intercom Reference Architecture use?

Intercom Reference Architecture is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Intercom Reference Architecture use?

About 1.6k tokens (SKILL.md is roughly 6.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.5k tokens, read only when the agent opens those files.

What are the alternatives to Intercom Reference Architecture?

Skills that share tags, products or a category with Intercom Reference Architecture: Mastering Python Skill (SpillwaveSolutions/agent-brain, 119 stars), Content-Hash File Cache Pattern (affaan-m/ECC, 275k stars), Rails Architecture (ThibautBaissac/rails_ai_agents, 665 stars) and Architect Review (AratKruglik/claude-laravel, 155 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Intercom Reference Architecture?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,821 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 8, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.