skills/vendix-product-variants/SKILL.md
Product and service variant rules for Vendix: variants as sellable options, inventory-independent availability, service variant booking overrides, and ecommerce/POS/cart behavior. Trigger: When creating, editing, validating, or selling product variants, service variants, products without stock, or any flow where variant availability must not be confused with inventory.
npx skillsauth add rzyfront/vendix vendix-product-variantsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill when working with variants for products or services. Variants in Vendix are sellable/configurable options, not inventory units. Inventory is an optional layer that applies only when effective tracking is enabled.
This skill governs business behavior and cross-flow expectations. Pricing details belong to vendix-product-pricing; physical stock mutations belong to vendix-inventory-stock; checkout flow details belong to vendix-ecommerce-checkout.
stock_quantity is 0.product_variant_id in ecommerce, POS, cart, checkout, and booking flows.product_variant_id, SKU, attributes, price snapshots, and booking references when available.| Item type | Effective stock tracking | Variants allowed | Availability source |
| --- | --- | --- | --- |
| Physical product | true | Yes | stock_levels for base or selected variant |
| Physical product | false | Yes | Always sellable unless product/variant is inactive |
| Service with booking | false | Yes | Booking availability using duration, buffer, provider, and selected variant |
| Service without booking | false | Yes | Always sellable unless product/variant is inactive |
Resolve inventory tracking at the product/variant pair:
const effectiveTracking =
variant.track_inventory_override ?? product.track_inventory;
const requiresStockValidation =
product.product_type === 'physical' && effectiveTracking === true;
Rules:
requiresStockValidation is false, do not check stock_quantity or stock_levels to decide if the variant can be sold.requiresStockValidation is true, validate availability through StockValidatorService / StockLevelManager, not denormalized stock_quantity alone.track_inventory_override = null and inherit product.track_inventory = false.Service variants may override parent service values:
price_overridecost_priceprofit_marginis_on_salesale_priceservice_duration_minutesservice_pricing_typebuffer_minutespreparation_time_minutesattributesimage_idNull service override fields mean inherit from the parent product.
Booking and availability flows must use the selected product_variant_id to resolve effective duration and buffer:
const duration =
variant?.service_duration_minutes ??
product.service_duration_minutes ??
60;
const buffer =
variant?.buffer_minutes ??
product.buffer_minutes ??
0;
Catalog and POS product reads:
stock_quantity is 0.requiresStockValidation is true and stock is unavailable.Cart and checkout:
product_variant_id.requiresStockValidation is true.requiresStockValidation is true.product_variant_id to booking and order item payloads.Admin product forms must adapt the variant editor by product type and tracking mode:
| Situation | UI behavior | | --- | --- | | Physical product with stock | Show SKU, attributes, price, image, and stock controls per variant | | Physical product without stock | Show SKU, attributes, price, and image; do not require stock | | Service with booking | Show service option fields: duration, buffer, preparation time, pricing type, price, and image | | Service without booking | Show service option fields that affect sale/fulfillment; do not show stock requirements |
Do not force variant stock totals to be greater than zero when product tracking is disabled.
price_override must be null or greater than zero.is_on_sale is true, sale_price must be greater than zero and lower than price_override ?? product.base_price.product_type = service.product_variants unless the service explicitly strips them before Prisma writes.stock_quantity = 0 must not be treated as unavailable unless effective tracking is enabled.where: { stock_quantity: { gt: 0 } } without checking effective tracking.product.track_inventory alone when a variant has track_inventory_override.product_variant_id but calculating duration, price, or order items from the product only.product_variants.base_price; variants use price_override.vendix-product-pricing - Variant price, cost, margin, sale price, and final price rules.vendix-inventory-stock - Stock source of truth, effective stock writes, reservations, and simple/variant stock transitions.vendix-ecommerce-checkout - Cart, checkout, bookings, and stock reservation flow.vendix-frontend - Angular web app structure.vendix-zoneless-signals - Angular signals and zoneless rules for frontend variant editors.vendix-business-analysis - Business discovery before planning economically relevant variant changes.development
Mobile app development rules for Vendix Expo/React Native project. Trigger: When editing, creating, or modifying any file under apps/mobile, or when developing mobile-specific features.
development
Feature gating by store subscription state: global store write guard, AI feature gate, Redis feature resolution, quota consumption, frontend paywall interceptor, banner, and subscription UI states. Trigger: When adding feature gates, paywalls, subscription-based access control, protecting store write operations, AI feature gates, or rollout flags.
testing
SaaS subscription billing for Vendix stores: plan pricing, invoices, Wompi platform payments, manual payments, partner commissions, payouts, proration, and dunning. Trigger: When creating SaaS invoices, working with partner rev-share, margin/surcharge pricing, invoice sequence allocation, partner payout batches, subscription payments, manual payments, or dunning flows.
development
Periodic quota counters with Redis, UTC period keys, Lua-based idempotent AI quota consumption, request-id deduplication, and post-success consumption. Trigger: When building quota counters, enforcing monthly/daily feature caps, or reusing AI quota patterns for uploads, emails, exports, or rate-limited features.