create-simple-cart-interceptor

Generates and registers a TypeScript SimpleCartListener interceptor to customize Glyvio cart views.

1|Updated Jun 11, 2026
One-click install
npx skills add https://github.com/devena/glyvio-forge --skill create-simple-cart-interceptor-devena
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: create-simple-cart-interceptor
Source: https://github.com/devena/glyvio-forge/tree/main/claude/skills/create-simple-cart-interceptor
Command: npx skills add https://github.com/devena/glyvio-forge --skill create-simple-cart-interceptor-devena

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Customizing an existing Glyvio SimpleCart view from another plugin requires writing a correctly-typed interceptor class, choosing the right abstract base class, and navigating the cart's design tree — all of which is error-prone without knowing the live design structure. ## Core Features & Use Cases - Live Design Capture: Uses a temporary SpyInterceptor plus a Chrome remote-debugging inspection script to dump the cart's actual design JSON to disk before writing any code. - JSON-Grounded Code Generation: Derives every navigation path and widget lookup from the captured design JSON, using findWidgetByKey instead of hardcoded indices. - Full Interceptor Scaffold: Generates a class overriding getDesign, onAddItemToCart, onRemoveItemFromCart, and getStatusItemOfCart, then registers it via appInterceptorService. - Use Case: A developer needs to hide a column and change a button in the SaleEditCart view owned by another plugin; the skill captures the live design, saves an analysis file, and produces a registered interceptor that applies the changes. ## Quick Start Ask the agent to create a SimpleCart interceptor for a named cart view, providing the target cart, route, state, and base interceptor class names plus the modifications you want.

Frequently Asked Questions about create-simple-cart-interceptor

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I customize a SimpleCart view from another Glyvio plugin?▼

Create a class extending the cart's abstract SimpleCartListener base class, override getDesign to mutate the SimpleCartDesign tree, and register it via appInterceptorService.registerInterceptors. Use findWidgetByKey to locate widgets instead of hardcoded cell indices.

How to intercept item additions and removals in a Glyvio cart?▼

Override onAddItemToCart and onRemoveItemFromCart in your SimpleCartListener subclass. These hooks receive the state, entity name, entity ID, and the added or removed entity, letting you validate, block, or trigger background reactions.

Can a SimpleCartListener add a new button action to an existing cart?▼

No. SimpleCartListener has no generic onEvent hook, so getDesign can render a new button but nothing in the interceptor can handle its action key. You must edit the cart's own events() method or reshape the need around onAddItemToCart or CartButtonDesign.

Why does the skill capture the cart design JSON before writing code?▼

The live design JSON is the ground truth for the cart's runtime structure. A temporary SpyInterceptor dumps the design via Chrome remote debugging so every navigation path and widget key in the generated code matches the actual design rather than assumptions.

How do I choose the right base interceptor class for a Glyvio cart?▼

Search the plugin's .d.ts declaration files for the abstract interceptor whose getListenerRoute returns the target route class. If a specialized subclass carries the JSDoc comment "You MUST extend this instead.", extend that class; never invent a parent interceptor.