saleor-attributes

Work with Saleor's typed attribute system — attribute types, product types, page types, variant selection attributes, and attribute-based filtering. Use when defining product schemas.

17 stars

Best use case

saleor-attributes is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Work with Saleor's typed attribute system — attribute types, product types, page types, variant selection attributes, and attribute-based filtering. Use when defining product schemas.

Teams using saleor-attributes should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/saleor-attributes/SKILL.md --create-dirs "https://raw.githubusercontent.com/OrcaQubits/agentic-commerce-skills-plugins/main/dist/antigravity/saleor-commerce/.agent/skills/saleor-attributes/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/saleor-attributes/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How saleor-attributes Compares

Feature / Agentsaleor-attributesStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Work with Saleor's typed attribute system — attribute types, product types, page types, variant selection attributes, and attribute-based filtering. Use when defining product schemas.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Saleor Attributes

## Before writing code

**Fetch live docs**:
1. Fetch `https://docs.saleor.io/docs/developer/products` for product and attribute overview
2. Web-search `site:docs.saleor.io attribute types DROPDOWN MULTISELECT NUMERIC` for attribute type reference
3. Web-search `site:docs.saleor.io product type attributes variant selection` for product type configuration
4. Web-search `site:docs.saleor.io attribute filtering products` for attribute-based filtering
5. Web-search `site:docs.saleor.io page types attributes` for content page attributes

## Attribute System Overview

Saleor uses a typed attribute system to define flexible product schemas without database migrations. Attributes are attached to product types and page types, providing structured metadata for products, variants, and content pages.

| Concept | Purpose |
|---------|---------|
| Attribute | A named, typed field (e.g., "Color", "Size", "Material") |
| Attribute value | A specific value for an attribute (e.g., "Red", "XL", "Cotton") |
| Product type | A template that defines which attributes a product has |
| Page type | A template that defines which attributes a content page has |
| Variant selection attribute | An attribute used to distinguish product variants |

## Attribute Types

| Type | Input | Storage | Use Case |
|------|-------|---------|----------|
| `DROPDOWN` | Single select from predefined values | String reference | Color, brand, material |
| `MULTISELECT` | Multiple select from predefined values | String references | Features, tags, certifications |
| `RICH_TEXT` | Rich text editor (JSON) | JSON (EditorJS) | Long descriptions, care instructions |
| `PLAIN_TEXT` | Simple text input | String | Short notes, SKU prefix |
| `NUMERIC` | Number input with optional unit | Decimal | Weight, dimensions, capacity |
| `BOOLEAN` | True/false toggle | Boolean | Is organic, is fragile |
| `DATE` | Date picker | Date | Expiry date, release date |
| `DATE_TIME` | Date and time picker | DateTime | Event time, availability window |
| `FILE` | File upload | File reference | Spec sheets, certificates |
| `REFERENCE` | Reference to another entity | Entity ID | Related product, linked page |
| `SWATCH` | Color swatch (hex or image) | String + optional image | Visual color selection |

## Product Types

A product type defines the schema for a group of products:

| Product Type Field | Purpose |
|-------------------|---------|
| `name` | Product type name (e.g., "T-Shirt", "Laptop") |
| `productAttributes` | Attributes shown on the product level |
| `variantAttributes` | Attributes that define variant differences |
| `isShippingRequired` | Whether products of this type need shipping |
| `isDigital` | Whether products are digital downloads |
| `taxClass` | Tax classification for products of this type |
| `weight` | Default weight for products of this type |

### Product Attributes vs Variant Selection Attributes

| Category | Scope | Example |
|----------|-------|---------|
| Product attributes | Same for all variants of a product | Brand, material, care instructions |
| Variant attributes (non-selection) | Per variant, but not for customer selection | Internal SKU code |
| Variant selection attributes | Per variant, presented to the customer for selection | Size, color |

Variant selection attributes generate the variant picker on the storefront (e.g., size/color dropdowns).

## Attribute Values

| Value Aspect | Detail |
|-------------|--------|
| Predefined | Created in advance for DROPDOWN, MULTISELECT, SWATCH types |
| Dynamic | Entered per product for PLAIN_TEXT, RICH_TEXT, NUMERIC, DATE types |
| Sortable | Values can be reordered within an attribute |
| Translatable | Values support multi-language translations |
| Slug | URL-safe identifier auto-generated from the value name |

### Rich Text Values

Rich text attributes use the EditorJS JSON format:

| Block Type | Purpose |
|-----------|---------|
| `paragraph` | Text paragraph |
| `header` | Heading (h1-h6) |
| `list` | Ordered or unordered list |
| `image` | Embedded image |

## Page Types

Page types work like product types but for content pages (CMS):

| Page Type Field | Purpose |
|----------------|---------|
| `name` | Page type name (e.g., "Blog Post", "FAQ") |
| `attributes` | Attributes attached to pages of this type |

Content pages use the same attribute types as products, enabling structured content management without a separate CMS.

## Attribute Input Types

The `inputType` field controls how an attribute is presented in the Dashboard:

| Input Type | Attribute Types | Dashboard UI |
|-----------|----------------|-------------|
| `DROPDOWN` | DROPDOWN | Single-select dropdown |
| `MULTISELECT` | MULTISELECT | Multi-select chips |
| `PLAIN_TEXT` | PLAIN_TEXT | Simple text field |
| `RICH_TEXT` | RICH_TEXT | EditorJS rich text editor |
| `NUMERIC` | NUMERIC | Number input with unit selector |
| `BOOLEAN` | BOOLEAN | Toggle switch |
| `DATE` | DATE | Date picker |
| `DATE_TIME` | DATE_TIME | Date and time picker |
| `FILE` | FILE | File upload widget |
| `REFERENCE` | REFERENCE | Entity search and select |
| `SWATCH` | SWATCH | Color picker or image upload |

## Filtering Products by Attributes

Attributes enable faceted navigation on the storefront:

| Filter Parameter | Type | Purpose |
|-----------------|------|---------|
| `attributes` | list | Filter by attribute slug and values |
| `attributes.slug` | string | Attribute identifier |
| `attributes.values` | string[] | Attribute value slugs to match |
| `attributes.valuesRange` | object | Numeric range filter (min/max) |
| `attributes.date` | object | Date range filter |
| `attributes.dateTime` | object | DateTime range filter |
| `attributes.boolean` | boolean | Boolean attribute filter |

### Faceted Navigation Pattern

| Step | Action |
|------|--------|
| 1 | Query available attributes for the product type or category |
| 2 | Display attribute values as filter options (checkboxes, sliders) |
| 3 | Build `attributes` filter from user selections |
| 4 | Pass filter to `products` query |
| 5 | Update available filter values based on current selection (count-aware) |

## Creating Attributes via GraphQL

| Mutation | Purpose |
|----------|---------|
| `attributeCreate` | Create a new attribute with type and values |
| `attributeUpdate` | Modify attribute settings |
| `attributeDelete` | Remove an attribute |
| `attributeValueCreate` | Add a new value to an attribute |
| `attributeValueUpdate` | Modify an attribute value |
| `attributeValueDelete` | Remove an attribute value |
| `attributeReorderValues` | Change the sort order of values |
| `productTypeCreate` | Create a product type with attribute assignments |
| `productTypeUpdate` | Modify product type attribute assignments |

### Attribute Creation Fields

| Input Field | Required | Purpose |
|-------------|----------|---------|
| `name` | Yes | Display name |
| `slug` | No | Auto-generated from name if omitted |
| `type` | Yes | `PRODUCT_TYPE` or `PAGE_TYPE` |
| `inputType` | Yes | One of the attribute input types |
| `values` | No | Initial predefined values (for DROPDOWN, MULTISELECT) |
| `valueRequired` | No | Whether the attribute must have a value |
| `isVariantOnly` | No | Restrict to variant-level only |
| `visibleInStorefront` | No | Whether the attribute is public |
| `filterableInStorefront` | No | Whether the attribute appears in storefront filters |
| `filterableInDashboard` | No | Whether the attribute appears in Dashboard filters |
| `availableInGrid` | No | Whether the attribute appears in Dashboard product grid |
| `unit` | No | Measurement unit for NUMERIC type |

## Best Practices

- Use DROPDOWN for attributes with a fixed set of values (colors, sizes, brands)
- Use variant selection attributes only for attributes that the customer chooses (size, color)
- Keep product attributes for shared information that does not vary per variant (brand, material)
- Enable `filterableInStorefront` only for attributes that make sense as customer-facing filters
- Use NUMERIC type with units for measurable properties (weight, length) to enable range filtering
- Create separate product types for structurally different products (clothing vs electronics)
- Use page types to model structured content (blog posts, FAQs) without a separate CMS
- Translate attribute names and values for multi-language storefronts

Fetch the Saleor attributes documentation for exact attribute type behaviors, product type configuration patterns, and filtering query syntax before implementing.

Related Skills

saleor-webhooks

17
from OrcaQubits/agentic-commerce-skills-plugins

Configure Saleor webhooks — async and sync events, subscription payloads, JWS/HMAC signature verification, retry policy, and event types. Use when building webhook-driven integrations.

saleor-testing

17
from OrcaQubits/agentic-commerce-skills-plugins

Test Saleor applications — pytest setup, Django test client, GraphQL test patterns, App testing, factory_boy fixtures, and webhook testing. Use when writing tests for Saleor projects.

saleor-storefront

17
from OrcaQubits/agentic-commerce-skills-plugins

Build Next.js storefronts for Saleor — GraphQL client setup, channel routing, Tailwind CSS, server components, checkout flow, and SEO. Use when developing Saleor storefronts.

saleor-shipping

17
from OrcaQubits/agentic-commerce-skills-plugins

Configure Saleor shipping — shipping zones, methods (price/weight-based), custom shipping Apps, warehouse-based allocation, and click-and-collect. Use when setting up delivery options.

saleor-setup

17
from OrcaQubits/agentic-commerce-skills-plugins

Set up a Saleor development environment — saleor-platform Docker Compose, CLI, PostgreSQL/Redis prerequisites, manage.py commands, environment variables, project structure. Use when starting a new Saleor project.

saleor-security

17
from OrcaQubits/agentic-commerce-skills-plugins

Secure Saleor applications — JWT authentication, OIDC integration, App tokens, permission model, rate limiting, CORS, and security headers. Use when configuring Saleor security.

saleor-promotions

17
from OrcaQubits/agentic-commerce-skills-plugins

Configure Saleor promotions — catalog promotions, order promotions, vouchers, manual discounts, gift cards, and discount stacking. Use when setting up pricing rules.

saleor-payments

17
from OrcaQubits/agentic-commerce-skills-plugins

Implement Saleor payment processing — transaction-based payment flow, payment Apps, sync webhook events, Stripe/Adyen patterns, and refunds. Use when building payment integrations.

saleor-orders

17
from OrcaQubits/agentic-commerce-skills-plugins

Manage the Saleor order lifecycle — order creation, fulfillments, returns, refunds, draft orders, and order events. Use when working with Saleor orders.

saleor-graphql

17
from OrcaQubits/agentic-commerce-skills-plugins

Work with the Saleor GraphQL API — queries, mutations, subscriptions, cursor pagination, filters, error handling, GraphQL Playground, and code generation. Use when building against the Saleor API.

saleor-deploy

17
from OrcaQubits/agentic-commerce-skills-plugins

Deploy Saleor to production — Docker setup, Saleor Cloud, environment variables, Celery workers, S3 media storage, database management, and scaling. Use when deploying Saleor applications.

saleor-dashboard

17
from OrcaQubits/agentic-commerce-skills-plugins

Extend the Saleor Dashboard — mounting points, App Bridge actions, MacawUI components, iframe extensions, and custom views. Use when building Dashboard extensions.