$npx -y skills add 40RTY-ai/shopify-admin-skills --skill shopify-admin-agentic-description-enrichmentRewrite thin product descriptions into structured, fact-rich copy (materials, fit, use-cases, the words shoppers actually type) so AI agents have something concrete to quote and match.
| 1 | ## Purpose |
| 2 | When an AI agent decides whether to recommend a product, it quotes the description to justify the match. One-line or empty descriptions give it nothing — so it can't confirm the product fits the shopper's intent and moves on. This skill finds products with thin descriptions (below a character threshold or missing key attributes) and rewrites them into structured copy: a benefit-led opening line, then concrete facts (material, fit/sizing, dimensions, use-cases, care) drawn from the product's own metafields/options/type. Fixes `listing-description-quality` and strengthens `agentic-listing-schema`. |
| 3 | |
| 4 | ## Prerequisites |
| 5 | - Authenticated Shopify CLI session (`shopify auth login --store <domain>`) |
| 6 | - Required API scopes: `read_products`, `write_products` |
| 7 | |
| 8 | ## Parameters |
| 9 | All skills accept these universal parameters: |
| 10 | |
| 11 | | Parameter | Type | Required | Default | Description | |
| 12 | |-----------|--------|----------|---------|-------------| |
| 13 | | store | string | yes | — | Store domain (e.g., mystore.myshopify.com) | |
| 14 | | format | string | no | human | Output format: `human` (default) or `json` | |
| 15 | | dry_run | bool | no | false | Preview mutations without executing | |
| 16 | |
| 17 | Skill-specific parameters: |
| 18 | |
| 19 | | Parameter | Type | Required | Default | Description | |
| 20 | |-----------|------|----------|---------|-------------| |
| 21 | | collection_id | string | no | — | Limit to a collection GID | |
| 22 | | tag | string | no | — | Limit to a product tag | |
| 23 | | min_chars | int | no | 120 | Products with a plain-text description shorter than this are rewritten | |
| 24 | | overwrite | bool | no | false | If false, only enrich products below `min_chars`; if true, restructure all targeted products | |
| 25 | | brand_voice | string | no | — | Optional voice guidance (e.g., "plain, technical, no hype") | |
| 26 | |
| 27 | ## Safety |
| 28 | |
| 29 | > ⚠️ Step 3 (`productUpdate`) replaces `descriptionHtml` on live products. This is content the merchant may have hand-written. Always run `dry_run: true`, export the before/after, and have a human approve the rewrites before committing. Default only touches products under `min_chars`. |
| 30 | |
| 31 | ## Workflow Steps |
| 32 | |
| 33 | 1. **OPERATION:** `products` — query |
| 34 | **Inputs:** `first: 100`, optional filter; fields `descriptionHtml`, `title`, `productType`, `options`, `tags`, `metafields(first: 30)`; paginate. |
| 35 | **Expected output:** Products whose stripped-text description is below `min_chars`, plus the structured facts available to enrich from. |
| 36 | |
| 37 | 2. **COMPUTE (no API):** for each thin product, draft `descriptionHtml`: a one-line benefit hook + a short facts list built ONLY from real product data (no invented specs), honoring `brand_voice`. Emit a before/after preview. |
| 38 | |
| 39 | 3. **OPERATION:** `productUpdate` — mutation |
| 40 | **Inputs:** `{ id, descriptionHtml }` per approved product. |
| 41 | **Expected output:** Updated product; collect `userErrors`. |
| 42 | |
| 43 | ## GraphQL Operations |
| 44 | |
| 45 | ```graphql |
| 46 | # products:query — validated against api_version 2025-01 |
| 47 | query EnrichProducts($first: Int!, $after: String, $query: String) { |
| 48 | products(first: $first, after: $after, query: $query) { |
| 49 | edges { |
| 50 | node { |
| 51 | id |
| 52 | title |
| 53 | descriptionHtml |
| 54 | productType |
| 55 | tags |
| 56 | options { name values } |
| 57 | metafields(first: 30) { edges { node { namespace key value type } } } |
| 58 | } |
| 59 | } |
| 60 | pageInfo { hasNextPage endCursor } |
| 61 | } |
| 62 | } |
| 63 | ``` |
| 64 | |
| 65 | ```graphql |
| 66 | # productUpdate:mutation — validated against api_version 2025-01 |
| 67 | mutation EnrichProductDescription($input: ProductInput!) { |
| 68 | productUpdate(input: $input) { |
| 69 | product { id descriptionHtml } |
| 70 | userErrors { field message } |
| 71 | } |
| 72 | } |
| 73 | ``` |
| 74 | |
| 75 | ## Session Tracking |
| 76 | |
| 77 | **Claude MUST emit the following output at each stage. This is mandatory.** |
| 78 | |
| 79 | **On start**, emit: |
| 80 | ``` |
| 81 | ╔══════════════════════════════════════════════╗ |
| 82 | ║ SKILL: <skill name> ║ |
| 83 | ║ Store: <store domain> ║ |
| 84 | ║ Started: <YYYY-MM-DD HH:MM UTC> ║ |
| 85 | ╚══════════════════════════════════════════════╝ |
| 86 | ``` |
| 87 | |
| 88 | **After each step**, emit: |
| 89 | ``` |
| 90 | [N/TOTAL] <QUERY|MUTATION> <OperationName> |
| 91 | → Params: <brief summary of key inputs> |
| 92 | → Result: <count or outcome> |
| 93 | ``` |
| 94 | |
| 95 | If `dry_run: true`, prefix every mutation step with `[DRY RUN]` and do not execute it. |
| 96 | |
| 97 | **On completion**, emit: |
| 98 | |
| 99 | For `format: human` (default): |
| 100 | ``` |
| 101 | ══════════════════════════════════════════════ |
| 102 | OUTCOME SUMMARY |
| 103 | <Metric label>: <value> |
| 104 | Errors: 0 |
| 105 | Output: <filename or "none"> |
| 106 | ════════════════════════ |