rune-ext-ecommerce

Audit and implement e-commerce payment, cart, inventory, and order lifecycle patterns.

1|Updated Mar 22, 2026
One-click install
npx skills add https://github.com/dangvu008/VietTruyen --skill rune-ext-ecommerce-dangvu008
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rune-ext-ecommerce
Source: https://github.com/dangvu008/VietTruyen/tree/main/.agents/skills/rune-ext-ecommerce
Command: npx skills add https://github.com/dangvu008/VietTruyen --skill rune-ext-ecommerce-dangvu008

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? E-commerce codebases fail at the seams between systems: double charges from retried payment intents, overselling during flash sales, lost guest carts on login, wrong subscription proration, and duplicate webhook processing. This Skill audits and generates production patterns for the full order lifecycle, from storefront to payment to fulfillment. ## Core Features & Use Cases - Payment Integration: Stripe Payment Intents with idempotency keys, 3D Secure handling, signature-verified webhooks with event deduplication, plus Vietnamese gateways (SePay, VNPay, MoMo). - Cart & Inventory: Server-authoritative carts with guest-to-auth merge, atomic stock reservation with optimistic locking, and reservation expiry jobs for abandoned checkouts. - Order & Subscription Lifecycle: Typed order state machines with side effects, reconciliation jobs matching payments to orders, and subscription billing with proration and dunning. - Use Case: Before launching a Shopify or Next.js storefront, run the pack to audit checkout flow, verify webhook idempotency, and generate a tax-compliant order pipeline with fraud scoring. ## Quick Start Ask the agent to audit my checkout and payment flow for double-charge and overselling risks using the ecommerce skill pack.

Frequently Asked Questions about rune-ext-ecommerce

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

FAQPage Schema
How do I prevent double charges with Stripe Payment Intents?

Derive the idempotency key from the cart, such as checkout-{cartId}-v{version}, rather than a timestamp, and check for an existing succeeded intent before creating a new one. Always calculate the amount server-side from the verified cart.

How to handle Stripe webhook signature verification in Express?

Use express.raw({ type: 'application/json' }) on the webhook route so req.body is the raw Buffer, then call stripe.webhooks.constructEvent with that raw body. Store each event.id in the database and skip already-processed events to keep handling idempotent.

How do I prevent overselling inventory during a flash sale?

Use optimistic locking with a version field on the variant row, retrying the decrement a few times on conflict, and create time-limited reservations at checkout. Run an expiry job every few minutes to release stock from abandoned checkouts.

Does this skill support Vietnamese payment gateways like VNPay and MoMo?

Yes, it includes integration patterns for SePay QR bank transfers with HMAC-verified webhooks, VNPay redirect payments with HMAC-SHA512 signed parameters, and MoMo or ZaloPay e-wallets, alongside Stripe and PayPal.

Why does my guest cart lose items after the user logs in?

This happens when guest and authenticated carts are stored separately with no merge step. Implement a cart merge in the auth callback that posts the guest cart ID to a server endpoint and treats the merged server cart as the source of truth.

What order state transitions should an order management system enforce?

Define a typed state machine such as pending to confirmed to processing to shipped to delivered, with cancelled and refunded as terminal states. Reject invalid transitions and attach side effects like stock release on cancellation and inventory return on refund.