Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

price-rules-engine

БесплатноБез исполняемых скриптовНе проверен

Define stackable pricing rules with priority ordering, customer-segment targeting, product exclusions, and automatic discount combination logic

finsilabsот finsilabs★ 69 звёзд на GitHub

Об этом скилле

Price Rules Engine

Overview

A price rules engine lets you define multiple concurrent promotions — site-wide sales, coupon codes, loyalty discounts — and apply them to a cart in a predictable, controlled order. The key concerns are: which rules apply to which products, which rules can stack with others, and what happens when multiple rules target the same item. Every major platform has some form of this built in; the gap is usually in advanced stacking control and customer-segment targeting.

When to Use This Skill

  • When you have multiple concurrent promotions (site-wide sale + coupon + loyalty discount) and need deterministic stacking behavior
  • When marketing needs to create complex promotions (e.g., "20% off all shoes except Nike, for Gold loyalty members") without engineering involvement
  • When migrating from hardcoded promotional logic scattered across the codebase to a data-driven rule system
  • When building a promotion scheduler that activates and deactivates rules at configured times
  • When you need an audit log that shows exactly which rules were applied and why for customer service queries

Core Instructions

Step 1: Determine the merchant's platform and choose the right tool

Platform Built-in Capability When to Extend
Shopify Discounts admin handles basic stacking via "Combinations" settings Use Bold Discounts or Shopify Scripts (Plus) for advanced rule stacking, customer-segment targeting, and conditional logic
WooCommerce Coupons core + Dynamic Pricing plugin for conditional rules For complex priority ordering and segment targeting: YITH WooCommerce Dynamic Pricing & Discounts provides the most control
BigCommerce Promotions engine supports multiple concurrent promotions with priority ordering and stacking rules BigCommerce's built-in system handles most scenarios natively
Custom / Headless Must build Required when none of the above fits your use case

Step 2: Configure price rules with stacking on your platform


Shopify

Shopify manages discount stacking through the Combinations setting on each discount.

Setting up stacking rules:

  1. Go to Discounts → create or edit a discount
  2. Scroll to the Combinations section
  3. Toggle which types this discount can combine with:
    • Product discounts — can this stack with other product-level discounts?
    • Order discounts — can this stack with order-level discounts?
    • Shipping discounts — can this stack with free-shipping discounts?
  4. For automatic discounts, the highest-value automatic discount takes precedence by default; use Combinations to allow stacking

Customer-segment targeting:

  1. Under Customer eligibility, choose Specific customer segments
  2. Select segments created in Customers → Segments (e.g., "VIP customers", "First-time buyers")

Priority and exclusions:

  • Set Start and end dates to control which rules are active
  • Under Products, set which products or collections the discount applies to
  • Add exclusions: "Exclude sale items" or specify products that are excluded

Shopify Plus — Shopify Scripts: For rules that cannot be expressed through the Discounts UI (e.g., tiered stacking where the second discount only applies if the cart is above a threshold):

  1. Go to Apps → Script Editor (Scripts is a separate Shopify Plus feature)
  2. Create a Line Item Script or Shipping Script
  3. Scripts run at checkout and can apply complex conditional discounts; they take precedence over other discounts

Bold Discounts (App Store, ~$20/month): A visual rule builder for Shopify that supports:

  • Stack / don't stack per promotion
  • Priority ordering between promotions
  • Complex conditions (customer tags, collection membership, quantity thresholds)

WooCommerce

WooCommerce coupons support basic single-rule discounts. For a full price rules engine with priority ordering and stacking control, use the Dynamic Pricing plugin.

Installing and configuring YITH WooCommerce Dynamic Pricing & Discounts:

  1. Install the plugin from YITH.com (~$70/year)
  2. Go to YITH → Dynamic Pricing → Pricing Rules
  3. Create a rule and configure:
    • Type: cart, product, or category pricing
    • Discount: percentage or fixed amount
    • Conditions: cart subtotal, quantity, customer role, date range
    • Products/categories: which items the rule applies to; set exclusions
    • Priority: lower number = higher priority (applied first)
    • Stacking: "Stop other rules" to prevent lower-priority rules from stacking

Customer segment targeting in WooCommerce:

  1. Use WooCommerce Customer Roles (available via plugins like User Role Editor or WooCommerce B2B):
    • Assign customers to roles like "wholesale", "vip", "trade"
  2. In Dynamic Pricing rules, restrict each rule to specific customer roles
  3. Customers in that role see t
Полный SKILL.md на GitHub

Установить price-rules-engine в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

claude-code
cursor
gemini-cli
copilot
codex-cli
kiro
opencode

Вложенные файлы

evals/order-persistence-and-rule-versioning/criteria.jsonevals/order-persistence-and-rule-versioning/task.mdevals/priority-stacking-evaluation/criteria.jsonevals/priority-stacking-evaluation/task.mdevals/rule-schema-and-eligibility-filtering/criteria.jsonevals/rule-schema-and-eligibility-filtering/task.mdtile.json

FAQ

Что делает скилл price-rules-engine?

Define stackable pricing rules with priority ordering, customer-segment targeting, product exclusions, and automatic discount combination logic

Как установить скилл price-rules-engine?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл price-rules-engine запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить price-rules-engine с