cart-logic

cart-logic is a skill for Claude Code, Codex from finsilabs/awesome-ecommerce-skills. It costs 28 tokens per session (2,208 once invoked), scanned A, original, MIT.

The logic that manages the contents of an online shopping cart, including adding, removing, updating, saving, and merging items.

In plain words
What is it for?
It helps build or configure carts for Shopify, WooCommerce, BigCommerce, and custom headless storefronts.
Why use it?
It prevents carts from disappearing between visits or after a guest shopper logs in, and keeps prices current when quantities or discounts change.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Codex; mentions Gemini CLI; mentions OpenCode.

Good fit It helps build or configure carts for Shopify, WooCommerce, BigCommerce, and custom headless storefronts.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/finsilabs/awesome-ecommerce-skills/cart-logic
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add finsilabs/awesome-ecommerce-skills --skill cart-logic
Clone the repo
git clone --depth 1 https://github.com/finsilabs/awesome-ecommerce-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cart-logic

README.md
[![agentmods](https://agentmods.dev/badge/skills/finsilabs/awesome-ecommerce-skills/cart-logic/github.svg)](https://agentmods.dev/skills/finsilabs/awesome-ecommerce-skills/cart-logic)
Your own site
<a href="https://agentmods.dev/skills/finsilabs/awesome-ecommerce-skills/cart-logic"><img src="https://agentmods.dev/badge/skills/finsilabs/awesome-ecommerce-skills/cart-logic/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cart-logic

Your own site · 80×15
<a href="https://agentmods.dev/skills/finsilabs/awesome-ecommerce-skills/cart-logic"><img src="https://agentmods.dev/badge/skills/finsilabs/awesome-ecommerce-skills/cart-logic.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 28 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,208 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00028 $0.02208
Opus 5 $0.00014 $0.01104
Sonnet 5 $0.00006 $0.00442
Haiku 4.5 $0.00003 $0.00221

Measured 9d ago against content hash e022412bc995, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

cart-logic scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/payments-checkout/cart-logic/SKILL.md · 201 lines

How it starts

The opening of the file, as written. The whole thing — 201 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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 persistence)
  • When guest cart items disappear after login (missing merge logic)
  • When implementing real-time cart price updates (coupons, quantity changes, shipping estimates)
  • When building a headless storefront that needs a custom cart implementation

Core Instructions

Step 1: Understand how your platform handles cart logic

Platform Cart Behavior Where to Configure
Shopify Built-in cart with automatic persistence; uses cookies/localStorage Theme Liquid templates + Cart API; extend with Cart Transform Shopify Function
WooCommerce Built-in cart with session persistence; configures via PHP hooks WooCommerce settings + woocommerce_add_cart_item_data and woocommerce_cart_item_price filters
BigCommerce Built-in Storefront Cart API; cart persists via cookie BigCommerce Stencil theme + Storefront Cart API
Custom / Headless Must build from scratch using platform APIs or Shopify/BigCommerce Storefront API See Custom / Headless section below

Step 2: Configure and extend cart behavior


Shopify

Shopify's cart is managed automatically. To extend it:

Customize the cart drawer or page:

  1. Go to Online Store → Themes → Customize
  2. Select the cart section and configure: cart type (drawer vs. page), item display, quantity controls
  3. Enable Cart notes and Shipping estimate in the cart settings if needed

Read the full file on GitHub · 201 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 201 lines · 28 tokens per session scan A e022412bc995

Subscribe to this mod's changes

cart-logic is a skill published in the GitHub repository finsilabs/awesome-ecommerce-skills (52 stars, last pushed 6mo ago), licensed MIT. It adds 28 tokens to every session and 2,208 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

add-wish

Save any product to a universal wishlist. Converts any product URL into a one-click "save for later" link. Works with any retailer, any AI platform, zero setup.

wishfinity/wishfinity-mcp-plusw · 39 tokens

zustand-patterns

Reference for Zustand 5.x state management including slices, middleware, Immer, useShallow, persistence, selectors, and devtools integration. Documents 7 core patterns with TypeScript examples and anti-patterns. Use when building React state management with Zustand instead of Redux.

yonatangross/orchestkit · 59 tokens

session-summarize

Review the current chat session and persist its valuable takeaways — business facts/rules, validated SQL, metric/model definitions, durable preferences, project conventions, reusable workflows — by classifying each via storage-classify and routing it to the right store. Present a Summary Manifest and STOP for…

Datus-ai/Datus-agent · 86 tokens

terminal-session

Persistent terminal session management for security testing. Use this skill when you need an interactive shell session that maintains state between commands (working directory, environment variables, etc.) during authorized penetration testing.

iammm0/secbot · 41 tokens

e-commerce

E-commerce platforms, payment processing, and shopping cart patterns.

miles990/claude-software-skills · 14 tokens

cart-management

A shopping-cart assistant for checking products before an order is placed. It works when reviewing prices, stock, or the contents of a cart.

hungryCodingSir/trade-agent-skills · 35 tokens