jeremylongshore/claude-code-plugins-plus-skills
customerio-pack
plugins/saas-packs/customerio-pack/skills/customerio-cost-tuning/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-cost-tuning/SKILL.md -a claude-code --skill customerio-cost-tuningInstallation paths:
.claude/skills/customerio-cost-tuning/# Customer.io Cost Tuning
## Overview
Optimize Customer.io costs by managing profiles, reducing unnecessary operations, and right-sizing your usage.
## Prerequisites
- Access to Customer.io billing dashboard
- Understanding of pricing model
- API access for usage analysis
## Customer.io Pricing Model
| Component | Pricing Basis |
|-----------|---------------|
| Profiles | Number of people tracked |
| Emails | Volume sent (included amount varies) |
| SMS | Per message sent |
| Push | Volume sent |
| Objects | Included with plan |
## Instructions
### Step 1: Profile Cleanup
```typescript
// scripts/profile-audit.ts
import { APIClient, RegionUS } from '@customerio/track';
interface ProfileAudit {
total: number;
inactive30Days: number;
inactive90Days: number;
noEmail: number;
suppressed: number;
recommendations: string[];
}
async function auditProfiles(): Promise<ProfileAudit> {
const audit: ProfileAudit = {
total: 0,
inactive30Days: 0,
inactive90Days: 0,
noEmail: 0,
suppressed: 0,
recommendations: []
};
// Query via Customer.io App API or export
// Analyze profile data
const now = Math.floor(Date.now() / 1000);
const thirtyDaysAgo = now - (30 * 24 * 60 * 60);
const ninetyDaysAgo = now - (90 * 24 * 60 * 60);
// Example analysis
if (audit.inactive90Days > audit.total * 0.3) {
audit.recommendations.push(
'Consider archiving profiles inactive >90 days to reduce costs'
);
}
if (audit.noEmail > audit.total * 0.1) {
audit.recommendations.push(
'Remove profiles without email addresses (cannot receive communications)'
);
}
return audit;
}
```
### Step 2: Suppress Inactive Users
```typescript
// lib/profile-management.ts
import { TrackClient, RegionUS } from '@customerio/track';
const client = new TrackClient(
process.env.CUSTOMERIO_SITE_ID!,
process.env.CUSTOMERIO_API_KEY!,
{ region: RegionUS }
);
// Suppress users who haven't engaged
async function suppressInactiveUs