klaviyo-onsite-forms
Klaviyo onsite forms for a Vercel Shop storefront
This skill builds and manages Klaviyo onsite forms (popups, flyouts, full-screen forms, banners and embeds) for one storefront, from the terminal. The forms need no storefront code: klaviyo.js renders a form once it's live and its targeting matches the page, and Vercel Shop's Klaviyo integration tells klaviyo.js about client-side navigation so targeting re-evaluates without a reload.
A Klaviyo account is often shared with another storefront for the same Shopify store, such as the Shopify theme it's replacing. So this skill owns only forms named Vercel Shop - <purpose>, gives every version of every form a URL allow list naming only this storefront's hosts, and treats every other form as read-only.
Ask before creating, publishing, unpublishing or deleting anything: a published form shows to real shoppers.
Step 0 — Check what's there
klaviyo.jsis on the storefront. In Vercel Shop,lib/klaviyo/client.tsexists andanalytics.klaviyo.isEnabledis on. If not, applyklaviyo-vercel-shopfirst: without it a form can be published but never renders.- The Klaviyo MCP server is connected (
https://mcp.klaviyo.com/mcp). Itsget_forms,get_form,create_formanddelete_formtools read forms, create drafts and delete them. - A private key for editing and publishing, if needed. Changing an existing form and publishing go through the REST API, which needs a private key with
forms:readandforms:write. Ask the user toexport KLAVIYO_API_KEY=...in their own shell. Never take it in the chat, and never put it in.envfiles the storefront reads, the Vercel project or a commit. Without one, the user can edit and publish the draft in Klaviyo's form editor instead.
Step 1 — Ask
Ask these together: