Agent skill

Klaviyo Reference Architecture

by jeremylongshore in jeremylongshore/tons-of-skills-marketplace

Implement Klaviyo reference architecture with best-practice project layout.

MITAuto-check passedMarketing & SEO

Install Klaviyo Reference Architecture

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill klaviyo-reference-architecture -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace klaviyo-reference-architecture --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/klaviyo-reference-architecture .claude/skills/klaviyo-reference-architecture && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
klaviyo-reference-architecture
GitHub stars
2.8k
Token cost
~1.3k tokens
SKILL.md length
418 words
Files
3 (incl. references)
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Implement Klaviyo reference architecture with best-practice project layout.

  • Works in 4 steps: Scaffold the tree. Create the… → Config layer first. A single… → Service layer. Build ProfileSyncService… → …
  • Designing new Klaviyo integrations
  • SKILL.md covers Overview, Prerequisites, Instructions and Output, plus 4 more sections
  • Calls tsc

What it does

Klaviyo Reference Architecture is an agent skill from jeremylongshore/tons-of-skills-marketplace. Implement Klaviyo reference architecture with best-practice project layout. Use when designing new Klaviyo integrations, reviewing project structure, or establishing architecture standards for email/SMS marketing applications. Trigger with phrases like "klaviyo architecture", "klaviyo project structure", "klaviyo design", "how to organize klaviyo", "klaviyo layout".

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/architecture.md` and `references/implementation.md`). Compatibility notes: Designed for Claude Code

It sits in Marketing & SEO, covering Email marketing. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • Designing new Klaviyo integrations
  • Reviewing project structure
  • Establishing architecture standards for email/SMS marketing applications
  • With phrases like klaviyo architecture

Example prompts

  • “klaviyo architecture”
  • “klaviyo project structure”
  • “klaviyo design”
  • “/klaviyo-reference-architecture”

Requirements

  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Write, Edit, Grep

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Scaffold the tree. Create the src/{klaviyo,services,webhooks,jobs,middleware,config,health} layout. Full annotated tree: architecture.md.
  2. Config layer first. A single loadConfig() returns environment-specific keys, rate limits, and cache TTLs — every other layer reads from…
  3. Service layer. Build ProfileSyncService (bidirectional upsert) and EventTracker (server-side Placed Order / custom events). Both route…
  4. Wire the data flow. Signup → syncToKlaviyo(), purchase → trackPurchase(), inbound profile.updated webhook → WebhookRouter.routeEvent() →…

What it can do on your machine

Read from SKILL.md and the folder at commit cfae287. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit
    • Grep

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • tsc

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • developers.klaviyo.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Designed for Claude Code

    From compatibility in the SKILL.md frontmatter.

Context cost

Klaviyo Reference Architecture loads about 1.3k tokens when it runs, and up to ~3.7k if it reads all its reference files. Until then it costs about 100 tokens; SKILL.md has 418 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~100
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit cfae287, republished under its MIT licence (© jeremylongshore). 418 words, ~1,261 tokens.

Download SKILL.mdSave it as .claude/skills/klaviyo-reference-architecture/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
klaviyo-reference-architecture
description
Implement Klaviyo reference architecture with best-practice project layout. Use when designing new Klaviyo integrations, reviewing project structure, or establishing architecture standards for email/SMS marketing applications. Trigger with phrases like "klaviyo architecture", "klaviyo project structure", "klaviyo design", "how to organize klaviyo", "klaviyo layout".
allowed-tools
Read, Write, Edit, Grep
compatibility
Designed for Claude Code
version
1.7.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
saas, klaviyo, email-marketing, cdp

Klaviyo Reference Architecture

Overview

Production-ready architecture for Klaviyo integrations: a layered project structure, service patterns, event-driven sync, and the klaviyo-api SDK wired into a real application. SKILL.md gives you the four-layer contract and the skeleton you scaffold from; the deep material lives in references/ so you pull code only when you reach that layer.

  • Layout & layering (full directory tree, layer contract, data flow): architecture.md
  • Working code for every layer (config, profile sync, event tracker): implementation.md

Prerequisites

  • TypeScript project with klaviyo-api installed
  • Understanding of layered architecture
  • Redis (for caching/queuing) and database (for audit/sync state)

Instructions

Use Write to scaffold the directory tree, then fill each layer bottom-up. The four layers and their one-way call rule:

API / Webhook Layer   →  routes + webhook handlers (calls Service only)
Service Layer         →  profile-sync, event-tracker, campaigns (calls SDK + Infra)
Klaviyo SDK Layer     →  ApiKeySession, ProfilesApi, EventsApi (never calls upward)
Infrastructure Layer  →  Redis cache, BullMQ queue, Prisma DB, OTel monitoring
  1. Scaffold the tree. Create the src/{klaviyo,services,webhooks,jobs,middleware,config,health} layout. Full annotated tree: architecture.md.
  2. Config layer first. A single loadConfig() returns environment-specific keys, rate limits, and cache TTLs — every other layer reads from it. Code: implementation.md Step 1.
  3. Service layer. Build ProfileSyncService (bidirectional upsert) and EventTracker (server-side Placed Order / custom events). Both route Klaviyo calls through withRateLimitRetry. Code: implementation.md Steps 2–3.
  4. Wire the data flow. Signup → syncToKlaviyo(), purchase → trackPurchase(), inbound profile.updated webhook → WebhookRouter.routeEvent() → local DB. Diagram: architecture.md.

When reviewing an existing project, Read its src/ tree and Grep for cross-layer imports that break the one-way rule (SDK importing a service, a route importing the SDK directly).

Show full SKILL.md (197 more words)Show less

Output

Applying this skill produces:

  • A scaffolded src/ tree matching the four-layer contract, with SDK, service, webhook, job, middleware, config, and health directories.
  • A working config/klaviyo.ts plus ProfileSyncService and EventTracker service classes ready to call from routes and jobs.
  • For a review pass: a list of layering violations (upward SDK calls, direct SDK use from routes) and sync-safety gaps to fix.

Error Handling

IssueCauseSolution
Circular depsWrong layeringServices call SDK, never the reverse
Sync conflictsBoth sides updateLast-write-wins with sync timestamp
Queue backlogKlaviyo slow/downCircuit breaker + dead letter queue
Type mismatchesSDK version mismatchPin SDK version, run tsc --noEmit in CI

Examples

Scaffold a new integration — "Set up a Klaviyo integration for our Node app." Create the layered tree, drop in loadConfig(), then ProfileSyncService and EventTracker. Full code per step: implementation.md.

Track a purchase from your backend:

typescript
await new EventTracker().trackPurchase({
  email: order.email,
  orderId: order.id,
  total: order.total,
  items: order.lineItems,
});

Review project structure — "Is our Klaviyo code layered correctly?" Grep for imports that violate the one-way call rule and check webhook handlers verify HMAC signatures. Layer contract: architecture.md.

Resources

Next Steps

For multi-environment configuration and per-stage key management, see the klaviyo-multi-env-setup skill in this pack.

© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in skills/.curated/klaviyo-reference-architecture of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • references/architecture.md
  • references/implementation.md

Open the folder on GitHubat commit cfae287

Compare with similar skills

Klaviyo Reference Architecture next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Klaviyo Reference Architecture compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Klaviyo Reference Architecture this skilljeremylongshore/tons-of-skills-marketplace2.8k—~1.3kAutomated safety check: PassMIT
Email Sequencefreekmurze/dotfiles1k19 repos~2kAutomated safety check: PassNone
Emailscoreyhaines31/marketingskills54k1 repos~2.8kAutomated safety check: PassMIT
Email SequenceLeoYeAI/openclaw-marketing-skills1k2 repos~2.1kAutomated safety check: PassCustom licence
Onboarding Crofreekmurze/dotfiles1k16 repos~1.6kAutomated safety check: PassNone
Marketing OsYuzzyuk/marketing-os540—~2.5kAutomated safety check: PassMIT

Similar skills

  • Email Sequence

    freekmurze/dotfiles

    When the user wants to create or optimize an email sequence, drip campaign, automated email flow, or lifecycle email program.

    1k GitHub starsUsed in 19 repos~2k tokens
    Marketing & SEOAuto-check passed
  • Emails

    coreyhaines31/marketingskills

    When the user wants to create or optimize an email sequence, drip campaign, automated email flow, or lifecycle email program.

    54k GitHub starsUsed in 1 repo~2.8k tokens
    Marketing & SEOAuto-check passed
  • Email Sequence

    LeoYeAI/openclaw-marketing-skills

    When the user wants to create or optimize an email sequence, drip campaign, automated email flow, or lifecycle email program.

    1k GitHub starsUsed in 2 repos~2.1k tokens
    Marketing & SEOAuto-check passed
  • Onboarding Cro

    freekmurze/dotfiles

    When the user wants to optimize post-signup onboarding, user activation, first-run experience, or time-to-value.

    1k GitHub starsUsed in 16 repos~1.6k tokens
    Marketing & SEOAuto-check passed
  • Marketing Os

    Yuzzyuk/marketing-os

    A complete marketing department in one skill. An agent skill from Yuzzyuk/marketing-os.

    540 GitHub stars~2.5k tokensUpdated 1 mo ago
    Marketing & SEOAuto-check passed
  • Onboarding

    Nexus-JPF/note-companion

    When the user wants to optimize post-signup onboarding, user activation, first-run experience, or time-to-value.

    870 GitHub starsUsed in 4 repos~1.6k tokens
    Marketing & SEOAuto-check passed

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Adapting Transfer Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Agent Context Loader

    jeremylongshore/tons-of-skills-marketplace

    Execute proactive auto-loading: automatically detects and loads agents.md files.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Aggregating Performance Metrics

    jeremylongshore/tons-of-skills-marketplace

    Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.

    2.8k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Analyzing Capacity Planning

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.

    2.8k GitHub stars~947 tokensUpdated today
    Auto-check passed
  • Analyzing Database Indexes

    jeremylongshore/tons-of-skills-marketplace

    Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~2k tokensUpdated today
    Auto-check passed

Categories

Questions about Klaviyo Reference Architecture

What does Klaviyo Reference Architecture do?

Implement Klaviyo reference architecture with best-practice project layout. Klaviyo Reference Architecture is an agent skill from jeremylongshore/tons-of-skills-marketplace. Implement Klaviyo reference architecture with best-practice project layout.

When should I use Klaviyo Reference Architecture?

Klaviyo Reference Architecture fits situations like: designing new Klaviyo integrations; reviewing project structure; establishing architecture standards for email/SMS marketing applications; with phrases like klaviyo architecture.

How do I install Klaviyo Reference Architecture in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill klaviyo-reference-architecture -a claude-code`. Or copy the skill folder (skills/.curated/klaviyo-reference-architecture in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/klaviyo-reference-architecture in your project. Claude Code loads it when a task matches its description.

How do I install Klaviyo Reference Architecture in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill klaviyo-reference-architecture -a codex`. Or copy the skill folder (skills/.curated/klaviyo-reference-architecture in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/klaviyo-reference-architecture in your project. Codex loads it when a task matches its description.

Can I use Klaviyo Reference Architecture in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill klaviyo-reference-architecture -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/klaviyo-reference-architecture, .gemini/skills/klaviyo-reference-architecture, .github/skills/klaviyo-reference-architecture and .opencode/skills/klaviyo-reference-architecture in your project.

What does Klaviyo Reference Architecture need to run?

Going by SKILL.md and its folder, Klaviyo Reference Architecture needs the command-line tools its instructions call (tsc). Its frontmatter pre-approves these tools: Read, Write, Edit, Grep. Compatibility (from SKILL.md): Designed for Claude Code.

Does Klaviyo Reference Architecture access the network?

SKILL.md names 1 domain. As links in the text: developers.klaviyo.com. This is read from the text; nothing was executed.

Is Klaviyo Reference Architecture safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Klaviyo Reference Architecture use?

Klaviyo Reference Architecture is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Klaviyo Reference Architecture use?

About 1.3k tokens (SKILL.md is roughly 5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.4k tokens, read only when the agent opens those files.

What are the alternatives to Klaviyo Reference Architecture?

Skills that share tags, products or a category with Klaviyo Reference Architecture: Email Sequence (freekmurze/dotfiles, 1k stars), Emails (coreyhaines31/marketingskills, 54k stars), Email Sequence (LeoYeAI/openclaw-marketing-skills, 1k stars) and Onboarding Cro (freekmurze/dotfiles, 1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Klaviyo Reference Architecture?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,827 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 10, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.