/klaviyo-pack:klaviyo-prod-checklistfrom klaviyo-pack
Executes a production deployment checklist for Klaviyo integrations, covering authentication, API integration, error handling, webhook security, and monitoring. Use when deploying Klaviyo to production or preparing for go-live.
Ships in klaviyo-pack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Complete checklist for deploying Klaviyo integrations to production, with health checks, rollback procedures, and validation against real Klaviyo API endpoints.
pk_*)KLAVIYO_PRIVATE_KEY stored in secret manager (not env file)KLAVIYO_WEBHOOK_SIGNING_SECRET) configuredKLAVIYO_PUBLIC_KEY) set for client-side tracking (if used)grep -r "pk_" src/)klaviyo-api SDK (not raw HTTP)package.json (not ^ or *)revision header set to 2024-10-15 (or current supported revision)createOrUpdateProfile (upsert, not create)uniqueId for deduplication where applicable+15551234567)Retry-After header// src/health/klaviyo.ts
import { ApiKeySession, AccountsApi } from 'klaviyo-api';
export async function checkKlaviyoHealth(): Promise<{
status: 'healthy' | 'degraded' | 'down';
latencyMs: number;
accountId?: string;
error?: string;
}> {
const start = Date.now();
try {
const session = new ApiKeySession(process.env.KLAVIYO_PRIVATE_KEY!);
const accountsApi = new AccountsApi(session);
const result = await accountsApi.getAccounts();
return {
status: 'healthy',
latencyMs: Date.now() - start,
accountId: result.body.data[0].id,
};
} catch (error: any) {
return {
status: error.status === 429 ? 'degraded' : 'down',
latencyMs: Date.now() - start,
error: `${error.status}: ${error.body?.errors?.[0]?.detail || error.message}`,
};
}
}
// Express health endpoint
app.get('/health', async (req, res) => {
const klaviyo = await checkKlaviyoHealth();
const overallStatus = klaviyo.status === 'healthy' ? 200 : 503;
res.status(overallStatus).json({
status: klaviyo.status,
services: { klaviyo },
timestamp: new Date().toISOString(),
});
});
#!/bin/bash
# scripts/preflight-klaviyo.sh
set -euo pipefail
echo "=== Klaviyo Production Pre-Flight ==="
# 1. Check Klaviyo status
echo -n "Klaviyo Status Page: "
STATUS=$(curl -s "https://status.klaviyo.com/api/v2/status.json" | python3 -c "import sys,json; print(json.load(sys.stdin)['status']['description'])" 2>/dev/null)
echo "$STATUS"
[ "$STATUS" = "All Systems Operational" ] || echo "WARNING: Klaviyo has active incidents"
# 2. Verify API key
echo -n "API Auth: "
HTTP_CODE=$(curl -s -w "%{http_code}" -o /dev/null \
-H "Authorization: Klaviyo-API-Key $KLAVIYO_PRIVATE_KEY" \
-H "revision: 2024-10-15" \
"https://a.klaviyo.com/api/accounts/")
echo "HTTP $HTTP_CODE"
[ "$HTTP_CODE" = "200" ] || { echo "FAIL: API auth returned $HTTP_CODE"; exit 1; }
# 3. Check rate limit headroom
echo -n "Rate Limit: "
curl -s -I \
-H "Authorization: Klaviyo-API-Key $KLAVIYO_PRIVATE_KEY" \
-H "revision: 2024-10-15" \
"https://a.klaviyo.com/api/profiles/?page[size]=1" 2>/dev/null \
| grep -i "ratelimit-remaining" || echo "Headers not available"
# 4. Verify SDK version
echo -n "SDK Version: "
node -e "console.log(require('klaviyo-api/package.json').version)" 2>/dev/null || echo "Not installed"
echo ""
echo "=== Pre-flight complete ==="
# Immediate rollback: disable Klaviyo integration
# Option 1: Feature flag (preferred)
# Set KLAVIYO_ENABLED=false in your deployment platform
# Option 2: Deploy previous version
git log --oneline -5 # Find last known-good commit
git revert HEAD # Revert the deployment commit
# Push and deploy
# Option 3: If using Kubernetes
kubectl rollout undo deployment/your-app
kubectl rollout status deployment/your-app
| Alert | Condition | Severity |
|---|---|---|
| API Auth Failure | Any 401/403 | P1 -- key may be revoked |
| API Unreachable | 5xx > 10/min | P1 -- check status page |
| Rate Limited | 429 > 5/min | P2 -- reduce request volume |
| High Latency | P95 > 5s | P2 -- check network/Klaviyo load |
| Webhook Signature Invalid | Any rejection | P2 -- verify signing secret |
For version upgrades, see klaviyo-upgrade-migration.
What SKILL.md sets; muted values are Claude Code's defaults
24 skills in this plugin
/klaviyo-ci-integrationConfigure CI/CD pipelines for Klaviyo integrations with GitHub Actions.
Use when setting up automated testing, configuring CI secrets,
or integrating Klaviyo SDK tests into your build pipeline.
Trigger with phrases like "klaviyo CI", "klaviyo GitHub Actions",
"klaviyo automated tests", "CI klaviyo", "klaviyo pipeline".
/klaviyo-common-errorsDiagnose and fix common Klaviyo API errors and exceptions.
Use when encountering Klaviyo 4xx/5xx errors, debugging failed requests,
or troubleshooting SDK integration issues.
Trigger with phrases like "klaviyo error", "fix klaviyo",
"klaviyo not working", "debug klaviyo", "klaviyo 400", "klaviyo 429".
/klaviyo-core-workflow-aExecute Klaviyo primary workflow: profiles, lists, and subscriptions.
Use when creating/updating profiles, managing lists, subscribing contacts,
or syncing customer data to Klaviyo for email/SMS marketing.
Trigger with phrases like "klaviyo profiles", "klaviyo lists",
"klaviyo subscribe", "add contacts to klaviyo", "klaviyo customer data".
/klaviyo-core-workflow-bExecute Klaviyo secondary workflow: event tracking, segments, and campaigns.
Use when tracking customer events, creating segments, building campaigns,
or triggering flows via the Klaviyo API.
Trigger with phrases like "klaviyo events", "klaviyo segments",
"klaviyo campaigns", "track klaviyo event", "klaviyo flow trigger".
/klaviyo-cost-tuningOptimize Klaviyo costs through plan selection, contact management, and usage monitoring.
Use when analyzing Klaviyo billing, reducing active profile costs,
or implementing usage monitoring and budget alerts.
Trigger with phrases like "klaviyo cost", "klaviyo billing",
"reduce klaviyo costs", "klaviyo pricing", "klaviyo expensive", "klaviyo budget".
/klaviyo-data-handlingImplement Klaviyo data privacy, GDPR/CCPA compliance, and PII handling patterns.
Use when handling profile data, implementing right-to-deletion, configuring
data retention, or ensuring compliance with privacy regulations.
Trigger with phrases like "klaviyo data", "klaviyo PII",
"klaviyo GDPR", "klaviyo data retention", "klaviyo privacy", "klaviyo CCPA",
"klaviyo delete profile", "klaviyo data privacy".
npx claudepluginhub flight505/skill-forge --plugin klaviyo-packOther plugins' skills for the same job