Agent skill · software engineering · jeremylongshore
klaviyo-rate-limits
Implement Klaviyo rate limiting, backoff, and request queuing patterns.
Why this skill is useful
Adds specific retry logic and request queuing patterns for handling Klaviyo's API rate limits that the AI wouldn't reliably generate on its own.
What it needs
Requires klaviyo-api, p-queue installed locally. Requires klaviyo account access. About 4k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.
What this skill does
Klaviyo Rate Limits Overview Handle Klaviyo's per-account fixed-window rate limits with proper Retry-After header handling, exponential backoff, and request queuing. This skill installs a small set of composable helpers: a retry wrapper that honors Klaviyo's Retry-After, a request queue that paces sustained throughput, a monitor that reads live rate-limit headers, and a rate-aware bulk import. Prerequisites The klaviyo-api SDK installed in the target project (npm install klaviyo-api). The p-queue package installed for the request queue (npm install p-queue). A working knowledge of Klaviyo's dual-window (burst + steady) rate limiting, summarized in the architecture table below. Write access to the project's src/klaviyo/ directory, where the generated helper files land. Klaviyo Rate Limit Architecture Klaviyo uses per-account fixed-window rate limiting with two distinct windows: Window Duration Limit Description -------- ---------- ------- ------------- Burst 1 second 75 requests Short spike protection Steady 1 minute 700 requests Sustained throughput cap Both windows apply simultaneously. Exceeding either triggers a 429 Too Many Requests. Rate Limit Headers On successful requests: Header Description -------- ------------- RateLimit-Limit Max requests for the window RateLimit-Remaining Remaining requests in window RateLimit-Reset Seconds until window resets On 429 responses (different headers!): Header Description -------- ------------- Retry-After Integer seconds to wait before retrying Critical: When you hit a 429, RateLimit- headers are NOT returned. Only Retry-After is present. Instructions Step 1: Retry-After Aware Backoff (core) Use Write to create src/klaviyo/rate-limiter.ts with the retry wrapper below. This is the foundation every other helper builds on: it retries only on 429 and 5xx, always honors Klaviyo's Retry-After on a 429, and falls back to exponential backoff with jitter for 5xx. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills jeremylongshore/klaviyo-rate-limits