shopify-admin-variant-option-normalizer
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "shopify-admin-variant-option-normalizer" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-5b70d52dc0e0061cbadb795a7a740986d1202835aef31fd785c5735a7769cb6e. Verify the upstream source and version against https://github.com/40RTY-ai/shopify-admin-skills before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Detect inconsistent variant option naming (e.g., Sm, Small, S) and bulk normalize them to a standardized naming set.
Introduction source: third_party · 40RTY-ai · 0.0.1 Reference
SkillPi interpretation
- Tasks
- Detects inconsistent variant option naming (Sm vs Small vs S) and bulk-corrects to a standard set.
- Inputs and outputs
- CSV file `option_normalizer_<YYYY-MM-DD>.csv` with columns: `product_id`, `product_title`, `variant_id`, `sku`, `option_name`, `old_value`, `new_value`
- Software, accounts and paid services
- Authenticated Shopify CLI session: `shopify store auth --store <domain> --scopes read_products,write_products` API scopes: `read_products`, `write_products`
- Testing
- Not tested
Browse files
Frontmatter
name: shopify-admin-variant-option-normalizer
role: merchandising
description: "Detects inconsistent variant option naming (Sm vs Small vs S) and bulk-corrects to a standard set."
toolkit: shopify-admin, shopify-admin-execution
api_version: "2025-01"
graphql_operations:
- products:query
- productVariantsBulkUpdate:mutation
status: stable
compatibility: Claude Code, Cursor, Codex, Gemini CLIPurpose
Scans product variants for inconsistent option values (e.g., "Sm", "Small", "small", "S" all meaning the same size) and bulk-updates them to a canonical set you define. Inconsistent option naming breaks size filters, causes customer confusion, and prevents search apps from grouping variants correctly.
Prerequisites
- Authenticated Shopify CLI session:
shopify store auth --store <domain> --scopes read_products,write_products - API scopes:
read_products,write_products
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| store | string | yes | — | Store domain (e.g., mystore.myshopify.com) |
| option_name | string | yes | — | Option to normalize (e.g., Size, Color) |
| mapping | object | yes | — | Map of non-standard → canonical values (e.g., {"Sm": "S", "small": "S", "Sml": "S"}) |
| filter | string | no | — | Optional product filter (e.g., tag:apparel) |
| dry_run | bool | no | true | Preview changes without executing mutations |
| format | string | no | human | Output format: human or json |
Safety
⚠️
productVariantsBulkUpdatemodifies variant option values. Option value changes affect how the variant appears to customers in the storefront and may break existing cart links or saved wishlists. Run withdry_run: trueto review all affected variants before committing.
Workflow Steps
-
OPERATION:
products— query Inputs:query: <filter>(or all products if no filter),first: 250, selectoptions,variants { selectedOptions }, pagination cursor Expected output: Products with variant option values; paginate untilhasNextPage: false -
Match variant option values against
mappingkeys — collect variants needing update -
OPERATION:
productVariantsBulkUpdate— mutation Inputs:productId, array ofvariants { id, options: [<normalized_value>] }for affected variants Expected output:productVariants { id, selectedOptions },userErrors
GraphQL Operations
# products:query — validated against api_version 2025-01
query ProductVariantOptions($query: String!, $after: String) {
products(first: 250, after: $after, query: $query) {
edges {
node {
id
title
options {
id
name
values
}
variants(first: 100) {
edges {
node {
id
title
sku
selectedOptions {
name
value
}
}
}
}
}
}
pageInfo {
hasNextPage
endCursor
}
}
}
# productVariantsBulkUpdate:mutation — validated against api_version 2025-01
mutation ProductVariantsBulkUpdate($productId: ID!, $variants: [ProductVariantsBulkInput!]!) {
productVariantsBulkUpdate(productId: $productId, variants: $variants) {
productVariants {
id
title
selectedOptions {
name
value
}
}
userErrors {
field
message
}
}
}
Session Tracking
Claude MUST emit the following output at each stage. This is mandatory.
On start, emit:
╔══════════════════════════════════════════════╗
║ SKILL: Variant Option Normalizer ║
║ Store: <store domain> ║
║ Started: <YYYY-MM-DD HH:MM UTC> ║
╚══════════════════════════════════════════════╝
After each step, emit:
[N/TOTAL] <QUERY|MUTATION> <OperationName>
→ Params: <brief summary of key inputs>
→ Result: <count or outcome>
If dry_run: true, prefix every mutation step with [DRY RUN] and do not execute it.
On completion, emit:
For format: human (default):
══════════════════════════════════════════════
OUTCOME SUMMARY
Products scanned: <n>
Variants needing fix: <n>
Variants updated: <n>
Errors: <n>
Output: option_normalizer_<date>.csv
══════════════════════════════════════════════
For format: json, emit:
{
"skill": "variant-option-normalizer",
"store": "<domain>",
"started_at": "<ISO8601>",
"completed_at": "<ISO8601>",
"dry_run": true,
"option_name": "Size",
"outcome": {
"products_scanned": 0,
"variants_needing_fix": 0,
"variants_updated": 0,
"errors": 0,
"output_file": "option_normalizer_<date>.csv"
}
}
Output Format
CSV file option_normalizer_<YYYY-MM-DD>.csv with columns:
product_id, product_title, variant_id, sku, option_name, old_value, new_value
Error Handling
| Error | Cause | Recovery |
|---|---|---|
THROTTLED |
API rate limit exceeded | Wait 2 seconds, retry up to 3 times |
userErrors on bulk update |
Option value conflict within product | Log error, skip product, continue |
| No matching variants | Mapping keys not found in catalog | Exit with 0 matches, review mapping |
Best Practices
- Build the
mappingby first running withdry_run: trueand reviewing the detected option values — you may discover more variants than expected. - Normalize one
option_nameat a time (Size, then Color separately) to keep the mapping manageable and reduce error risk. - After normalizing, verify that automated collection rules based on option values still match the intended products.
Version history
-
v1.1.0
GitHub ↗
Original release notes
## 🤖 New category: Agentic Commerce Readiness The fix-it side of the [**agentiq.report**](https://agentiq.report) audit. The audit tells operators *where* AI shopping agents (ChatGPT, Gemini, Perplexity, agentic checkout) can't find, read, or recommend their store. This release adds **10 skills that remediate those findings** via the native Shopify Admin GraphQL toolkit — closing the loop: **audit finds the gap → run the matching skill → re-audit confirms.** Every skill declares the audit **signals** it fixes (`audit_signals` frontmatter), so a finding in the report maps directly to the skill that resolves it. ### Skills - **`agentic-readiness-audit`** — flagship, read-only store-side scorecard that routes each gap to its fix skill - **`agentic-product-jsonld-backfill`** — barcode/GTIN, vendor, product type for complete Product JSON-LD - **`agentic-image-alt-text`** — descriptive alt text on product media - **`agentic-description-enrichment`** — fact-rich descriptions for AI quoting - **`agentic-metafields-setup`** — define + populate agentic metafields for filtering - **`agentic-product-taxonomy`** — Shopify Standard Product Taxonomy categories - **`agentic-crawler-access`** — allow GPTBot/ClaudeBot/PerplexityBot… in `robots.txt.liquid` - **`agentic-llms-txt`** — publish a curated `/llms.txt` for AI assistants - **`agentic-organization-schema`** — Organization JSON-LD (sameAs, contactPoint) into the theme - **`agentic-policy-readability`** — machine-readable shipping/returns policies Plus a weekly **`agentic-readiness-monitor`** routine that re-audits and alerts on regressions. ### Stats **116 skills across 11 categories** (was 106/10), **21 routines** (was 20). All GraphQL validated against the live Admin 2025-01 schema; `pnpm validate:index` passes (116 skills, 64 operations). ### Notes Theme-editing and policy skills default to `dry_run`/`audit` mode, write inside managed `# BEGIN/END` blocks, and recommend duplicating the theme first.
Current listing version
0.0.1
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 解决电商运营中变体选项命名不一致的高频痛点
- 显著提升商品筛选准确性与客户体验
Highlights
- 触发描述清晰完整,边界明确
- 支持多种变体命名场景的精准识别
Areas to improve
-
缺少独立 When to Use 章节 Reported severity: Minor
文档结构优秀但未设置独立 When to Use 章节
Recommendation: 建议在 Purpose 后增加 When to Use 小节以增强可读性
Highlights
- Workflow Steps 清晰分阶段
- 包含完整的 Session Tracking 输出规范
- 提供详细的错误处理与最佳实践
Highlights
- GraphQL 操作已验证 API 版本兼容性
- dry_run 机制有效防止误操作
- 完善的错误处理与重试策略
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Authenticated Shopify CLI session: `shopify store auth --store <domain> --scopes read_products,write_products` API scopes: `read_products`, `write_products`
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.