dist/cursor/medusa-commerce/skills/medusa-catalog/SKILL.md
Manage the Medusa v2 catalog — products, variants, options, collections, categories, tags, and product metadata. Use when working with Medusa product data.
npx skillsauth add orcaqubits/agentic-commerce-claude-plugins medusa-catalogInstall 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.
Fetch live docs:
site:docs.medusajs.com product module for product data model and service methodssite:docs.medusajs.com product variant option for variant/option relationshipssite:docs.medusajs.com collection category for collection and category APIshttps://docs.medusajs.com/resources/references/product and review the IProductModuleService interfacemedusajs v2 product workflow 2026 for latest product-related workflow stepssite:docs.medusajs.com admin product api route for Admin API product endpoints| Entity | Relationship | Key Fields | |--------|-------------|------------| | Product | Root | title, subtitle, description, handle, status | | Options | Product → many | Size, Color, Material (with OptionValues) | | Variants | Product → many | sku, barcode, ean, upc, hs_code | | Prices | Variant → many (link) | Via Pricing Module link | | Inventory | Variant → one (link) | Via Inventory Module link | | Images | Product → many | url, rank | | Tags | Product ↔ many | many-to-many labels | | Categories | Product ↔ many | Nested tree (parent_category_id) | | Collections | Product ↔ many | Curated groupings | | Metadata | On all entities | JSONB key-value store |
| Status | Meaning |
|--------|---------|
| draft | Not visible to customers |
| proposed | Submitted for review |
| published | Visible on storefront |
| rejected | Review rejected |
Medusa v2 uses a modular architecture where the Product Module is decoupled from pricing, inventory, and other concerns through Module Links.
Product Module ──link──> Pricing Module
Product Module ──link──> Inventory Module
Product Module ──link──> Sales Channel Module
Fetch live docs for exact link definitions and how to query across linked modules using
remoteQuery.
| Entity | Cardinality | Description | |--------|-------------|-------------| | Product -> Option | one-to-many | Each product defines its own options | | Option -> OptionValue | one-to-many | Each option has enumerated values | | Variant -> OptionValue | many-to-many | Each variant selects one value per option | | Variant -> Price | one-to-many | Via Pricing Module link | | Variant -> InventoryItem | one-to-one | Via Inventory Module link |
| Operation | Method | Notes |
|-----------|--------|-------|
| Create product | productModuleService.createProducts() | Accepts variants, options inline |
| Update product | productModuleService.updateProducts() | Partial updates supported |
| Delete product | productModuleService.deleteProducts() | Cascades to variants |
| List products | productModuleService.listProducts() | Supports filters, pagination |
| Retrieve product | productModuleService.retrieveProduct() | By ID with relations |
| Create variants | productModuleService.createProductVariants() | Link option values |
| Update variants | productModuleService.updateProductVariants() | Partial update |
Fetch live docs for the exact method signatures and filter/select/relations options available on each service method.
// Skeleton: create product with variants
// Fetch live docs for createProductsWorkflow input shape
import { createProductsWorkflow } from "@medusajs/medusa/core-flows"
const { result } = await createProductsWorkflow(container)
.run({ input: { products: [/* ... */] } })
// Fetch live docs for CreateProductsWorkflowInput
Logical groupings of products:
title, handle, and optional metadataproductModuleService.createProductCollections()Hierarchical classification with nesting:
| Field | Description |
|-------|-------------|
| name | Display name |
| handle | URL-friendly slug |
| parent_category_id | Reference to parent (null for root) |
| rank | Sort order among siblings |
| is_active | Visibility flag |
| is_internal | Hidden from storefront |
Categories form a tree structure — unlimited depth. Use category_children relation to traverse.
Fetch live docs for category service methods and nested tree query patterns.
Simple labels for filtering and organization:
value fieldlistProductTags()JSONB key-value store on every product entity:
Product, ProductVariant, ProductOption, and ProductCollectionmetadata: { key: value }| Route Pattern | Method | Purpose |
|---------------|--------|---------|
| /admin/products | GET | List products with filters |
| /admin/products | POST | Create product |
| /admin/products/:id | GET | Retrieve single product |
| /admin/products/:id | POST | Update product |
| /admin/products/:id | DELETE | Delete product |
| /admin/collections | GET/POST | Manage collections |
| /admin/categories | GET/POST | Manage categories |
Fetch live docs for query parameters, request body shapes, and pagination patterns on each route.
| Route Pattern | Method | Purpose |
|---------------|--------|---------|
| /store/products | GET | List published products |
| /store/products/:id | GET | Retrieve single product |
| /store/collections | GET | List collections |
| /store/categories | GET | List active categories |
Store routes respect sales channel and publishable API key scoping.
metadata rather than creating custom modules for simple dataselect and relations parameters to fetch only needed fieldsremoteQuery for cross-module queries (product + pricing + inventory)limit and offsetcreateProductsWorkflow and updateProductsWorkflow for transactional operationsremoteQueryFetch the Medusa v2 product module documentation and workflow references for exact service method signatures, workflow inputs, and remote query patterns before implementing.
development
Build with Spree's headless Next.js storefront — the official `spree/storefront` repo (Next.js 16 App Router with Server Actions and Turbopack, React 19 Server Components, Tailwind CSS 4, TypeScript 5, `@spree/sdk`, Sentry), server-only auth (httpOnly JWT cookies + publishable key), MeiliSearch faceted catalog, one-page checkout with Apple/Google Pay/Klarna/Affirm/SEPA, multi-region market routing, GA4 + JSON-LD SEO, and Vercel/Docker deployment. Use when forking or customizing the storefront, or evaluating headless adoption.
tools
Build Spree extensions as Rails engines — gem scaffolding, `bin/rails g spree:extension`, mounting routes/migrations/assets, the modern `prepend` decorator pattern (`*_decorator.rb` with `self.prepended(base)`), generators (`spree:model_decorator`, `spree:controller_decorator`), the four customization surfaces in preference order (Events > Webhooks > Dependencies > Decorators), Spree::Dependencies for swapping service objects, gem release/versioning, and the deprecated Deface engine. Use when building a reusable Spree extension or adding non-trivial customization to an app.
development
Build with Spree's event bus and Webhooks 2.0 — `Spree::Events` publication, `Spree::Subscriber` DSL with `subscribes_to` and `on`, wildcard matching, lifecycle events (`{model}.created/.updated/.deleted` via `publishes_lifecycle_events`), the canonical event catalog (order.*, payment.*, shipment.*, product.*), Webhooks 2.0 endpoints, HMAC-SHA256 signing (`X-Spree-Webhook-Signature`), exponential-backoff retries, and Sidekiq job orchestration. Use when wiring event-driven business logic, building webhook consumers, or replacing ActiveSupport callback chains.
tools
Cross-cutting Spree development patterns — the customization preference hierarchy (Events > Webhooks > Dependencies > Decorators), `Spree::Dependencies` service-object swapping, the `_decorator.rb` + `prepend` + `self.prepended` idiom, idempotent subscribers and webhook receivers, multi-store scoping discipline, prefixed IDs, calculator polymorphism (shipping/promotion/tax share the base), service-object composition with `dry-monads` or simple results, why to avoid `class_eval` reopening and Deface, and Spree-on-Rails idioms (Hotwire/Turbo Stimulus, ActiveStorage, Action Cable, Sidekiq). Use when designing the architecture of a Spree extension or solving cross-cutting concerns.