$npx skillfedfor your agent

cart-logic

Cart Logic guides you through implementing core cart functionality—adding, removing, and updating items—on your platform of choice. It covers built-in cart configuration for Shopify, WooCommerce, and BigCommerce, plus custom implementations for headless storefronts using Storefront APIs. Learn to persist carts across sessions and devices, merge guest carts when customers log in, and optimize key UX behaviors that drive conversion.

Cart Logic helps you build or configure a shopping cart with add, remove, and update operations across Shopify, WooCommerce, BigCommerce, and custom storefronts.

AI-generated summary based on this skill's SKILL.md

40 6 MITupdated by finsilabs

Decision gist · record as of 2026-03-13

Cart Logic helps you build or configure a shopping cart with add, remove, and update operations across Shopify, WooCommerce, BigCommerce, and custom storefronts. Cart Logic guides you through implementing core cart functionality—adding, removing, and updating items—on your platform of choice. It covers built-in cart configuration for Shopify, WooCommerce, and BigCommerce, plus custom implementations for headless storefronts using Storefront APIs. Learn to persist carts across sessions and devices, merge guest carts when customers log in, and optimize key UX behaviors that drive conversion.

manual: git clone https://github.com/finsilabs/awesome-ecommerce-skills → cp -r awesome-ecommerce-skills/skills/payments-checkout/cart-logic ~/.claude/skills/cart-logic
skills/payments-checkout/cart-logic/SKILL.md · version ed19aad4

Use it when

  • Cart Logic covers cart persistence strategies to maintain items across page loads and devices.
  • Cart Logic teaches the merge logic required when a guest customer creates a cart, then later registers or logs in.

Verify before relying

Read SKILL.md below before installing (8 files). Open directory: indexed for reading, not audited.

Same gist for agents: .md · .json

Install

finsilabs/awesome-ecommerce-skills/cart-logic · repository language: JavaScript

Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

How to build shopping cart add remove update functionality?

Cart Logic provides step-by-step guidance for implementing core cart operations across multiple platforms. For Shopify, WooCommerce, and BigCommerce, you'll learn built-in configuration methods. For custom or headless storefronts, Cart Logic covers Storefront API integration patterns that let you add items to cart, remove line items, and update quantities programmatically. Each approach includes code examples and best practices for reliable state management.

How do I keep cart items after page reload?

Cart Logic covers cart persistence strategies to maintain items across page loads and devices. The skill explains session storage, local storage, and server-side persistence techniques so your customers' carts survive navigation, browser refresh, and device switching. You'll learn which persistence method works best for your architecture—whether you're using a platform's native cart or building a custom implementation with API integration.

How does cart-logic handle merging guest carts when users log in?

Cart Logic teaches the merge logic required when a guest customer creates a cart, then later registers or logs in. The skill covers identifying guest and registered user carts, combining line items without duplication, and syncing the merged state back to your platform. You'll find patterns for Shopify, WooCommerce, BigCommerce, and headless implementations using Storefront APIs.

Can I use cart-logic for a headless or custom storefront?

Yes. Cart Logic is designed for headless and custom storefronts using Storefront APIs. The skill walks through API-driven cart operations, state management without a built-in admin interface, and best practices for building a robust ecommerce cart system from scratch. You'll learn how to handle line items, persistence, guest-to-registered merges, and multi-device synchronization in your custom frontend.

What should I do if cart state is lost on navigation?

Cart Logic includes troubleshooting guidance for cart data loss and session management issues. The skill explains common causes—missing persistence configuration, session timeout, or API sync failures—and provides fixes for each platform. You'll learn recovery strategies, proper session storage setup, and how to validate cart state across page transitions to prevent abandonment.

Is cart-logic available under an open-source license?

Cart Logic is released under the MIT license, making it free to use, modify, and distribute in both open-source and commercial projects with minimal restrictions.

SKILL.md

Rendered from the published skill. Quoted content, verbatim.

Cart Logic

Overview

Cart logic covers how your store manages items a shopper intends to buy: adding, removing, and updating items; persisting the cart across page loads and devices; and merging a guest cart into an account when the customer logs in. On Shopify, WooCommerce, and BigCommerce, the cart is built into the platform — the goal is to configure it correctly and extend it when needed. Custom code is only required for headless storefronts.

When to Use This Skill

  • When cart state is lost when users navigate between pages (missing

(truncated - see the full file via the links below)

File tree — 8 files
skills/payments-checkout/cart-logic/SKILL.md
skills/payments-checkout/cart-logic/evals/cart-data-model-upsert-price-capture-ser/criteria.json
skills/payments-checkout/cart-logic/evals/cart-data-model-upsert-price-capture-ser/task.md
skills/payments-checkout/cart-logic/evals/guest-cart-persistence-and-react-cart-co/criteria.json
skills/payments-checkout/cart-logic/evals/guest-cart-persistence-and-react-cart-co/task.md
skills/payments-checkout/cart-logic/evals/guest-to-user-cart-merge-on-login/criteria.json
skills/payments-checkout/cart-logic/evals/guest-to-user-cart-merge-on-login/task.md
skills/payments-checkout/cart-logic/tile.json

Let your AI agent find skills like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.

wish › “Build or configure a shopping cart with add, remove, update operations”

Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →

Related skills

live-chat-commerce
by finsilabs · finsilabs/awesome-ecommerce-skills

Live Chat Commerce equips your storefront with real-time chat capabilities, letting agents view customer carts, share product recommendations, and handle purchase questions directly. The skill covers platform-specific setup for Shopify Inbox, Tidio, Gorgias, and LiveChat, plus guidance for building custom WebSocket-based chat systems when third-party tools fall short. Use it to reduce pre-purchase friction and measure chat-driven conversion gains.

MITupdated Mar 2026
★ 40repo stars
flash-sale-scaling
by finsilabs · finsilabs/awesome-ecommerce-skills

Flash Sale Scaling equips you with infrastructure patterns to survive extreme traffic events—50–100× normal load arriving in seconds. The skill covers platform-specific strategies for Shopify, WooCommerce, and BigCommerce, plus custom implementations using Redis atomic inventory, queue-based order intake, and graceful degradation under load.

MITupdated Mar 2026
★ 40repo stars
customer-support-integration
by finsilabs · finsilabs/awesome-ecommerce-skills

Embed order history, tracking, and customer spend directly into your helpdesk tickets so support agents work faster without context-switching. This skill covers platform-specific setup for Shopify, WooCommerce, and BigCommerce, plus custom integrations for headless stores using Zendesk or Intercom. Build automation to route VIP customers, tag high-value orders, and sync support scores back to your CRM.

MITupdated Mar 2026
★ 40repo stars
multi-currency
by finsilabs · finsilabs/awesome-ecommerce-skills

Multi-Currency brings localized pricing to your storefront, letting international shoppers see and pay in their preferred currency. The skill covers platform-specific setup for Shopify, WooCommerce, and BigCommerce, plus custom implementations using Stripe and live exchange rate feeds. Currency detection, display formatting, and payment settlement are handled automatically.

MITupdated Mar 2026
★ 40repo stars
international-shipping
by finsilabs · finsilabs/awesome-ecommerce-skills

International Shipping guides you through handling cross-border orders on major platforms, from assigning HS codes and calculating landed costs to generating customs declarations and screening prohibited items. Learn to configure DDP checkout so customers see duties upfront, integrate with carriers and customs brokers, and avoid costly delays.

MITupdated Mar 2026
★ 40repo stars
woocommerce-subscriptions
by finsilabs · finsilabs/awesome-ecommerce-skills

This skill teaches you to create subscription products in WooCommerce with configurable billing periods, free trials, and sign-up fees. Learn to hook into subscription lifecycle events—activation, renewal success, payment failure, and cancellation—to automate access control and business logic. Handle plan upgrades, downgrades, and payment retries programmatically.

MITupdated Mar 2026
★ 40repo stars

More skills subscription-billing (MIT) · stripe (Apache-2.0)

Tags
cart-managementsession-storagecross-device-syncguest-to-accountinventory-validationheadless-commercecart-persistencecheckout-flowstate-preservationecommerce-backend