Agent skill

Customerio Known Pitfalls

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

Identify and avoid Customer.io anti-patterns and gotchas. An agent skill from jeremylongshore/tons-of-skills-marketplace.

MITAuto-check passedDevelopment

Install Customerio Known Pitfalls

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill customerio-known-pitfalls -a claude-code

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

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace customerio-known-pitfalls --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/customerio-known-pitfalls .claude/skills/customerio-known-pitfalls && 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
customerio-known-pitfalls
GitHub stars
2.8k
Token cost
~2.8k tokens
SKILL.md length
664 words
Files
3 (incl. references)
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Identify and avoid Customer.io anti-patterns and gotchas. An agent skill from jeremylongshore/tons-of-skills-marketplace.

  • Works in 4 steps: Identify the applicable pitfall before… → Validate schema, identity, consent,… → Make one reversible correction and… → …
  • Reviewing integrations
  • SKILL.md covers Prerequisites, Instructions, Output and Error Handling, plus 7 more sections
  • Needs CUSTOMERIO_TRACK_API_KEY and CUSTOMERIO_APP_API_KEY

What it does

Customerio Known Pitfalls is an agent skill from jeremylongshore/tons-of-skills-marketplace. Identify and avoid Customer.io anti-patterns and gotchas. Use when reviewing integrations, onboarding developers, or auditing existing Customer.io code. Trigger: "customer.io mistakes", "customer.io anti-patterns", "customer.io gotchas", "customer.io pitfalls", "customer.io code review".

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

It sits in Development. 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

  • Reviewing integrations
  • Onboarding developers
  • Auditing existing Customer.io code

Example prompts

  • “customer.io mistakes”
  • “customer.io anti-patterns”
  • “customer.io gotchas”
  • “/customerio-known-pitfalls”

Requirements

  • A credential in CUSTOMERIO_TRACK_API_KEY
  • A credential in CUSTOMERIO_APP_API_KEY
  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Write, Edit, Bash(npm:*), Bash(npx:*), Glob, Grep

Workflow steps

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

  1. Identify the applicable pitfall before changing an event, campaign, segment, or integration setting.
  2. Validate schema, identity, consent, environment, and idempotency in development/staging.
  3. Make one reversible correction and verify its effect with synthetic data before promotion.
  4. Record recurring failures in reviewed runbooks/contracts rather than relying on ad hoc retries.

What it can do on your machine

Read from SKILL.md and the folder at commit cfae287. 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
    • Write
    • Edit
    • Bash(npm:*)
    • Bash(npx:*)
    • Glob
    • 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 and bash).

    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):

    • docs.customer.io
    • github.com

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

  • Credentials

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

    • CUSTOMERIO_TRACK_API_KEY
    • CUSTOMERIO_APP_API_KEY

    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

Customerio Known Pitfalls loads about 2.8k tokens when it runs, and up to ~5.5k if it reads all its reference files. Until then it costs about 79 tokens; SKILL.md has 664 words of instructions outside code blocks.

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

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 cfae287, republished under its MIT licence (© jeremylongshore). 664 words, ~2,751 tokens.

Download SKILL.mdSave it as .claude/skills/customerio-known-pitfalls/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
customerio-known-pitfalls
description
Identify and avoid Customer.io anti-patterns and gotchas. Use when reviewing integrations, onboarding developers, or auditing existing Customer.io code. Trigger: "customer.io mistakes", "customer.io anti-patterns", "customer.io gotchas", "customer.io pitfalls", "customer.io code review".
allowed-tools
Read, Write, Edit, Bash(npm:*), Bash(npx:*), Glob, Grep
compatibility
Designed for Claude Code
version
1.14.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
saas, customer-io, best-practices, anti-patterns

Customer.io Known Pitfalls

Prerequisites

  • The intended workspace, consent/data classification, event schema, and deployment owner.
  • A synthetic test profile and a redacted diagnostic process; never investigate with production recipients by default.

Instructions

  1. Identify the applicable pitfall before changing an event, campaign, segment, or integration setting.
  2. Validate schema, identity, consent, environment, and idempotency in development/staging.
  3. Make one reversible correction and verify its effect with synthetic data before promotion.
  4. Record recurring failures in reviewed runbooks/contracts rather than relying on ad hoc retries.

Output

  • A documented prevention or correction for a specific delivery, data, consent, or integration pitfall.

Error Handling

ConditionSafe response
Wrong environment or recipient scopeStop sends, correct configuration, and assess/notify under the incident process.
Event schema changes unexpectedlyQuarantine invalid events and version the contract before replay.
Consent status is uncertainDo not message or replay until it is verified.

Examples

Before changing a campaign trigger, send a synthetic event with an idempotency key to development, verify the expected segment and message state, then promote through approved change control. Do not test trigger fixes on live recipient cohorts.

Overview

The 12 most common Customer.io integration mistakes, with the wrong pattern, the correct pattern, and why it matters. Use this as a code review checklist and developer onboarding reference.

The Pitfall Catalog

Pitfall 1: Wrong API Key Type
typescript
// WRONG — using Track API key for transactional messages
const api = new APIClient(process.env.CUSTOMERIO_TRACK_API_KEY!);
// Gets 401 because App API uses a DIFFERENT bearer token

// CORRECT — use the App API key
const api = new APIClient(process.env.CUSTOMERIO_APP_API_KEY!);

Why: Customer.io has two separate authentication systems. Track API uses Basic Auth (Site ID + Track Key). App API uses Bearer Auth (App Key). They are not interchangeable.

Pitfall 2: Millisecond Timestamps
typescript
// WRONG — JavaScript Date.now() returns milliseconds
await cio.identify("user-1", {
  created_at: Date.now(),           // 1704067200000 → year 55976
});

// CORRECT — Customer.io expects Unix seconds
await cio.identify("user-1", {
  created_at: Math.floor(Date.now() / 1000),  // 1704067200
});

Why: Customer.io accepts millisecond values without error but interprets them as seconds, resulting in dates thousands of years in the future. Segments using date comparisons silently break.

Pitfall 3: Track Before Identify
typescript
// WRONG — tracking before identifying creates orphaned events
await cio.track("new-user", { name: "signed_up", data: {} });
// User profile doesn't exist yet — event may be lost

// CORRECT — always identify first
await cio.identify("new-user", { email: "user@example.com" });
await cio.track("new-user", { name: "signed_up", data: {} });

Why: Track calls on non-existent users may be silently dropped. Always identify() before track().

Pitfall 4: Using Email as User ID
typescript
// WRONG — email can change, creating duplicate profiles
await cio.identify("user@example.com", { email: "user@example.com" });
// When user changes email, old profile orphaned, new one created

// CORRECT — use immutable database ID
await cio.identify("usr_abc123", {
  email: "user@example.com",    // Email as attribute, not ID
});

Why: The first argument to identify() is the permanent user ID. If you use email and the user changes it, you get two profiles. Use your database primary key instead.

Pitfall 5: Missing Email Attribute
typescript
// WRONG — user can't receive email campaigns
await cio.identify("user-1", {
  first_name: "Jane",
  plan: "pro",
  // No email attribute!
});

// CORRECT — always include email for email campaigns
await cio.identify("user-1", {
  email: "jane@example.com",
  first_name: "Jane",
  plan: "pro",
});

Why: Without an email attribute, the user profile exists but can't receive any email campaigns or transactional messages.

Pitfall 6: Dynamic Event Names
typescript
// WRONG — creates hundreds of unique event names
await cio.track("user-1", {
  name: `viewed_${productId}`,       // "viewed_SKU-12345"
  data: {},
});

// CORRECT — use a static name with data properties
await cio.track("user-1", {
  name: "product_viewed",             // Consistent, filterable
  data: { product_id: productId },    // Dynamic data in properties
});

Why: Dynamic event names pollute your event catalog and make it impossible to create campaign triggers. Use a fixed set of event names and pass variations as data properties.

Show full SKILL.md (272 more words)Show less
Pitfall 7: Blocking Request Path
typescript
// WRONG — API call adds 200ms+ to every request
app.post("/api/action", async (req, res) => {
  const result = await doBusinessLogic(req.body);
  await cio.track(req.user.id, { name: "action_taken", data: {} }); // BLOCKS response
  res.json(result);
});

// CORRECT — fire-and-forget for non-critical tracking
app.post("/api/action", async (req, res) => {
  const result = await doBusinessLogic(req.body);
  cio.track(req.user.id, { name: "action_taken", data: {} })
    .catch((err) => console.error("CIO track failed:", err.message));
  res.json(result);  // Returns immediately
});

Why: Customer.io tracking is non-critical analytics. Don't add 200ms+ latency to every user request.

Pitfall 8: No Bounce Handling
typescript
// WRONG — keep sending to bounced addresses, damaging sender reputation
// (No webhook handler for bounces)

// CORRECT — suppress users who bounce
async function handleBounceWebhook(event: { customer_id: string }) {
  await cio.suppress(event.customer_id);
  console.warn(`Suppressed bounced user: ${event.customer_id}`);
}

Why: Continuing to send to bounced addresses damages your sender reputation, eventually causing all your emails to go to spam.

Pitfall 9: New Client Per Request
typescript
// WRONG — creates a new TCP connection for every API call
app.post("/track", async (req, res) => {
  const cio = new TrackClient(siteId, apiKey, { region: RegionUS });
  await cio.track(req.body.userId, req.body.event);
  res.sendStatus(200);
});

// CORRECT — singleton, created once
const cio = new TrackClient(siteId, apiKey, { region: RegionUS });

app.post("/track", async (req, res) => {
  await cio.track(req.body.userId, req.body.event);
  res.sendStatus(200);
});

Why: Each new TrackClient() creates fresh connections. Singleton reuses TCP connections, reducing latency by 50-80%.

Pitfall 10: Inconsistent Event Names
typescript
// WRONG — multiple naming conventions
await cio.track(userId, { name: "UserSignedUp" });      // PascalCase
await cio.track(userId, { name: "user-signed-up" });     // kebab-case
await cio.track(userId, { name: "user signed up" });     // spaces

// CORRECT — consistent snake_case everywhere
await cio.track(userId, { name: "user_signed_up" });

Why: Event names are case-sensitive. Inconsistent naming means campaign triggers only match one variant, and your event catalog becomes a mess.

Pitfall 11: No Rate Limiting
typescript
// WRONG — blasting API at full speed during import
for (const user of allUsers) {
  await cio.identify(user.id, user.attrs);  // 1000+ req/sec → 429 errors
}

// CORRECT — rate-limited processing
import Bottleneck from "bottleneck";
const limiter = new Bottleneck({ maxConcurrent: 10, minTime: 15 });

for (const user of allUsers) {
  await limiter.schedule(() => cio.identify(user.id, user.attrs));
}

Why: Customer.io rate limits at ~100 req/sec. Without throttling, bulk operations trigger 429 errors and potentially get your API key temporarily blocked.

Pitfall 12: PII in Event Names
typescript
// WRONG — PII in event names is unsanitizable
await cio.track(userId, { name: `email_sent_to_john@example.com` });

// CORRECT — PII only in data properties (can be deleted per GDPR)
await cio.track(userId, {
  name: "email_sent",
  data: { recipient: "john@example.com" },
});

Why: Event names are indexed and cached. PII in event names can't be deleted for GDPR compliance. Always put PII in event data properties.

Quick Reference

#PitfallFix
1Wrong API key typeTrack key for tracking, App key for transactional
2Millisecond timestampsMath.floor(Date.now() / 1000)
3Track before identifyAlways identify() first
4Email as user IDUse immutable database ID
5Missing email attributeInclude email in identify()
6Dynamic event namesStatic names, dynamic data properties
7Blocking request pathFire-and-forget with .catch()
8No bounce handlingSuppress bounced users via webhook
9New client per requestSingleton pattern
10Inconsistent event namesAlways snake_case
11No rate limitingUse Bottleneck or p-queue
12PII in event namesPII in data properties only

Integration Audit Script

bash
# Quick grep audit for common pitfalls in your codebase
echo "=== Customer.io Pitfall Audit ==="

echo "--- Checking for Date.now() without /1000 ---"
grep -rn "created_at.*Date.now()" --include="*.ts" --include="*.js" \
  | grep -v "/ 1000" || echo "OK"

echo "--- Checking for new TrackClient inside functions ---"
grep -rn "new TrackClient" --include="*.ts" --include="*.js" \
  | grep -v "^.*const\|^.*let\|^.*export" || echo "OK"

echo "--- Checking for dynamic event names ---"
grep -rn "name:.*\`" --include="*.ts" --include="*.js" \
  | grep "track\|Track" || echo "OK"

echo "--- Checking for blocking await in routes ---"
grep -rn "await.*cio\.\|await.*track\.\|await.*identify" --include="*.ts" \
  | grep "router\.\|app\." || echo "Review these for fire-and-forget"

Resources

Next Steps

After reviewing pitfalls, use customerio-reliability-patterns for fault tolerance.

© 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 2 other files (references) in skills/.curated/customerio-known-pitfalls of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • references/implementation-guide.md
  • references/implementation.md

Open the folder on GitHubat commit cfae287

Compare with similar skills

Customerio Known Pitfalls 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.

Customerio Known Pitfalls compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Customerio Known Pitfalls this skilljeremylongshore/tons-of-skills-marketplace2.8k—~2.8kAutomated safety check: PassMIT
Backend Code Reviewlanggenius/dify158k—~676Automated safety check: PassCustom licence
Native Data FetchingCherryHQ/cherry-studio-app4k6 repos~2.9kAutomated safety check: NotesMIT
Twenty App Entity Developmenttwentyhq/twenty58k—~1.8kAutomated safety check: PassCustom licence
Go Pedantrychromedp/chromedp13k—~3.7kAutomated safety check: PassMIT
Gumroad Prod Consoleantiwork/gumroad9.8k—~2.9kAutomated safety check: NotesMIT

Similar skills

  • Backend Code Review

    langgenius/dify

    Reviews backend code under api/ for concrete, reproducible defects, routes to rule packs for architecture, schema, repositories and SQLAlchemy, and ranks findings from P0 to P3.

    158k GitHub stars~676 tokensUpdated today
    DevelopmentAuto-check passed
  • Native Data Fetching

    CherryHQ/cherry-studio-app

    A skill your agent uses when implementing or debugging ANY network request, API call, or data fetching.

    4k GitHub starsUsed in 6 repos~2.9k tokens
    DevelopmentAuto-check: notes
  • Guides changes to an existing Twenty app: adding or editing objects, layouts, logic functions and front components, with a plan stated before multi-entity edits.

    58k GitHub stars~1.8k tokensUpdated today
    DevelopmentAuto-check passed
  • Go Pedantry

    chromedp/chromedp

    This skill should be used when the user is writing Go code and needs guidance on Go-specific pedantry: error wrapping with fmt.Errorf and %w, interface design (accept interfaces return structs)…

    13k GitHub stars~3.7k tokensUpdated today
    DevelopmentAuto-check passed
  • Gumroad Prod Console

    antiwork/gumroad

    Execute read-only Ruby/Rails commands against Gumroad's production database for debugging and investigation.

    9.8k GitHub stars~2.9k tokensUpdated today
    DevelopmentAuto-check: notes
  • LangBot Plugin Development

    langbot-app/LangBot

    Guides building, debugging and testing LangBot plugins: components, SDK calls, README and locale rules, SDK pitfalls and WebSocket-based testing.

    18k GitHub stars~3.9k tokensUpdated today
    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
  • Adapting Transfer Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Agent Context Loader

    jeremylongshore/tons-of-skills-marketplace

    Execute proactive auto-loading: automatically detects and loads agents.md files.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Aggregating Performance Metrics

    jeremylongshore/tons-of-skills-marketplace

    Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.

    2.8k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Analyzing Capacity Planning

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.

    2.8k GitHub stars~947 tokensUpdated today
    Auto-check passed
  • Analyzing Database Indexes

    jeremylongshore/tons-of-skills-marketplace

    Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~2k tokensUpdated today
    Auto-check passed

Questions about Customerio Known Pitfalls

What does Customerio Known Pitfalls do?

Identify and avoid Customer.io anti-patterns and gotchas. An agent skill from jeremylongshore/tons-of-skills-marketplace. Customerio Known Pitfalls is an agent skill from jeremylongshore/tons-of-skills-marketplace.io anti-patterns and gotchas.

When should I use Customerio Known Pitfalls?

Customerio Known Pitfalls fits situations like: reviewing integrations; onboarding developers; auditing existing Customer.io code.

How do I install Customerio Known Pitfalls in Claude Code?

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

How do I install Customerio Known Pitfalls in Codex?

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

Can I use Customerio Known Pitfalls 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 customerio-known-pitfalls -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/customerio-known-pitfalls, .gemini/skills/customerio-known-pitfalls, .github/skills/customerio-known-pitfalls and .opencode/skills/customerio-known-pitfalls in your project.

What does Customerio Known Pitfalls need to run?

Going by SKILL.md and its folder, Customerio Known Pitfalls needs credentials named CUSTOMERIO_TRACK_API_KEY and CUSTOMERIO_APP_API_KEY. Our summary lists: A credential in CUSTOMERIO_TRACK_API_KEY; A credential in CUSTOMERIO_APP_API_KEY. Its frontmatter pre-approves these tools: Read, Write, Edit, Bash(npm:*), Bash(npx:*), Glob, Grep. Compatibility (from SKILL.md): Designed for Claude Code.

Does Customerio Known Pitfalls access the network?

SKILL.md names 2 domains. As links in the text: docs.customer.io and github.com. This is read from the text; nothing was executed.

Is Customerio Known Pitfalls 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 Customerio Known Pitfalls use?

Customerio Known Pitfalls 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 Customerio Known Pitfalls use?

About 2.8k tokens (SKILL.md is roughly 11k 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 2.7k tokens, read only when the agent opens those files.

What are the alternatives to Customerio Known Pitfalls?

Skills that share tags, products or a category with Customerio Known Pitfalls: Backend Code Review (langgenius/dify, 158k stars), Native Data Fetching (CherryHQ/cherry-studio-app, 4k stars), Twenty App Entity Development (twentyhq/twenty, 58k stars) and Go Pedantry (chromedp/chromedp, 13k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Customerio Known Pitfalls?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,827 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 10, 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.