/klaviyo-pack:klaviyo-ci-integrationfrom klaviyo-pack
Sets up GitHub Actions CI/CD pipelines for Klaviyo integrations with mocked unit tests, gated integration tests, and API connectivity smoke tests.
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.
Set up a GitHub Actions CI/CD pipeline for Klaviyo integrations: mocked unit tests on every pull request, gated integration tests against the real Klaviyo API on main-branch pushes, SDK-version verification, and an API connectivity smoke test.
The workflow follows the standard two-job split — a fast, key-free unit-tests job
safe to require on every PR, and an integration-tests job gated so real-API calls
never run on fork PRs where secrets are unavailable.
klaviyo-api SDK and Vitest configured in the repositoryStore the Klaviyo test credentials as encrypted repository secrets:
gh secret set KLAVIYO_PRIVATE_KEY --body "pk_test_***"
gh secret set KLAVIYO_WEBHOOK_SIGNING_SECRET --body "whsec_test_***"
Create .github/workflows/klaviyo-ci.yml with two jobs. The essential skeleton:
name: Klaviyo Integration CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
unit-tests: # mocked, runs on every PR, no API key
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: '20', cache: 'npm' }
- run: npm ci
- run: npm test -- --coverage
integration-tests: # real API, gated to main-branch pushes only
needs: unit-tests
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
env:
KLAVIYO_PRIVATE_KEY: ${{ secrets.KLAVIYO_PRIVATE_KEY }}
KLAVIYO_TEST: '1'
steps: [...]
The full workflow — including tsc --noEmit, npm list klaviyo-api version check,
the connectivity smoke test, and the branch-protection config — is in
the CI workflow reference.
Author two suites the workflow drives:
klaviyo-api SDK (vi.mock) and run with no key.describe.skipIf guard keyed on
KLAVIYO_TEST + KLAVIYO_PRIVATE_KEY, so they skip cleanly when no key is present.Full, runnable examples for both suites — event-tracking unit test and a create-and-clean-up live profile test — are in the test examples reference.
npm list klaviyo-api| Issue | Cause | Solution |
|---|---|---|
| Secret not found in CI | Missing gh secret set | Add the secret via repository settings |
| Integration test 429 | Rate limited in CI | Add delays between tests, use a dedicated test key |
| Auth failures in CI | Wrong secret name | Verify the secret name matches the workflow env var |
| Test timeout | Slow Klaviyo response | Increase timeout-minutes on the job step |
Set up CI on a fresh repository. Store the test credentials, drop in the workflow, then let the pipeline gate itself:
gh secret set KLAVIYO_PRIVATE_KEY --body "pk_test_***"
# add .github/workflows/klaviyo-ci.yml (see Step 2 skeleton + full reference)
git add .github/workflows/klaviyo-ci.yml && git commit -m "ci: add Klaviyo pipeline"
git push # opens a PR → unit-tests run mocked; integration-tests stay gated to main
Run the gated integration suite locally before pushing to main:
export KLAVIYO_TEST=1
export KLAVIYO_PRIVATE_KEY="pk_test_***"
npm run test:integration # skipIf guard now active → live API exercised
Both example flows are expanded — full workflow YAML in references/ci-workflow.md and the complete unit + integration suites in references/test-examples.md.
For deployment patterns that build on this pipeline, see the
klaviyo-deploy-integration skill in this pack.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub jeremylongshore/tons-of-skills-marketplace --plugin klaviyo-pack24 skills in this plugin
/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-Other plugins' skills for the same job