/klaviyo-pack:klaviyo-data-handlingfrom klaviyo-pack
Handles Klaviyo data privacy including GDPR/CCPA compliance, PII redaction, right-to-erasure, DSAR, consent management, and audit logging.
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.
Read when SKILL.md points to them.
Handle profile data, PII, and privacy compliance with Klaviyo's Data Privacy API, GDPR right-to-deletion, CCPA requests, and safe logging patterns. This skill covers five workflows: GDPR profile deletion, Data Subject Access Requests (DSAR), PII redaction in logs, consent management, and compliance audit logging.
The GDPR deletion skeleton is inline below. The deeper step-by-step code — DSAR export, PII redaction, consent management, and audit logging — lives in references/implementation.md so this file stays scannable. Read the summary here, then drill into the reference for full copy-ready code.
klaviyo-api SDK installeddata-privacy:write scope (for deletion requests)Klaviyo provides a dedicated Data Privacy API for GDPR/CCPA profile deletion. When you delete a profile via this API, Klaviyo performs a full GDPR erasure — the profile is permanently removed and cannot be recovered.
The workflow has five steps. Step 1 (deletion) is shown in full here because it is the highest-risk, most-requested operation. Steps 2–5 follow the same session pattern and are fully implemented in references/implementation.md.
Request deletion with exactly one identifier (email, phone, or profile ID). Providing more than one returns an error. Deletion is irreversible, so always audit-log the request.
import { ApiKeySession, DataPrivacyApi } from 'klaviyo-api';
const session = new ApiKeySession(process.env.KLAVIYO_PRIVATE_KEY!);
const dataPrivacyApi = new DataPrivacyApi(session);
async function requestProfileDeletion(email: string): Promise<void> {
await dataPrivacyApi.requestProfileDeletion({
data: {
type: 'data-privacy-deletion-job',
attributes: {
profile: { data: { type: 'profile', attributes: { email } } },
},
},
});
await auditLog({
action: 'GDPR_DELETION_REQUESTED',
identifier: email,
service: 'klaviyo',
timestamp: new Date().toISOString(),
});
}
await requestProfileDeletion('[email protected]');
The multi-identifier form (email / phone / profile ID with validation) is in references/implementation.md § Step 1.
Export every profile attribute, event, and list membership for a subject (GDPR Article 15) using ProfilesApi + EventsApi. Full exportProfileData() in references/implementation.md § Step 2.
Wrap every log of a Klaviyo response with redactPII() / redactObject() so emails, phone numbers, and API keys never land in plaintext logs. Full patterns in references/implementation.md § Step 3.
Record marketing consent with a consentTimestamp on every subscribe call, and audit-log the source. Full recordConsent() in references/implementation.md § Step 4.
Persist every privacy action to a retained audit store (7-year retention per GDPR). Full auditLog() and schema in references/implementation.md § Step 5.
Applying this skill produces:
requestProfileDeletion() call that submits an irreversible GDPR erasure job to Klaviyo and writes a GDPR_DELETION_REQUESTED audit entry.[REDACTED:type] markers, e.g. Profile data: { email: 'joh***' }.consentTimestamp plus a matching CONSENT_RECORDED audit entry.action, identifier, service, and timestamp.| Data Category | Examples in Klaviyo | Handling |
|---|---|---|
| PII | email, phoneNumber, firstName, lastName | Redact in logs, encrypt at rest |
| Sensitive | API keys, webhook secrets | Never log, rotate quarterly |
| Behavioral | Events, page views, purchases | Anonymize where possible |
| Marketing | List memberships, consent status | Audit trail required |
| Derived | Segments, predictive analytics | No special handling |
| Issue | Cause | Solution |
|---|---|---|
| Deletion request fails | Missing data-privacy:write scope | Update API key scopes |
| Multiple identifiers error | Providing email AND phone | Use exactly one identifier |
| Profile not found for DSAR | Wrong email or already deleted | Search by ID or phone instead |
| PII in error logs | Unredacted API responses | Wrap logger with redactObject() |
Delete a profile on a right-to-be-forgotten request:
await requestProfileDeletion('[email protected]');
// → GDPR erasure job submitted; GDPR_DELETION_REQUESTED audit entry written
Export a subject's data for a DSAR (see references/implementation.md § Step 2):
const bundle = await exportProfileData('[email protected]');
// → { profile: {...}, events: [...], lists: [...] }
Redact PII before logging an API response (see references/implementation.md § Step 3):
console.log('Profile data:', redactObject(profile.attributes));
// → Profile data: { email: 'joh***', firstName: 'Jan***' }
Full, copy-ready versions of every example live in references/implementation.md.
klaviyo-enterprise-rbac skill.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
klaviyo, gdpr, ccpa, data-privacy, pii, compliance
npx claudepluginhub jeremylongshore/tons-of-skills-marketplace --plugin klaviyo-pack24 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-Other plugins' skills for the same job