customerio-debug-bundle

0
0
Source

Collect Customer.io debug evidence for support. Use when creating support tickets, reporting issues, or documenting integration problems. Trigger with phrases like "customer.io debug", "customer.io support ticket", "collect customer.io logs", "customer.io diagnostics".

Install

mkdir -p .claude/skills/customerio-debug-bundle && curl -L -o skill.zip "https://mcp.directory/api/skills/download/8054" && unzip -o skill.zip -d .claude/skills/customerio-debug-bundle && rm skill.zip

Installs to .claude/skills/customerio-debug-bundle

About this skill

Customer.io Debug Bundle

Current State

!node --version 2>/dev/null || echo 'Node.js: not installed' !npm list customerio-node 2>/dev/null | grep customerio || echo 'customerio-node: not installed'

Overview

Collect a comprehensive debug bundle for Customer.io support tickets: API connectivity tests, user profile inspection, SDK version info, environment validation, and a structured support report.

Prerequisites

  • Customer.io API credentials configured
  • curl available for API tests
  • User ID or email of the affected user/delivery

Instructions

Step 1: API Connectivity Diagnostic

#!/usr/bin/env bash
set -euo pipefail

echo "=== Customer.io Debug Bundle ==="
echo "Timestamp: $(date -u +%Y-%m-%dT%H:%M:%SZ)"
echo ""

# 1. Check Customer.io status
echo "--- Platform Status ---"
curl -s "https://status.customer.io/api/v2/status.json" \
  | python3 -c "import sys,json; d=json.load(sys.stdin); print(f'Status: {d[\"status\"][\"description\"]}')" \
  2>/dev/null || echo "Could not reach status page"

# 2. Test Track API authentication
echo ""
echo "--- Track API Auth ---"
TRACK_RESULT=$(curl -s -o /dev/null -w "%{http_code}" \
  -u "${CUSTOMERIO_SITE_ID}:${CUSTOMERIO_TRACK_API_KEY}" \
  -X PUT "https://track.customer.io/api/v1/customers/debug-test-$(date +%s)" \
  -H "Content-Type: application/json" \
  -d '{"email":"[email protected]"}')
echo "Track API: HTTP ${TRACK_RESULT}"

# 3. Test App API authentication
echo ""
echo "--- App API Auth ---"
APP_RESULT=$(curl -s -o /dev/null -w "%{http_code}" \
  -H "Authorization: Bearer ${CUSTOMERIO_APP_API_KEY}" \
  "https://api.customer.io/v1/campaigns")
echo "App API: HTTP ${APP_RESULT}"

# 4. DNS and latency
echo ""
echo "--- Network Diagnostics ---"
for host in track.customer.io api.customer.io; do
  LATENCY=$(curl -s -o /dev/null -w "%{time_total}" "https://${host}")
  echo "${host}: ${LATENCY}s"
done

Step 2: User Profile Investigation

// scripts/debug-user.ts
// Investigate a specific user's state in Customer.io
import { TrackClient, APIClient, RegionUS } from "customerio-node";

async function investigateUser(userId: string) {
  const cio = new TrackClient(
    process.env.CUSTOMERIO_SITE_ID!,
    process.env.CUSTOMERIO_TRACK_API_KEY!,
    { region: RegionUS }
  );

  console.log(`\n=== User Investigation: ${userId} ===\n`);

  // Test if we can identify (update) the user — confirms they exist
  try {
    await cio.identify(userId, {
      _debug_checked_at: Math.floor(Date.now() / 1000),
    });
    console.log("Profile: EXISTS (identify succeeded)");
  } catch (err: any) {
    console.log(`Profile: ERROR (${err.statusCode}: ${err.message})`);
  }

  // Test if we can track an event on the user
  try {
    await cio.track(userId, {
      name: "debug_check",
      data: { checked_at: new Date().toISOString() },
    });
    console.log("Event tracking: WORKING");
  } catch (err: any) {
    console.log(`Event tracking: ERROR (${err.statusCode}: ${err.message})`);
  }

  // Check suppression status by trying to unsuppress
  // (If user is not suppressed, this is a no-op)
  console.log("\nNote: Check suppression status in Customer.io dashboard:");
  console.log(`  People > Search "${userId}" > check Suppressed badge`);
  console.log("  Also check Activity tab for bounce/complaint events");
}

const userId = process.argv[2];
if (!userId) {
  console.error("Usage: npx tsx scripts/debug-user.ts <user-id>");
  process.exit(1);
}
investigateUser(userId);

Step 3: SDK and Environment Info

// scripts/debug-env.ts
import { readFileSync } from "fs";

function collectEnvInfo() {
  const report: Record<string, string> = {};

  // Node.js version
  report["node_version"] = process.version;
  report["platform"] = `${process.platform} ${process.arch}`;

  // SDK version
  try {
    const pkg = JSON.parse(
      readFileSync("node_modules/customerio-node/package.json", "utf-8")
    );
    report["customerio_node_version"] = pkg.version;
  } catch {
    report["customerio_node_version"] = "NOT INSTALLED";
  }

  // Environment config (redacted)
  report["site_id_set"] = process.env.CUSTOMERIO_SITE_ID ? "YES" : "NO";
  report["track_key_set"] = process.env.CUSTOMERIO_TRACK_API_KEY ? "YES" : "NO";
  report["app_key_set"] = process.env.CUSTOMERIO_APP_API_KEY ? "YES" : "NO";
  report["region"] = process.env.CUSTOMERIO_REGION ?? "us (default)";

  // Redacted key prefix for identification
  const siteId = process.env.CUSTOMERIO_SITE_ID ?? "";
  report["site_id_prefix"] = siteId.substring(0, 4) + "...";

  console.log("\n=== Environment Debug Info ===\n");
  for (const [key, value] of Object.entries(report)) {
    console.log(`${key}: ${value}`);
  }
}

collectEnvInfo();

Step 4: Generate Support Report

// scripts/generate-support-report.ts
function generateReport(issue: {
  summary: string;
  userId?: string;
  deliveryId?: string;
  errorCode?: number;
  errorMessage?: string;
  reproducible: boolean;
  startedAt?: string;
}) {
  const report = `
## Customer.io Support Report
Generated: ${new Date().toISOString()}

### Issue Summary
${issue.summary}

### Affected Resources
- User ID: ${issue.userId ?? "N/A"}
- Delivery ID: ${issue.deliveryId ?? "N/A"}
- Error Code: ${issue.errorCode ?? "N/A"}
- Error Message: ${issue.errorMessage ?? "N/A"}

### Reproduction
- Reproducible: ${issue.reproducible ? "Yes" : "Intermittent"}
- First observed: ${issue.startedAt ?? "Unknown"}

### Environment
- Node.js: ${process.version}
- Region: ${process.env.CUSTOMERIO_REGION ?? "us"}
- Site ID prefix: ${(process.env.CUSTOMERIO_SITE_ID ?? "").substring(0, 4)}...

### Steps to Reproduce
1. [Describe the action taken]
2. [Describe the expected result]
3. [Describe the actual result]

### Attachments
- [ ] Application logs (relevant time window)
- [ ] API request/response captures
- [ ] Screenshot of user profile in dashboard
- [ ] Screenshot of campaign/broadcast configuration
`.trim();

  console.log(report);
}

Step 5: Collect Application Logs

# Collect recent Customer.io related logs (adjust path for your setup)
# Grep for CIO/customerio in your application logs
grep -i "customer\\.io\\|customerio\\|cio_" /var/log/app/*.log \
  | tail -100 \
  > /tmp/cio-debug-logs.txt 2>/dev/null

# Or from Docker
docker logs your-app-container 2>&1 \
  | grep -i "customer\\.io\\|customerio\\|cio_" \
  | tail -100 \
  > /tmp/cio-debug-logs.txt

# Redact sensitive data before sharing
sed -i 's/\(api_key\|apikey\|secret\)=[^&]*/\1=REDACTED/gi' /tmp/cio-debug-logs.txt

Debug Checklist

  • Customer.io status page checked (https://status.customer.io)
  • Track API auth verified (HTTP 200)
  • App API auth verified (HTTP 200)
  • User profile exists and has email attribute
  • User is not suppressed
  • SDK version documented
  • Region configuration correct (US vs EU)
  • Error logs collected and redacted
  • Reproduction steps documented

Error Handling

IssueSolution
Status page unreachableCheck your network; try from a different network
Both APIs return 401Credentials are wrong — regenerate in dashboard
Track OK but App 401Using Track API key for App API — they're separate keys
Logs contain PIIRun redaction script before sharing with support

Resources

Next Steps

After creating debug bundle, proceed to customerio-rate-limits to implement proper rate limiting.

svg-icon-generator

jeremylongshore

Svg Icon Generator - Auto-activating skill for Visual Content. Triggers on: svg icon generator, svg icon generator Part of the Visual Content skill category.

12244

d2-diagram-creator

jeremylongshore

D2 Diagram Creator - Auto-activating skill for Visual Content. Triggers on: d2 diagram creator, d2 diagram creator Part of the Visual Content skill category.

11038

automating-mobile-app-testing

jeremylongshore

This skill enables automated testing of mobile applications on iOS and Android platforms using frameworks like Appium, Detox, XCUITest, and Espresso. It generates end-to-end tests, sets up page object models, and handles platform-specific elements. Use this skill when the user requests mobile app testing, test automation for iOS or Android, or needs assistance with setting up device farms and simulators. The skill is triggered by terms like "mobile testing", "appium", "detox", "xcuitest", "espresso", "android test", "ios test".

21836

performing-penetration-testing

jeremylongshore

This skill enables automated penetration testing of web applications. It uses the penetration-tester plugin to identify vulnerabilities, including OWASP Top 10 threats, and suggests exploitation techniques. Use this skill when the user requests a "penetration test", "pentest", "vulnerability assessment", or asks to "exploit" a web application. It provides comprehensive reporting on identified security flaws.

5823

designing-database-schemas

jeremylongshore

Design and visualize efficient database schemas, normalize data, map relationships, and generate ERD diagrams and SQL statements.

12619

optimizing-sql-queries

jeremylongshore

This skill analyzes and optimizes SQL queries for improved performance. It identifies potential bottlenecks, suggests optimal indexes, and proposes query rewrites. Use this when the user mentions "optimize SQL query", "improve SQL performance", "SQL query optimization", "slow SQL query", or asks for help with "SQL indexing". The skill helps enhance database efficiency by analyzing query structure, recommending indexes, and reviewing execution plans.

5814

You might also like

ui-ux-pro-max

nextlevelbuilder

"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."

1,5591,557

flutter-development

aj-geddes

Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.

1,8261,484

drawio-diagrams-enhanced

jgtolentino

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

1,7071,236

godot

bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

1,612905

pdf-to-markdown

aliceisjustplaying

Convert entire PDF documents to clean, structured Markdown for full context loading. Use this skill when the user wants to extract ALL text from a PDF into context (not grep/search), when discussing or analyzing PDF content in full, when the user mentions "load the whole PDF", "bring the PDF into context", "read the entire PDF", or when partial extraction/grepping would miss important context. This is the preferred method for PDF text extraction over page-by-page or grep approaches.

1,894835

nano-banana-pro

garg-aayush

Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.

1,436791