Agent skill · software engineering · jeremylongshore

klaviyo-multi-env-setup

Configure Klaviyo across development, staging, and production environments.

Why this skill is useful

Adds specific patterns for configuring Klaviyo across multiple environments that the AI wouldn't reliably generate on its own.

What it needs

Requires klaviyo-api installed locally. Requires aws, gcloud, klaviyo, vault account access. About 3k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.

What this skill does

Klaviyo Multi-Environment Setup Overview Configure Klaviyo across development, staging, and production with separate API keys, environment detection, secret management, and production safeguards. Every environment follows the same shape — detect the env, resolve its config, load its secret, guard destructive/send operations. The lean workflow and first skeleton live here; full step-by-step code lives in references/implementation.md. Prerequisites Separate Klaviyo accounts or API keys per environment Secret management solution (GCP Secret Manager, AWS Secrets Manager, Vault) klaviyo-api SDK installed Environment Strategy Environment Klaviyo Account API Key Use Case ------------- ---------------- --------- ---------- Development Test account pktestdev Local development, exploration Staging Test account pkteststaging Pre-prod validation, integration tests Production Production account pklive Real customer data, live sends Important: Klaviyo does not have a sandbox mode. Use a separate test account for dev/staging to avoid sending real emails. Instructions The pattern is the same across all three environments; only the API key and the per-env flags change. Read the matching section in references/implementation.md, then: 1. Write the config module — use Write/Edit to create src/config/klaviyo.ts with a detectEnvironment() helper and a per-env ENVCONFIGS map that flips enableSending, cache, and rate-limit concurrency by environment. 2. Store secrets per environment — create one secret per env in your platform's secret store (gcloud secrets create, aws secretsmanager create-secret, or Vault). Never commit keys; local dev reads a git-ignored .env.local. 3. Add environment guards — wrap sends and deletions so non-production simply logs instead of touching real data (guardCampaignSend, guardedProfileDeletion). 4. Wire multi-env CI — a GitHub Actions matrix maps staging→staging key and main→prod key, verifies connectivity, then deploys. 5. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills jeremylongshore/klaviyo-multi-env-setup

View the source on GitHub

Browse the @skills marketplace