Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Install and configure Customer.io SDK/CLI authentication. Use when setting up a new Customer.io integration, configuring API keys, or initializing Customer.io in your project. Trigger: "install customer.io", "setup customer.io", "customer.io auth", "configure customer.io API key", "customer.io credentials".
.claude/skills/jeremylongshore-customerio-install-auth/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 105% | 0% |
| case-20 | ✗→✓ | ▲ Improved | 40% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 49% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 20% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 51% | 0% |
Set up the customerio-node SDK and configure authentication for Customer.io's two API surfaces: the Track API (identify users, track events) and the App API (transactional messages, broadcasts, data queries).
| Client | Auth Method | Key Source | Use For | |--------|-------------|-----------|---------| | TrackClient | Basic Auth (Site ID + API Key) | Track API credentials | identify(), track(), trackAnonymous(), suppress(), destroy() | | APIClient | Bearer Token (App API Key) | App API credentials | sendEmail(), sendPush(), triggerBroadcast() |
bashnpm install customerio-node
The package exports TrackClient, APIClient, RegionUS, RegionEU, SendEmailRequest, and SendPushRequest.
bash# .env — NEVER commit this file CUSTOMERIO_SITE_ID=your-site-id-here CUSTOMERIO_TRACK_API_KEY=your-track-api-key-here CUSTOMERIO_APP_API_KEY=your-app-api-key-here CUSTOMERIO_REGION=us # "us" or "eu"
Add .env to .gitignore if not already there.
typescript// lib/customerio.ts import { TrackClient, RegionUS, RegionEU } from "customerio-node"; function getRegion() { return process.env.CUSTOMERIO_REGION === "eu" ? RegionEU : RegionUS; } // Singleton — reuse across your app let trackClient: TrackClient | null = null; export function getTrackClient(): TrackClient { if (!trackClient) { const siteId = process.env.CUSTOMERIO_SITE_ID; const apiKey = process.env.CUSTOMERIO_TRACK_API_KEY; if (!siteId || !apiKey) { throw new Error( "Missing CUSTOMERIO_SITE_ID or CUSTOMERIO_TRACK_API_KEY" ); } trackClient = new TrackClient(siteId, apiKey, { region: getRegion() }); } return trackClient; }
typescript// lib/customerio-app.ts import { APIClient, RegionUS, RegionEU } from "customerio-node"; let appClient: APIClient | null = null; export function getAppClient(): APIClient { if (!appClient) { const appKey = process.env.CUSTOMERIO_APP_API_KEY; if (!appKey) { throw new Error("Missing CUSTOMERIO_APP_API_KEY"); } const region = process.env.CUSTOMERIO_REGION === "eu" ? RegionEU : RegionUS; appClient = new APIClient(appKey, { region }); } return appClient; }
typescript// scripts/verify-customerio.ts import { getTrackClient } from "../lib/customerio"; async function verify() { const cio = getTrackClient(); try { // Identify a test user — if credentials are wrong, this throws await cio.identify("test-verify-user", { email: "verify@example.com", created_at: Math.floor(Date.now() / 1000), }); console.log("Customer.io connection verified successfully"); // Clean up: suppress the test user await cio.suppress("test-verify-user"); console.log("Test user suppressed"); } catch (err: any) { console.error("Connection failed:", err.statusCode, err.message); process.exit(1); } } verify();
Run with: npx tsx scripts/verify-customerio.ts
| Region | Track API Base URL | App API Base URL | SDK Constant | |--------|--------------------|------------------|--------------| | US | https://track.customer.io | https://api.customer.io | RegionUS | | EU | https://track-eu.customer.io | https://api-eu.customer.io | RegionEU |
Your region is set when you create your Customer.io account. Check Settings > Workspace Settings to confirm. EU accounts must specify RegionEU or all API calls will fail with 401.
| Error | Cause | Solution | |-------|-------|----------| | 401 Unauthorized | Wrong Site ID or Track API Key | Verify both values in Customer.io Settings > API & Webhook Credentials | | 401 on App API | Wrong App API Key or using Track key | App API uses a different bearer token — check the App API key | | Region mismatch | EU account using US endpoint | Set CUSTOMERIO_REGION=eu and use RegionEU | | ENOTFOUND | DNS resolution failure | Check network, proxy, or firewall blocking track.customer.io | | MODULE_NOT_FOUND | SDK not installed | Run npm install customerio-node |
After successful auth, proceed to customerio-hello-world for your first identify + track call.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 7,399 | 6,552 | -11% | 1 | 1 | 0% | 1,535 | 3,153 | +105% | 0 | 0 | — |
case-02 | fail→fail | 14,319 | 8,313 | -42% | 1 | 1 | 0% | 3,228 | 3,422 | +6% | 0 | 0 | — |
case-20 | fail→pass | 6,543 | 1,233 | -81% | 1 | 1 | 0% | 1,269 | 1,772 | +40% | 0 | 0 | — |
case-03 | pass→pass | 12,636 | 6,646 | -47% | 1 | 1 | 0% | 2,566 | 3,081 | +20% | 0 | 0 | — |
case-04 | fail→pass | 8,728 | 4,636 | -47% | 1 | 1 | 0% | 1,687 | 2,514 | +49% | 0 | 0 | — |
case-05 | fail→pass | 10,914 | 5,289 | -52% | 1 | 1 | 0% | 2,182 | 2,629 | +20% | 0 | 0 | — |
case-06 | pass→pass | 8,866 | 6,596 | -26% | 1 | 1 | 0% | 1,764 | 3,022 | +71% | 0 | 0 | — |
case-07 | pass→pass | 7,937 | 2,327 | -71% | 1 | 1 | 0% | 1,580 | 1,933 | +22% | 0 | 0 | — |
case-08 | pass→pass | 9,315 | 8,789 | -6% | 1 | 1 | 0% | 1,693 | 3,271 | +93% | 0 | 0 | — |
case-09 | pass→pass | 7,036 | 5,139 | -27% | 1 | 1 | 0% | 1,396 | 2,629 | +88% | 0 | 0 | — |
case-10 | pass→pass | 12,249 | 7,588 | -38% | 1 | 1 | 0% | 2,090 | 2,773 | +33% | 0 | 0 | — |
case-11 | fail→pass | 8,005 | 3,227 | -60% | 1 | 1 | 0% | 1,415 | 2,141 | +51% | 0 | 0 | — |
case-21 | fail→pass | 16,717 | 14,552 | -13% | 1 | 1 | 0% | 2,934 | 4,178 | +42% | 0 | 0 | — |
case-12 | pass→pass | 9,848 | 8,295 | -16% | 1 | 1 | 0% | 1,877 | 3,257 | +74% | 0 | 0 | — |
case-13 | pass→pass | 8,368 | 9,930 | +19% | 1 | 1 | 0% | 1,569 | 3,527 | +125% | 0 | 0 | — |
case-14 | pass→pass | 6,985 | 4,419 | -37% | 1 | 1 | 0% | 1,345 | 2,380 | +77% | 0 | 0 | — |
case-15 | pass→pass | 13,963 | 1,949 | -86% | 1 | 1 | 0% | 2,809 | 1,869 | -33% | 0 | 0 | — |
case-16 | pass→pass | 3,850 | 1,811 | -53% | 1 | 1 | 0% | 604 | 1,837 | +204% | 0 | 0 | — |
case-17 | pass→pass | 12,139 | 9,192 | -24% | 1 | 1 | 0% | 2,573 | 3,501 | +36% | 0 | 0 | — |
case-18 | pass→pass | 9,562 | 4,944 | -48% | 1 | 1 | 0% | 1,878 | 2,570 | +37% | 0 | 0 | — |
case-19 | pass→pass | 4,178 | 1,642 | -61% | 1 | 1 | 0% | 735 | 1,834 | +150% | 0 | 0 | — |
case-22 | fail→fail | 12,741 | 10,126 | -21% | 1 | 1 | 0% | 2,451 | 3,710 | +51% | 0 | 0 | — |
case-23 | fail→fail | 14,550 | 14,518 | -0% | 1 | 1 | 0% | 2,864 | 4,832 | +69% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted. The headline lift of +26 percentage points is the difference between those two pass rates over the 23 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.