Claude-code-plugins-plus shopify-core-workflow-a
git clone https://github.com/jeremylongshore/claude-code-plugins-plus-skills
T=$(mktemp -d) && git clone --depth=1 https://github.com/jeremylongshore/claude-code-plugins-plus-skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/plugins/saas-packs/shopify-pack/skills/shopify-core-workflow-a" ~/.claude/skills/jeremylongshore-claude-code-plugins-plus-shopify-core-workflow-a && rm -rf "$T"
plugins/saas-packs/shopify-pack/skills/shopify-core-workflow-a/SKILL.mdShopify Products & Catalog Management
Overview
Primary workflow for Shopify: manage products, variants, collections, and inventory using the GraphQL Admin API. Covers CRUD operations with real API mutations and response shapes.
Prerequisites
- Completed
setupshopify-install-auth - Access scopes:
,read_products
,write_products
,read_inventorywrite_inventory - API version 2024-10 or later (ProductInput was split in this version)
Instructions
Step 1: Create a Product
Use
productCreate with ProductCreateInput (as of 2024-10, this replaced the old unified ProductInput). Always check userErrors -- Shopify returns 200 even on validation failures.
See Product Create Mutation for the complete mutation, variables, and error handling.
Step 2: Update a Product
Use
productUpdate with ProductUpdateInput (separate from create as of 2024-10). Supports metafield updates inline.
See Product Update Mutation for the complete mutation and variables.
Step 3: Query Products with Filtering
Search products using Shopify's query syntax (
status:active, product_type:Apparel AND vendor:'My Brand', tag:sale, etc.) with cursor-based pagination.
See Search Products Query for the complete query with pagination and query syntax examples.
Step 4: Manage Variants and Pricing
Create variants in bulk with
productVariantsBulkCreate, including pricing, SKU, barcode, option values, and inventory quantities per location.
See Bulk Create Variants for the complete mutation and variables.
Step 5: Manage Collections
Create smart (automated) collections with rule-based product matching using tag, product type, and other column filters.
See Smart Collection Create for the complete mutation and variables.
Output
- Product created with variants and options
- Products queryable with search filters
- Variant pricing and inventory configured
- Smart collections auto-organizing products
Error Handling
| Error | Cause | Solution |
|---|---|---|
| Duplicate product handle | Use a unique handle or let Shopify auto-generate |
| Empty required field | Provide non-empty title |
| Invalid metafield type | Check matches Shopify's metafield types |
on | Missing scope | Request scope in app config |
| Wrong GID format | Must be (numeric ID) |
Examples
ProductSet Mutation (Upsert)
// productSet creates OR updates — idempotent by handle const PRODUCT_SET = ` mutation productSet($input: ProductSetInput!) { productSet(input: $input) { product { id title } userErrors { field message code } } } `; await client.request(PRODUCT_SET, { variables: { input: { title: "Organic Coffee Beans", handle: "organic-coffee-beans", // unique identifier productType: "Coffee", vendor: "Bean Co", }, }, });