shopify-admin-agentic-…
Edit the theme's robots.txt.liquid to explicitly allow AI crawlers (GPTBot, ClaudeBot,…
Read-only: detects vendor field typos, casing variants, and trailing-whitespace duplicates across the catalog and proposes a canonical merge per cluster.
$ npx -y skills add 40rty-ai/shopify-admin-skills --skill shopify-admin-vendor-consolidation --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/shopify-admin-vendor-consolidationContext preview
The summary Claude sees to decide when to auto-load this skill.
Read-only: detects vendor field typos, casing variants, and trailing-whitespace duplicates across the catalog and proposes a canonical merge per cluster.
name: shopify-admin-vendor-consolidation role: merchandising description: "Read-only: detects vendor field typos, casing variants, and trailing-whitespace duplicates across the catalog and proposes a canonical merge per cluster." toolkit: shopify-admin, shopify-admin-execution api_version: "2025-01" graphql_operations: - products:query status: stable compatibility: Claude Code, Cursor, Codex, Gemini CLI
Walks every product in the catalog, normalizes the `vendor` field, and clusters near-duplicates such as `Acme`, `ACME`, `Acme Inc`, and `Acme ` (trailing whitespace). Surfaces a recommended canonical form per cluster and the count of products that would migrate. Vendor sprawl breaks vendor-based reports, navigation, and supplier reconciliation. Read-only — no mutations; output is the worklist for a follow-up consolidation.
| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | store | string | yes | — | Store domain (e.g., mystore.myshopify.com) | | similarity_threshold | float | no | 0.88 | Levenshtein-ratio threshold for clustering (0.0–1.0) | | min_cluster_size | integer | no | 2 | Only emit clusters with at least this many distinct vendor strings | | ignore_suffixes | string | no | "Inc,LLC,Ltd,Co,Corp" | Comma-separated company suffixes stripped before comparison | | status_filter | string | no | ALL | Product status to include: `ACTIVE`, `DRAFT`, `ARCHIVED`, or `ALL` | | format | string | no | human | Output format: `human` or `json` |
> ℹ️ Read-only skill — no mutations are executed. Safe to run at any time. The skill produces a recommendation worklist; consolidation must be applied through a separate, reviewed workflow.
1. **OPERATION:** `products` — query **Inputs:** `first: 250`, `query: <built from status_filter>`, select `vendor`, `id`, `title`, `status`, pagination cursor **Expected output:** Every product with its vendor string; paginate until `hasNextPage: false`
2. Build a frequency map of distinct vendor strings → product count. Normalize each vendor with: trim whitespace, collapse multiple spaces, strip configured suffixes, lowercase for comparison.
3. Cluster vendor strings whose normalized form has a Levenshtein ratio above `similarity_threshold`. Pick canonical per cluster as the most-used variant; tie-break on shortest, then alphabetical.
4. Filter clusters with fewer than `min_cluster_size` distinct strings. Compute migration impact: number of products that would move to the canonical form.
5. Sort clusters by migration impact descending so the highest-leverage merges surface first.
# products:query — validated against api_version 2025-01
query AllVendors($query: String, $after: String) {
products(first: 250, after: $after, query: $query) {
edges {
node {
id
title
vendor
status
productType
updatedAt
}
}
pageInfo {
hasNextPage
endCursor
}
}
}**Claude MUST emit the following output at each stage. This is mandatory.**
**On start**, emit:
╔══════════════════════════════════════════════╗ ║ SKILL: Vendor Consolidation ║ ║ 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>**On completion**, emit:
For `format: human` (default):
══════════════════════════════════════════════
VENDOR CONSOLIDATION REPORT
Products scanned: <n>
Distinct vendors: <n>
Clusters detected: <n>
Products to migrate: <n>
Top clusters by impact:
Canonical: "<name>" Variants: <n> Products: <n>
"<variant 1>" (<count>)
"<variant 2>" (<count>)
Output: vendor_consolidation_<date>.csv
══════════════════════════════════════════════For `format: json`, emit:
{
"skill": "vendor-consolidation",
"store": "<domain>",
"products_scanned": 0,
"distinct_vendors": 0,
"clusters": [
{
"canonical": "Acme",
"variants": [
{ "value": "Acme", "products": 0 },
{ "value": "ACME", "products": 0 },
{ "value": "Acme Inc", "products": 0 }
],
"products_to_migrate": 0
}
],
"output_file": "vendor_consolidation_<date>.csv"
}CSV file `vendor_consolidation_<YYYY-MM-DD>.csv` with columns: `cluster_id`, `canonical_vendor`, `variant_vendor`, `is_canonical`, `product_count`, `sample_product_id`, `sample_product_title`, `status`
| Error | Cause | Recovery | |-------|-------|----------| | `THROTTLED` | API rate limit exceeded | Wait 2 seconds, retry up to 3 times | | Empty `vendor` field on product | Vendor never set | Bucket as cluster `(unset)`, surface count separately | | Two valid distinct vendors collide on similarity | False positive (e.g., `Apple` vs `Appel`) | Lower `similarity_threshold` is unsafe; review cluster manually before applying | | Unicode-different but visually identical vendors | Smart-quote or non-breaking space | Normalization step strips these before comparison |
Community-maintained AI agent skills for operating Shopify stores — workflows, optimization, reports and more
Edit the theme's robots.txt.liquid to explicitly allow AI crawlers (GPTBot, ClaudeBot,…
Rewrite thin product descriptions into structured, fact-rich copy (materials, fit, use-cases,…
Generate and set descriptive alt text on product images so AI agents (which can't 'see'…
Generate and publish an /llms.txt guide (brand summary, flagship products, key policies,…
Define and populate agentic-commerce metafields (material, attributes, key features, specs,…
Inject an Organization JSON-LD block (name, logo, sameAs social links, contactPoint) into the…