saleor/agent-skills

saleor-core

Saleor backend internals and behavior reference. Covers discount precedence, order-level discount allocation across lines (two-pass calculation, what the API does and doesn't expose, gift-line shape gotchas), stock availability modes (legacy vs direct, 3.23+), Dashboard UI rules, webhook trigger conditions, denormalized field semantics, and migration footguns. Use when working with Saleor discounts or stock availability, building Dashboard UI, building price-explanation tooling, or debugging ba…

First seen Mar 27, 2026

Installation

$ npx skills add saleor/agent-skills --skill saleor-core

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from saleor/agent-skills.

npx skills add saleor/agent-skills

Browse all from saleor/agent-skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 2
License LICENSE
Default branch main
Open issues 0
Status Active

Skill metadata

Parsed from SKILL.md frontmatter.

Version1.2.0
LicenseMIT
More metadata
author
saleor
version
1.2.0

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 3,375 B
  • docs README.md 1,662 B
  • docs SUMMARY.md 532 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 396 installs

SKILL.md

Saleor Core

Backend behavior reference derived from the Saleor core source code. Covers internal mechanics that aren't fully documented in the public API reference — discount precedence, stock availability modes, denormalized fields, and known Dashboard gotchas.

When to Apply

  • Building or debugging discount/promotion UI in the Dashboard
  • Investigating why a voucher or promotion isn't applying
  • Understanding order-level vs line-level discount precedence
  • Working with OrderDiscount / OrderLineDiscount objects
  • Debugging unitdiscountvalue on OrderLine
  • Deciding whether discounts stack or suppress each other
  • Building price-explanation / waterfall tooling on confirmed orders
  • Reconstructing how an order-level discount distributed across lines
  • Handling free-gift order lines (OrderLine.isGift = true)
  • Working on stock availability, shipping zones, warehouses, or Shop.useLegacyShippingZoneStockAvailability
  • Debugging why PRODUCTVARIANT*INCHANNEL webhooks aren't firing
  • Building diagnostic / "doctor" tooling that explains availability problems
  • Auditing Dashboard copy that uses "available" / "in stock" / "purchasable"

Rule Categories

Priority Category Impact Prefix
1 Discounts CRITICAL discount-
2 Stock CRITICAL stock-

Quick Reference

1. Discounts (CRITICAL)

  • discount-precedence — Full precedence hierarchy, stacking rules, manual vs voucher vs promotion interactions, denormalized field semantics, known Dashboard bug
  • order-discount-allocation — Two-pass calculation of order-level discounts (Pass A collapses records into a single subtotaldiscount; Pass B distributes proportionally across lines with last-line absorbing rounding), what the API exposes (per-line totals, per-record-at-order amounts) and what it doesn't (per-record-per-line decomposition), gift-line shape gotcha (ORDERPROMOTION on OrderLine.discounts[] when isGift = true), reconstruction guidance for consumers

2. Stock (CRITICAL)

  • stock-availability-modesShop.useLegacyShippingZoneStockAvailability (3.23+), purchasability vs shippability, server queryset dispatch, mode-conditional webhooks, Dashboard UI / copy / severity rules, migration footguns, test fixtures

How to Use

Read individual rule files for detailed explanations and source-level evidence:

rules/discount-precedence.md
rules/order-discount-allocation.md
rules/stock-availability-modes.md

Each rule file contains:

  • Precedence hierarchy or computation rules
  • Source code references from saleor/ with function names and file paths
  • Anti-patterns and known bugs