shopify-core-workflow-a
Manage Shopify products, variants, and collections using the GraphQL Admin API. Use when creating, updating, or querying products, managing inventory, or building product catalog integrations. Trigger with phrases like "shopify products", "create shopify product", "shopify variants", "shopify collections", "shopify inventory".
Best use case
shopify-core-workflow-a is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Manage Shopify products, variants, and collections using the GraphQL Admin API. Use when creating, updating, or querying products, managing inventory, or building product catalog integrations. Trigger with phrases like "shopify products", "create shopify product", "shopify variants", "shopify collections", "shopify inventory".
Teams using shopify-core-workflow-a 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
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/shopify-core-workflow-a/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How shopify-core-workflow-a Compares
| Feature / Agent | shopify-core-workflow-a | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Manage Shopify products, variants, and collections using the GraphQL Admin API. Use when creating, updating, or querying products, managing inventory, or building product catalog integrations. Trigger with phrases like "shopify products", "create shopify product", "shopify variants", "shopify collections", "shopify inventory".
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.
Related Guides
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
ChatGPT vs Claude for Agent Skills
Compare ChatGPT and Claude for AI agent skills across coding, writing, research, and reusable workflow execution.
Cursor vs Codex for AI Workflows
Compare Cursor and Codex for AI coding workflows, repository assistance, debugging, refactoring, and reusable developer skills.
SKILL.md Source
# Shopify 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 `shopify-install-auth` setup
- Access scopes: `read_products`, `write_products`, `read_inventory`, `write_inventory`
- API version 2024-10 or later (ProductInput was split in this version)
## Instructions
### Step 1: Create a Product
```typescript
// As of 2024-10, productCreate uses ProductCreateInput (not the old ProductInput)
const CREATE_PRODUCT = `
mutation productCreate($input: ProductCreateInput!) {
productCreate(product: $input) {
product {
id
title
handle
status
variants(first: 10) {
edges {
node {
id
title
price
sku
inventoryQuantity
}
}
}
}
userErrors {
field
message
code
}
}
}
`;
const response = await client.request(CREATE_PRODUCT, {
variables: {
input: {
title: "Premium Cotton T-Shirt",
descriptionHtml: "<p>Soft 100% organic cotton tee.</p>",
vendor: "My Brand",
productType: "Apparel",
tags: ["cotton", "organic", "summer"],
status: "DRAFT", // ACTIVE, DRAFT, or ARCHIVED
productOptions: [
{
name: "Size",
values: [{ name: "S" }, { name: "M" }, { name: "L" }, { name: "XL" }],
},
{
name: "Color",
values: [{ name: "Black" }, { name: "White" }, { name: "Navy" }],
},
],
},
},
});
// ALWAYS check userErrors — Shopify returns 200 even on validation failures
if (response.data.productCreate.userErrors.length > 0) {
console.error("Validation errors:", response.data.productCreate.userErrors);
// Example: [{ field: ["title"], message: "Title can't be blank", code: "BLANK" }]
}
```
### Step 2: Update a Product
```typescript
// 2024-10+: productUpdate uses ProductUpdateInput (separate from create)
const UPDATE_PRODUCT = `
mutation productUpdate($input: ProductUpdateInput!) {
productUpdate(product: $input) {
product {
id
title
status
updatedAt
}
userErrors {
field
message
}
}
}
`;
await client.request(UPDATE_PRODUCT, {
variables: {
input: {
id: "gid://shopify/Product/1234567890",
title: "Updated Product Title",
status: "ACTIVE",
metafields: [
{
namespace: "custom",
key: "care_instructions",
value: "Machine wash cold",
type: "single_line_text_field",
},
],
},
},
});
```
### Step 3: Query Products with Filtering
```typescript
// Search products with Shopify's query syntax
const SEARCH_PRODUCTS = `
query products($query: String!, $first: Int!, $after: String) {
products(first: $first, after: $after, query: $query) {
edges {
node {
id
title
handle
status
productType
vendor
totalInventory
priceRangeV2 {
minVariantPrice { amount currencyCode }
maxVariantPrice { amount currencyCode }
}
images(first: 1) {
edges {
node { url altText }
}
}
}
cursor
}
pageInfo {
hasNextPage
endCursor
}
}
}
`;
// Shopify query syntax examples:
// "status:active"
// "product_type:Apparel AND vendor:'My Brand'"
// "inventory_total:>0"
// "created_at:>2024-01-01"
// "tag:sale"
const data = await client.request(SEARCH_PRODUCTS, {
variables: {
query: "status:active AND product_type:Apparel",
first: 25,
},
});
```
### Step 4: Manage Variants and Pricing
```typescript
// Create variants in bulk
const BULK_CREATE_VARIANTS = `
mutation productVariantsBulkCreate(
$productId: ID!,
$variants: [ProductVariantsBulkInput!]!
) {
productVariantsBulkCreate(productId: $productId, variants: $variants) {
productVariants {
id
title
price
sku
barcode
inventoryQuantity
selectedOptions { name value }
}
userErrors {
field
message
code
}
}
}
`;
await client.request(BULK_CREATE_VARIANTS, {
variables: {
productId: "gid://shopify/Product/1234567890",
variants: [
{
price: "29.99",
sku: "TSH-BLK-S",
barcode: "1234567890123",
optionValues: [
{ optionName: "Color", name: "Black" },
{ optionName: "Size", name: "S" },
],
inventoryQuantities: [
{
availableQuantity: 100,
locationId: "gid://shopify/Location/1234",
},
],
},
],
},
});
```
### Step 5: Manage Collections
```typescript
// Create a smart (automated) collection
const CREATE_SMART_COLLECTION = `
mutation collectionCreate($input: CollectionInput!) {
collectionCreate(input: $input) {
collection {
id
title
handle
productsCount
ruleSet {
appliedDisjunctively
rules { column relation condition }
}
}
userErrors { field message }
}
}
`;
await client.request(CREATE_SMART_COLLECTION, {
variables: {
input: {
title: "Summer Sale",
descriptionHtml: "<p>All items on summer sale</p>",
ruleSet: {
appliedDisjunctively: false, // AND logic
rules: [
{ column: "TAG", relation: "EQUALS", condition: "sale" },
{ column: "PRODUCT_TYPE", relation: "EQUALS", condition: "Apparel" },
],
},
},
},
});
```
## 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 |
|-------|-------|----------|
| `userErrors: [{code: "TAKEN", field: ["handle"]}]` | Duplicate product handle | Use a unique handle or let Shopify auto-generate |
| `userErrors: [{code: "BLANK", field: ["title"]}]` | Empty required field | Provide non-empty title |
| `userErrors: [{code: "INVALID"}]` | Invalid metafield type | Check `type` matches Shopify's metafield types |
| `Access denied` on `productCreate` | Missing `write_products` scope | Request scope in app config |
| `Product not found` | Wrong GID format | Must be `gid://shopify/Product/{numeric_id}` |
## Examples
### ProductSet Mutation (Upsert)
```typescript
// 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",
},
},
});
```
## Resources
- [productCreate Mutation](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productCreate)
- [productSet Mutation (Upsert)](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productSet)
- [Product Object](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product)
- [2024-10 ProductInput Split](https://shopify.dev/docs/api/release-notes/2024-10)
## Next Steps
For order management workflow, see `shopify-core-workflow-b`.Related Skills
calendar-to-workflow
Converts calendar events and schedules into Claude Code workflows, meeting prep documents, and standup notes. Use when the user mentions calendar events, meeting prep, standup generation, or scheduling workflows. Trigger with phrases like "prep for my meetings", "generate standup notes", "create workflow from calendar", or "summarize today's schedule".
workhuman-core-workflow-b
Workhuman core workflow b for employee recognition and rewards API. Use when integrating Workhuman Social Recognition, or building recognition workflows with HRIS systems. Trigger: "workhuman core workflow b".
workhuman-core-workflow-a
Workhuman core workflow a for employee recognition and rewards API. Use when integrating Workhuman Social Recognition, or building recognition workflows with HRIS systems. Trigger: "workhuman core workflow a".
wispr-core-workflow-b
Wispr Flow core workflow b for voice-to-text API integration. Use when integrating Wispr Flow dictation, WebSocket streaming, or building voice-powered applications. Trigger: "wispr core workflow b".
wispr-core-workflow-a
Wispr Flow core workflow a for voice-to-text API integration. Use when integrating Wispr Flow dictation, WebSocket streaming, or building voice-powered applications. Trigger: "wispr core workflow a".
windsurf-core-workflow-b
Execute Windsurf's secondary workflow: Workflows, Memories, and reusable automation. Use when creating reusable Cascade workflows, managing persistent memories, or automating repetitive development tasks. Trigger with phrases like "windsurf workflow", "windsurf automation", "windsurf memories", "cascade workflow", "windsurf slash command".
windsurf-core-workflow-a
Execute Windsurf's primary workflow: Cascade Write mode for multi-file agentic coding. Use when building features, refactoring across files, or performing complex code tasks. Trigger with phrases like "windsurf cascade write", "windsurf agentic coding", "windsurf multi-file edit", "cascade write mode", "windsurf build feature".
webflow-core-workflow-b
Execute Webflow secondary workflows — Sites management, Pages API, Forms submissions, Ecommerce (products/orders/inventory), and Custom Code via the Data API v2. Use when managing sites, reading pages, handling form data, or working with Webflow Ecommerce products and orders. Trigger with phrases like "webflow sites", "webflow pages", "webflow forms", "webflow ecommerce", "webflow products", "webflow orders".
webflow-core-workflow-a
Execute the primary Webflow workflow — CMS content management: list collections, CRUD items, publish items, and manage content lifecycle via the Data API v2. Use when working with Webflow CMS collections and items, managing blog posts, team members, or any dynamic content. Trigger with phrases like "webflow CMS", "webflow collections", "webflow items", "create webflow content", "manage webflow CMS", "webflow content management".
veeva-core-workflow-b
Veeva Vault core workflow b for REST API and clinical operations. Use when working with Veeva Vault document management and CRM. Trigger: "veeva core workflow b".
veeva-core-workflow-a
Veeva Vault core workflow a for REST API and clinical operations. Use when working with Veeva Vault document management and CRM. Trigger: "veeva core workflow a".
vastai-core-workflow-b
Execute Vast.ai secondary workflow: multi-instance orchestration, spot recovery, and cost optimization. Use when running distributed training, handling spot preemption, or optimizing GPU spend across multiple instances. Trigger with phrases like "vastai distributed training", "vastai spot recovery", "vastai multi-gpu", "vastai cost optimization".