jeremylongshore/claude-code-plugins-plus-skills
customerio-pack
plugins/saas-packs/customerio-pack/skills/customerio-primary-workflow/SKILL.md
January 22, 2026
Select agents to install to:
npx add-skill https://github.com/jeremylongshore/claude-code-plugins-plus-skills/blob/main/plugins/saas-packs/customerio-pack/skills/customerio-primary-workflow/SKILL.md -a claude-code --skill customerio-primary-workflowInstallation paths:
.claude/skills/customerio-primary-workflow/# Customer.io Primary Workflow
## Overview
Implement Customer.io's primary messaging workflow: identify users, track events, and trigger automated campaigns.
## Prerequisites
- Customer.io SDK configured
- Campaign/workflow created in Customer.io dashboard
- Understanding of your user lifecycle events
## Instructions
### Step 1: Define User Lifecycle Events
```typescript
// events/user-events.ts
export const USER_EVENTS = {
// Onboarding
SIGNED_UP: 'signed_up',
EMAIL_VERIFIED: 'email_verified',
PROFILE_COMPLETED: 'profile_completed',
FIRST_LOGIN: 'first_login',
// Engagement
FEATURE_USED: 'feature_used',
CONTENT_VIEWED: 'content_viewed',
SEARCH_PERFORMED: 'search_performed',
// Conversion
TRIAL_STARTED: 'trial_started',
SUBSCRIPTION_STARTED: 'subscription_started',
UPGRADE_COMPLETED: 'upgrade_completed',
PURCHASE_COMPLETED: 'purchase_completed',
// Churn Risk
INACTIVE_WARNING: 'inactive_warning',
SUBSCRIPTION_CANCELLED: 'subscription_cancelled',
ACCOUNT_DELETED: 'account_deleted',
} as const;
export type UserEvent = typeof USER_EVENTS[keyof typeof USER_EVENTS];
```
### Step 2: Implement Event Tracking Service
```typescript
// services/customerio-service.ts
import { TrackClient, RegionUS } from '@customerio/track';
import { USER_EVENTS, UserEvent } from '../events/user-events';
interface User {
id: string;
email: string;
firstName?: string;
lastName?: string;
plan?: string;
}
export class CustomerIOService {
private client: TrackClient;
constructor() {
this.client = new TrackClient(
process.env.CUSTOMERIO_SITE_ID!,
process.env.CUSTOMERIO_API_KEY!,
{ region: RegionUS }
);
}
// Called on user signup
async onSignup(user: User): Promise<void> {
await this.client.identify(user.id, {
email: user.email,
first_name: user.firstName,
last_name: user.lastName,
created_at: Math.floor(Date.now() / 1000),
plan: 'free',
onboarding_status: 'started'