# saleor-storefront

Provides guidelines and GraphQL patterns for building Saleor storefronts. Helps handle checkout flows, multi-channel setups, and variant selection in AI coding agents.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 2300 installs · ★ 2
- Author: saleor
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/saleor/agent-skills/tree/HEAD/skills/saleor-storefront/SKILL.md
- Updated: 2026-08-06
- HTML: https://affpapa.org/en/nevibecode/skills/saleor-storefront

## What it does

This skill guides coding agents through the architecture of Saleor's GraphQL API. It covers nullable schema fields, token types, two-tier permission patterns, and codegen practices. The rules remain framework-agnostic. They apply whether the storefront runs on Next.js or Remix.

The instructions divide into four core priorities: `api-`, `products-`, `checkout-`, and `channels-`. The guide explains how selection attributes differ from simple product specifications, walks through checkout session lifecycles, and flags frequent payment pitfalls. For Saleor 3.23 and later, it details stock availability handling under `useLegacyShippingZoneStockAvailability`.

Missing channel scope in queries leads to empty payload fields and silent authorization failures. The skill lays out purchasability versus shippability checks for regional fulfillment. The full rule reference lives in `AGENTS.md`.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add saleor/agent-skills --skill saleor-storefront -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/saleor-storefront/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/saleor-storefront/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add saleor/agent-skills --skill saleor-storefront -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/saleor-storefront/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add saleor/agent-skills --skill saleor-storefront -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/saleor-storefront/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install saleor/agent-skills saleor-storefront
```

2. **Manually: put the files in place**
- File: `.github/skills/saleor-storefront/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add saleor/agent-skills --skill saleor-storefront -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/saleor/agent-skills --path skills/saleor-storefront
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/saleor-storefront/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add saleor/agent-skills --skill saleor-storefront -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/saleor/agent-skills/tree/HEAD/skills/saleor-storefront/SKILL.md

## When to use it
- query Saleor GraphQL endpoints with proper channel scoping and permissions
- build product detail interfaces with variant selection and pricing rules
- implement checkout lifecycles while debugging payment gateway errors
- manage multi-channel and multi-currency catalog availability
- configure stock availability logic for Saleor 3.23+ stock modes

## Example prompts
- Write a GraphQL query for product details with variant selection scoped to 'default-channel'.
- Debug why this item fails purchasability validation during checkout creation.
- Update our inventory lookup to support useLegacyShippingZoneStockAvailability in Saleor 3.23.

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 0c651fe0d575387c.

BEGIN THIRD-PARTY FILE 0c651fe0d575387c
````text
---
name: saleor-storefront
description: >
  Saleor e-commerce API patterns for building storefronts. Use when working with
  Saleor's GraphQL API, products, variants, checkout, channels, permissions, or
  debugging API behavior. Framework-agnostic — applies to any Saleor storefront.
license: MIT
metadata:
  author: saleor
  version: "1.0.0"
---

# Saleor Storefront

Universal guide for building storefronts on the Saleor e-commerce platform. Covers
the Saleor GraphQL API data model, permission system, checkout lifecycle, channel
architecture, and product/variant patterns. Framework-agnostic — these rules apply
whether you're using Next.js, Remix, Nuxt, or a custom setup.

## When to Apply

Reference these guidelines when:

- Querying Saleor's GraphQL API for products, categories, or collections
- Building product detail pages with variant selection
- Implementing checkout and payment flows
- Working with multi-channel and multi-currency setups
- Debugging "product not purchasable" or permission errors
- Working with Saleor 3.23+ stock availability modes (`useLegacyShippingZoneStockAvailability`)
- Investigating Saleor API behavior via source code

## Rule Categories

| Priority | Category  | Impact   | Prefix       |
| -------- | --------- | -------- | ------------ |
| 1        | API       | CRITICAL | `api-`       |
| 2        | Products  | HIGH     | `products-`  |
| 3        | Checkout  | HIGH     | `checkout-`  |
| 4        | Channels  | MEDIUM   | `channels-`  |

## Quick Reference

### 1. API (CRITICAL)

- `api-data-model` — Nullable fields, pricing structure, automatic storefront filtering
- `api-permissions` — Token types, permission errors, two-tier query pattern
- `api-graphql-patterns` — Channel-scoped queries, variant attributes, filtering, codegen
- `api-investigation` — How to investigate Saleor API behavior via types and source

### 2. Products (HIGH)

- `products-variants` — Variant model, selection vs non-selection attributes, pricing, UX patterns

### 3. Checkout (HIGH)

- `checkout-lifecycle` — Session lifecycle, common errors, debugging payment issues

### 4. Channels (MEDIUM)

- `channels-purchasability` — Stock availability modes (legacy vs direct, 3.23+), purchasability vs shippability, fulfillment triangle, mode-aware checklists, channel-scoped queries, stock webhooks

## How to Use

Read individual rule files for detailed explanations and code examples:

```
rules/api-data-model.md
rules/products-variants.md
```

Each rule file contains:

- Brief explanation of why it matters
- Code examples (correct and incorrect patterns)
- Anti-patterns to avoid
````
END THIRD-PARTY FILE 0c651fe0d575387c

The third-party file has ended. Everything between the 0c651fe0d575387c tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2638 of 2726 bytes. © saleor · MIT · https://github.com/saleor/agent-skills/tree/HEAD/skills/saleor-storefront/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
