Agent skill

Klaviyo Performance Tuning

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

Optimize Klaviyo API performance with caching, batching, and pagination tuning.

MITAuto-check passedMarketing & SEO

Install Klaviyo Performance Tuning

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

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

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace klaviyo-performance-tuning --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-performance-tuning .claude/skills/klaviyo-performance-tuning && 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-performance-tuning
GitHub stars
2.8k
Token cost
~1.6k tokens
SKILL.md length
601 words
Files
3 (incl. references)
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Optimize Klaviyo API performance with caching, batching, and pagination tuning.

  • Works in 6 steps: Sparse Fieldsets (Reduce Payload Size) → Response Caching → Efficient Pagination → …
  • Experiencing slow API responses
  • SKILL.md covers Overview, Prerequisites, Klaviyo API Performance… and Instructions, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Klaviyo Performance Tuning is an agent skill from jeremylongshore/tons-of-skills-marketplace. Optimize Klaviyo API performance with caching, batching, and pagination tuning. Use when experiencing slow API responses, implementing caching strategies, or optimizing request throughput for Klaviyo integrations. Trigger with phrases like "klaviyo performance", "optimize klaviyo", "klaviyo latency", "klaviyo caching", "klaviyo slow", "klaviyo batch".

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

It sits in Marketing & SEO, covering Email marketing and Caching. 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

  • Experiencing slow API responses
  • Implementing caching strategies
  • Optimizing request throughput for Klaviyo integrations
  • With phrases like klaviyo performance

Example prompts

  • “klaviyo performance”
  • “optimize klaviyo”
  • “klaviyo latency”
  • “/klaviyo-performance-tuning”

Requirements

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

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Sparse Fieldsets (Reduce Payload Size)
  2. Response Caching
  3. Efficient Pagination
  4. Request Batching with DataLoader
  5. Parallel API Calls with Concurrency Control
  6. Performance Monitoring

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

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    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):

    • github.com
    • developers.klaviyo.com
    • jsonapi.org

    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 Performance Tuning loads about 1.6k tokens when it runs, and up to ~3.9k if it reads all its reference files. Until then it costs about 95 tokens; SKILL.md has 601 words of instructions outside code blocks.

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

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). 601 words, ~1,636 tokens.

Download SKILL.mdSave it as .claude/skills/klaviyo-performance-tuning/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
klaviyo-performance-tuning
description
Optimize Klaviyo API performance with caching, batching, and pagination tuning. Use when experiencing slow API responses, implementing caching strategies, or optimizing request throughput for Klaviyo integrations. Trigger with phrases like "klaviyo performance", "optimize klaviyo", "klaviyo latency", "klaviyo caching", "klaviyo slow", "klaviyo batch".
allowed-tools
Read, Write, Edit
compatibility
Designed for Claude Code
version
1.7.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
saas, klaviyo, email-marketing, cdp

Klaviyo Performance Tuning

Overview

Optimize Klaviyo API performance with response caching, request batching, cursor-based pagination, sparse fieldsets, and connection pooling. This skill diagnoses where an integration is slow, then applies the right technique — payload reduction, memory caching, bounded pagination, request coalescing, or rate-limit-aware concurrency.

Read this file for the workflow and the decision guide. Full, copy-pasteable code for every step lives in references/implementation.md; combined real-world scenarios live in references/examples.md.

Prerequisites

  • klaviyo-api SDK installed
  • Understanding of Klaviyo's rate limits (75 req/s burst, 700 req/min)
  • Redis or in-memory cache (optional)
  • For batching/concurrency helpers: dataloader, p-queue, lru-cache

Klaviyo API Performance Characteristics

OperationTypical LatencyMax Page Size
Get Profile by ID50-150msN/A
Get Profiles (list)100-300ms20 (default), 100 (some endpoints)
Create Profile100-200msN/A
Create Event50-100msN/A
Get Segment Profiles200-500ms20
Campaign Operations200-500ms20

Instructions

Apply the techniques in order — each is independent, so start with the one that matches your bottleneck. Every step below has a full implementation in references/implementation.md.

Step 1: Sparse Fieldsets (Reduce Payload Size)

Klaviyo supports JSON:API sparse fieldsets — request only the fields you need instead of the 20+ default attributes. This is the cheapest win and applies to every read.

typescript
// GOOD: Only fetch the fields you use (much smaller payload)
const profiles = await profilesApi.getProfiles({
  fieldsProfile: ['email', 'first_name', 'created'],  // snake_case = API names
});
Step 2: Response Caching

Wrap read calls in an LRUCache keyed by query, with per-resource TTLs (profiles 5 min, segments 15 min — they change less often). See the caching implementation in references/implementation.md.

Step 3: Efficient Pagination

Use a fetchAllPages helper that follows the links.next cursor with a maxPages ceiling so large exports terminate predictably. See the pagination implementation in references/implementation.md.

Step 4: Request Batching with DataLoader

Coalesce many getProfile(id) calls in a single tick into concurrency-controlled requests with DataLoader (maxBatchSize: 10, 50 ms window). See the batching implementation in references/implementation.md.

Step 5: Parallel API Calls with Concurrency Control

Drive bulk writes through a PQueue capped at 50 req/s — a safe margin under the 75 req/s burst limit — with progress logging. See the concurrency implementation in references/implementation.md.

Step 6: Performance Monitoring

Wrap calls in measuredCall and read a p95 summary via getPerfSummary to find the real bottleneck before optimizing. See the monitoring implementation in references/implementation.md.

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

Output

Applying this skill produces:

  • Sparse-fieldset read calls with 50-80% smaller payloads on list endpoints.
  • A cache module (src/klaviyo/cache.ts) that serves repeated reads from memory with per-resource TTLs.
  • A pagination helper (src/klaviyo/pagination.ts) that safely walks cursor-paginated endpoints to completion under a maxPages guard.
  • Batching + concurrency helpers that keep bulk operations under Klaviyo's 75 req/s burst and 700 req/min ceilings.
  • A perf-monitoring module (src/klaviyo/perf-monitor.ts) emitting per-operation avg, p95, and count so you can verify the gains.

Error Handling

IssueCauseSolution
Cache stampedeMany requests on cache missUse stale-while-revalidate pattern
Pagination timeoutVery large datasetsSet maxPages limit, process in chunks
Rate limit on bulk opsToo much concurrencyReduce PQueue concurrency/intervalCap
Slow filter queriesComplex filter expressionsSimplify filters, use segment IDs instead

Examples

Worked, end-to-end scenarios that combine the steps above are in references/examples.md:

  • Fast cached profile lookup — sparse fieldsets + LRU caching for a repeated lookup.
  • Export a large list — bounded cursor pagination for a multi-hundred-thousand-member list.
  • Bulk-update 10,000 profiles — PQueue concurrency under the rate limit.
  • Measure where the time goes — measuredCall + getPerfSummary to find the slow op first.

Minimal caching example (full versions in the reference):

typescript
import { cachedKlaviyoCall } from './cache';

const profile = await cachedKlaviyoCall(
  `profile:${email}`,
  () => profilesApi.getProfiles({ filter: `equals(email,"${email}")` }),
  5 * 60 * 1000  // 5 minute TTL
);

Resources

Next Steps

Once reads are cached and bulk writes are rate-limit-safe, profile the workload with getPerfSummary (Step 6) to confirm the p95 improvement, then tune TTLs and concurrency to your traffic. For cost optimization of the same integration, see the klaviyo-cost-tuning skill.

© 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-performance-tuning of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • references/examples.md
  • references/implementation.md

Open the folder on GitHubat commit cfae287

Compare with similar skills

Klaviyo Performance Tuning 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 Performance Tuning compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Klaviyo Performance Tuning this skilljeremylongshore/tons-of-skills-marketplace2.8k—~1.6kAutomated safety check: PassMIT
Email Quality Auditoraaron-he-zhu/aaron-marketing-skills2.9k2 repos~2.1kAutomated safety check: PassApache-2.0
Klaviyo Analystthatrebeccarae/claude-marketing161—~5kAutomated safety check: NotesMIT
Smartlead Spintaxgrowthenginenowoslawski/coldoutboundskills753—~1.8kAutomated safety check: PassMIT
MailchimpCraftOS-dev/CraftBot3921 repos~5.9kAutomated safety check: PassMIT
Sequenzy Email Marketingdavepoon/buildwithclaude3.6k—~1.7kAutomated safety check: PassMIT

Similar skills

  • Email Quality Auditor

    aaron-he-zhu/aaron-marketing-skills

    A skill your agent uses when the user asks to "audit an email program" or "is this campaign safe to send"; runs a typed 20-item SEND profile with authentication, consent, opt-out, and claim veto…

    2.9k GitHub starsUsed in 2 repos~2.1k tokens
    Marketing & SEOAuto-check passed
  • Klaviyo Analyst

    thatrebeccarae/claude-marketing

    Klaviyo marketing operations and analyst expertise. An agent skill from thatrebeccarae/claude-marketing.

    161 GitHub stars~5k tokensUpdated 4 mo ago
    Marketing & SEOAuto-check: notes
  • Smartlead Spintax

    growthenginenowoslawski/coldoutboundskills

    Adds Smartlead-compatible spintax to cold email sequences for deliverability.

    753 GitHub stars~1.8k tokensUpdated 5 days ago
    Marketing & SEOAuto-check passed
  • Mailchimp

    CraftOS-dev/CraftBot

    Mailchimp Marketing API integration with managed OAuth. An agent skill from CraftOS-dev/CraftBot.

    392 GitHub starsUsed in 1 repo~5.9k tokens
    Marketing & SEOAuto-check passed
  • Sequenzy Email Marketing

    davepoon/buildwithclaude

    Agent guide for operating Sequenzy. An agent skill from davepoon/buildwithclaude.

    3.6k GitHub stars~1.7k tokensUpdated 2 days ago
    Marketing & SEOAuto-check passed
  • Eip712 Signing

    ccashwell/evm-cortex

    A skill your agent uses when implementing EIP-712 typed structured data signing.

    131 GitHub stars~1.6k tokensUpdated 11 days ago
    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

Questions about Klaviyo Performance Tuning

What does Klaviyo Performance Tuning do?

Optimize Klaviyo API performance with caching, batching, and pagination tuning. Klaviyo Performance Tuning is an agent skill from jeremylongshore/tons-of-skills-marketplace. Optimize Klaviyo API performance with caching, batching, and pagination tuning.

When should I use Klaviyo Performance Tuning?

Klaviyo Performance Tuning fits situations like: experiencing slow API responses; implementing caching strategies; optimizing request throughput for Klaviyo integrations; with phrases like klaviyo performance.

How do I install Klaviyo Performance Tuning in Claude Code?

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

How do I install Klaviyo Performance Tuning in Codex?

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

Can I use Klaviyo Performance Tuning 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-performance-tuning -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-performance-tuning, .gemini/skills/klaviyo-performance-tuning, .github/skills/klaviyo-performance-tuning and .opencode/skills/klaviyo-performance-tuning in your project.

What does Klaviyo Performance Tuning need to run?

SKILL.md names no scripts, command-line tools or credentials: Klaviyo Performance Tuning is instructions for the agent only. Its frontmatter pre-approves these tools: Read, Write, Edit. Compatibility (from SKILL.md): Designed for Claude Code.

Does Klaviyo Performance Tuning access the network?

SKILL.md names 3 domains. As links in the text: github.com, developers.klaviyo.com and jsonapi.org. This is read from the text; nothing was executed.

Is Klaviyo Performance Tuning 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 Performance Tuning use?

Klaviyo Performance Tuning 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 Performance Tuning use?

About 1.6k tokens (SKILL.md is roughly 6.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.3k tokens, read only when the agent opens those files.

What are the alternatives to Klaviyo Performance Tuning?

Skills that share tags, products or a category with Klaviyo Performance Tuning: Email Quality Auditor (aaron-he-zhu/aaron-marketing-skills, 2.9k stars), Klaviyo Analyst (thatrebeccarae/claude-marketing, 161 stars), Smartlead Spintax (growthenginenowoslawski/coldoutboundskills, 753 stars) and Mailchimp (CraftOS-dev/CraftBot, 392 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Klaviyo Performance Tuning?

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.