Install
$ agentstack add skill-aetheria-labs1-storefront-skills-cart ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Configure Cart V2
Configure the Cart V2 drawer — add upsells, progress bars, conditional rules, announcement banners, and checkout customization
Workflow
Cart V2 Composition — DrawerShell + Atomic Islands
Compose a Cart V2 drawer using atomic islands inside a DrawerShell container. Use when store has cart_v2 enabled.
Overview
Cart V2 replaces the monolithic CartDrawer with composable islands that each handle one responsibility. The drawer HTML lives in store-level config (cart_sections array), shared across all pages. Islands read runtime data from the store's commerce_config at hydration time.
Required Structure
Cart V2 pages set head.use_cart_v2: true ONLY. No cart section appears in the page sections array.
{
"head": {
"title": "...",
"use_cart_v2": true
}
}
The renderer injects the cart HTML (from store config) after page sections at render time. Manage via get_cart_config and update_cart_config MCP tools.
Minimum required islands inside DrawerShell:
CartLines— line itemsCartCheckoutButton— checkout CTA
Validation fails without both.
Island Catalog
| Island | Purpose | Key Props | |---|---|---| | DrawerShell | Container / drawer chrome | trigger (event name, default "cart:open") | | CartLines | Line items with qty controls | — | | CartCheckoutButton | Checkout CTA | text? | | CartSummary | Subtotal / taxes / total | — | | CartProgressBar | Free shipping / tiered progress | threshold?, message?, completedMessage?, tiers?, currency? | | CartDiscountInput | Promo code field | placeholder? | | CartCrossSell | Upsell recommendations | heading?, max?, layout?, showQuickAdd? |
DO NOT use CartAnnouncement, CartOrderNote, or CartCountdown — these are unimplemented.
CartCrossSell Config
CartCrossSell is self-managing. It reads product recommendations from commerce_config.upsells at the store level. There is NO source prop.
Props (all optional):
heading— section heading text (e.g."Complete Your Routine")max— maximum products to show (default determined by config)layout—"horizontal"|"grid"|"stack"showQuickAdd— boolean, show inline add-to-cart
Product IDs in commerce_config.upsells must be Shopify GIDs: gid://shopify/Product/...
For config-driven defaults, use empty props:
For display overrides:
CartProgressBar Config
CartProgressBar self-manages visibility. It falls back to $cartConfig.free_shipping_threshold when no threshold prop is passed.
Props (all optional):
threshold— target amount in cents (overrides store config)message— template string, use{remaining}placeholdercompletedMessage— shown when threshold mettiers— array of{ threshold, label }for multi-tier progresscurrency— currency code (falls back to store currency)
Config-driven (reads threshold from store config):
Explicit threshold:
Multi-tier:
Composition Rules
- DrawerShell must have
data-island-containerattribute — prevents children from hydrating on page load. - DrawerShell
triggerprop is an event name (default"cart:open"). It is NOTtriggerId. - Only pass display props (heading, layout, text). Config-driven behavior uses empty
data-props='{}'. - CartCrossSell and CartProgressBar self-manage visibility — no conditional rules needed for basic show/hide.
- Max 6-7 islands inside DrawerShell to avoid clutter and hydration overhead.
- One cart config per store — applies to ALL pages. Pages only set the
head.use_cart_v2: trueflag. - Never mix CartDrawer (V1) and DrawerShell (V2) — validation error.
Example
Complete DrawerShell HTML for a store config:
Anti-Patterns
| Anti-Pattern | Why It Breaks | |---|---| | Using triggerId on DrawerShell | Prop is trigger (event name string), not triggerId | | Passing source to CartCrossSell | No source prop exists — reads from commerce_config.upsells | | Using CartAnnouncement / CartOrderNote / CartCountdown | Unimplemented islands — will not render | | Missing data-island-container on DrawerShell | Children hydrate immediately on page load (perf hit) | | Putting cart section in page sections array | Cart V2 lives in store config only; page sets head.use_cart_v2: true | | CartDrawer + DrawerShell on same page | Validation error — pick one | | No CartLines or CartCheckoutButton | Validation blocks publish |
Cart V2 Management — MCP Workflow
How to read, modify, and validate store-level cart configuration using MCP tools.
Store Config Shape
The actual API response from get_cart_config:
{
"id": "uuid",
"store_id": "uuid",
"cart_mode": "drawer-right",
"cart_sections": [{"id": "cart-drawer", "html": "...", "css": "...", "js": "..."}],
"cart_rules": [...],
"commerce_config": {
"free_shipping_threshold": 7500,
"currency": "USD",
"upsells": [{"trigger_product_ids": ["gid://shopify/Product/123"], "recommend_product_ids": ["gid://shopify/Product/789"], "label": "Complete your routine"}],
"cart_style": {"mode": "drawer-right", "responsive": {"mobile": "bottom-sheet"}, "width": "420px", "animate": "spring"},
"checkout_mode": "standard"
}
}
Available Tools (ONLY these 3)
get_cart_config
Read current config. Always call first.
Params: store_id (UUID)
update_cart_config
Partial update. Validates rules before persisting.
Params:
store_id(UUID, required)cart_mode(optional)cart_sections(optional, array of{id, html, css?, js?})cart_rules(optional, array)commerce_config(optional, object)
validate_cart_rules
Dry-run validation. Does not persist.
Params:
store_id(UUID)rules(array)
Returns: {valid, errors[]}
Reactive Workflow
- Call
get_cart_configto read current state - Modify the relevant field (
commerce_configfor thresholds/upsells,cart_sectionsfor HTML,cart_rulesfor conditional logic) - Call
update_cart_configwith only the changed fields - Islands react automatically — CartProgressBar reads
free_shipping_threshold, CartCrossSell readsupsells
Common Operations
Add upsell
- Read config
- Append to
commerce_config.upsells:
{"trigger_product_ids": ["gid://shopify/Product/123"], "recommend_product_ids": ["gid://shopify/Product/789"], "label": "Complete your routine"}
- Call
update_cart_configwith updatedcommerce_config
Change threshold
- Read config
- Set
commerce_config.free_shipping_thresholdto new value (cents) - Call
update_cart_configwith updatedcommerce_config
Add rule
- Read config
- Append to
cart_rules - Validate first via
validate_cart_rules - Call
update_cart_configwith updatedcart_rules
Change mode
Call update_cart_config with cart_mode: "bottom-sheet" (or other valid mode).
Important Notes
cart_sectionsis a JSONB array (not a string) — same structure as page sections- Product IDs in upsells must be Shopify GIDs (
gid://shopify/Product/XXX) - Islands are self-managing: CartCrossSell shows/hides based on cart contents matching
trigger_product_ids - No need to regenerate HTML when changing
commerce_config— islands read it live
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: Aetheria-Labs1
- Source: Aetheria-Labs1/storefront-skills
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.