Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Shopify & Google Merchant Feed Preflight Gate

    1

    Product-feed preflight gate for Shopify and Google Merchant Center: validates GS1 GTIN check digits, sale-price inversions, title length and promo text, required attributes, duplicate IDs and https links. Offline Python stdlib, exit-1 gate.

    $15

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Shopify & Google Merchant Feed Preflight Gate

    Example session with this skill installed

    Run a preflight check on my products.csv using the default config and save a JSON report to audit_log.json.

    • Read your context and instructions
    • Compiled the shopify & google
    • Generated the data export

    The preflight gate has completed the scan of products.csv. The validation failed due to 3 critical policy violations. A machine-readable audit log has been saved to audit_log.json.

    Merchant Feed Preflight Report

    SKU IDRule CodeFieldIssue
    SHOE-001GTIN_INVALIDgtinFailed GS1 mod-10 check (Expected 4, Got 5)
    SHIRT-04PRICE_INVERSIONsale_price25.00 USD is not less than 20.00 USD
    HAT-99TITLE_PROMO_TEXTtitleContains restricted phrase: FREE SHIPPING
    GLOVE-2BAD_LINKimage_linkURL must use https:// protocol

    Scan Summary:

    • Status: [BLOCKED]
    • Exit Code: 1
    • Rows Scanned: 142
    • Total Violations: 4
    {
      "status": "BLOCKED",
      "exit_code": 1,
      "rows_scanned": 142,
      "violations": [
        {
          "id": "SHOE-001",
          "rule": "GTIN_INVALID",
          "message": "Invalid GS1 mod-10 check digit"
        },
        {
          "id": "SHIRT-04",
          "rule": "PRICE_INVERSION",
          "message": "sale_price >= price"
        }
      ]
    }
    

    Next steps

    1. Correct the GTIN check digit for SKU SHOE-001 in the Shopify admin.
    2. Adjust the sale_price for SHIRT-04 to be strictly less than the base price.
    3. Remove promotional text from the title of SKU HAT-99 to comply with GMC policy.

    products.csv

    CSV · data export

    Generated

    Example file from a real run - the skill writes it into your workspace.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Above-the-Fold Hook (3-Second Value)

    Stop letting a single mistyped GTIN check digit, inverted sale price, or promotional title trigger Google Merchant Center disapprovals—validate your entire Shopify product feed offline in under a second before upload.

    Shopify & Google Merchant Feed Preflight Gate delivers a deterministic 3-layer feed QA guardrail (SKILL.md pre-upload SOP + JSON Schema Draft 2020-12 contracts + zero-dependency Python 3 stdlib decimal.Decimal validator) that verifies GS1 mod-10 check digits across GTIN-8/12/13/14, catches sale_price >= price inversions without floating-point drift, flags promotional text and excessive ALL-CAPS in product titles, detects missing required attributes and duplicate SKU IDs, enforces https:// landing and image links, and exits 1 ([BLOCKED]) on any policy violation.


    What's Inside (3-Layer Architecture + 60-Second Test Pack)

    • Layer 1 — Pre-Upload Feed QA SOP (SKILL.md): Step-by-step operational playbook for Claude Code, Cursor, and Codex CLI covering Policy Config Lock -> CSV Header Verification -> Deterministic Offline Gate Run -> Source Catalog Remediation -> Clean [PASS] Release Gate, plus full GS1 GTIN mod-10 math and GMC policy rule definitions.
    • Layer 2 — JSON Schema Draft 2020-12 Contracts (schemas/):
      • schemas/feed_config.schema.json: Typed configuration contract covering currency, title_max (default 150), required_attributes, allowed_availability, allowed_conditions, promo_patterns, and max_caps_ratio.
      • schemas/feed_report.schema.json: Machine-readable preflight audit report contract capturing status, exit_code, rows_scanned, counts_by_rule, and structured row-level violations with remediation guidance.
    • Layer 3 — Zero-Dependency Preflight Engine (scripts/merchant_feed_gate.py): 100% Python 3 standard library (argparse, csv, decimal, json, pathlib, re, sys, typing, urllib.parse) that:
      • Computes exact GS1 mod-10 check digits for GTIN-8, GTIN-12 (UPC), GTIN-13 (EAN), and GTIN-14 (GTIN_INVALID), rejecting non-digits and unsupported lengths.
      • Enforces GMC title length caps (TITLE_TOO_LONG) and detects disallowed promotional phrases (FREE SHIPPING, BEST SELLER, % OFF, BUY NOW, LIMITED TIME, SALE!, CHEAPEST, DISCOUNT) as well as excessive ALL-CAPS word ratios (TITLE_PROMO_TEXT).
      • Parses <amount> <CURRENCY> strings strictly via decimal.Decimal (never float), validates currency alignment, and blocks sale_price >= price (PRICE_INVERSION).
      • Enforces required_attributes completeness (MISSING_REQUIRED), flags duplicate SKU IDs (DUPLICATE_ID), and validates non-empty link and image_link URLs for valid https:// scheme and domain netloc (BAD_LINK) without double-flagging empty fields.
      • Emits pure-ASCII terminal output (Windows cp1252-safe), supports --json and --out-report <path>, and exits 0 on [PASS] or 1 on [BLOCKED].
    • 60-Second Test Pack (examples/):
      • examples/feed_config.json: Ready-to-run USD Google Merchant Center policy config (title_max: 150, 9 required attributes, allowed availability/condition enums, promo patterns, and max_caps_ratio: 0.35).
      • examples/feed_fail.csv: 6-SKU broken feed planting 1 bad GS1 GTIN check digit (SKU-1002), 1 price inversion (SKU-1003: 64.00 USD sale vs 59.00 USD regular), 1 oversized promotional title (SKU-1004: 157 chars with BEST SELLER and FREE SHIPPING), 1 missing image_link (SKU-1005), and 1 duplicate id (SKU-1001).
      • examples/feed_pass.csv: Clean 5-SKU catalog with mathematically verified GS1 GTIN-12/13 barcodes, valid https:// links, valid Decimal prices and sale prices, clean titles <= 150 chars, 0 violations, and exit 0.

    Who This Is For & Prerequisites

    Built for:

    • Shopify merchants, e-commerce operations managers, and performance marketing agencies who want to catch Google Merchant Center feed errors offline before uploading CSV catalogs or pushing automated channel feeds.
    • AI coding agent users (Claude Code, Cursor, Codex CLI) who want a deterministic, stdlib-only feed QA gate instead of error-prone LLM barcode math or spreadsheet eyeballing.

    Prerequisites:

    • Python 3.9+ (uses Python 3 standard library only — zero pip install, zero external packages, zero API calls).
    • Works cross-platform on Windows (pure ASCII cp1252-safe output), macOS, and Linux.

    60-Second Quick-Start

    Run directly from the skill folder:

    # 1. Run FAIL fixture (catches bad GTIN, price inversion, oversized promo title, missing image_link, duplicate ID)
    python scripts/merchant_feed_gate.py \
      --feed examples/feed_fail.csv \
      --config examples/feed_config.json
    
    # 2. Run PASS fixture (verifies 5 clean SKUs with valid GS1 GTINs, links, titles, and prices)
    python scripts/merchant_feed_gate.py \
      --feed examples/feed_pass.csv \
      --config examples/feed_config.json
    
    # 3. Emit machine-readable JSON report (or save to disk with --out-report report.json)
    python scripts/merchant_feed_gate.py \
      --feed examples/feed_fail.csv \
      --config examples/feed_config.json \
      --json
    

    Real Terminal Proof

    1. FAIL Gate — Catching Bad GTIN, Price Inversion, Oversized Promo Title, Missing Image Link & Duplicate ID (exit code 1)

    $ python scripts/merchant_feed_gate.py --feed examples/feed_fail.csv --config examples/feed_config.json
    ============================================================================
    SHOPIFY & GOOGLE MERCHANT FEED PREFLIGHT GATE -- AUDIT REPORT
    ============================================================================
    Feed File        : examples/feed_fail.csv
    Config File      : examples/feed_config.json
    Currency         : USD
    Rows Scanned     : 6 (Clean=1, Flagged=5)
    ----------------------------------------------------------------------------
    VIOLATION COUNTS BY RULE:
      [FAIL] GTIN_INVALID           : 1
      [FAIL] TITLE_TOO_LONG         : 1
      [FAIL] TITLE_PROMO_TEXT       : 1
      [FAIL] PRICE_INVERSION        : 1
      [FAIL] MISSING_REQUIRED       : 1
      [FAIL] DUPLICATE_ID           : 1
      [OK]   BAD_LINK               : 0
    ----------------------------------------------------------------------------
    [BLOCKED] Upload rejected: 6 violation(s) detected.
    
    Violations:
      1. [GTIN_INVALID] row #2 | sku=SKU-1002 | field=gtin
         Detail: GTIN '012345678901' (GTIN-12) fails GS1 mod-10 check digit: got 1, expected 5.
         Fix   : Verify the manufacturer barcode and fix the GS1 GTIN check digit (or leave empty for custom/unbranded items).
      2. [PRICE_INVERSION] row #3 | sku=SKU-1003 | field=sale_price
         Detail: Price inversion: sale_price (64.00 USD) must be strictly less than price (59.00 USD).
         Fix   : Lower sale_price below regular price or clear sale_price if no discount is active.
      3. [TITLE_TOO_LONG] row #4 | sku=SKU-1004 | field=title
         Detail: Title length is 157 characters (max allowed: 150).
         Fix   : Shorten product title to 150 characters or fewer while keeping core brand/model attributes.
      4. [TITLE_PROMO_TEXT] row #4 | sku=SKU-1004 | field=title
         Detail: Title violates GMC editorial policy: promotional phrase(s) detected: 'FREE SHIPPING', 'BEST SELLER'.
         Fix   : Remove promotional text and gimmicky ALL-CAPS from the product title.
      5. [MISSING_REQUIRED] row #5 | sku=SKU-1005 | field=image_link
         Detail: Required attribute 'image_link' is missing or empty.
         Fix   : Populate a valid 'image_link' value for SKU 'SKU-1005' before uploading.
      6. [DUPLICATE_ID] row #6 | sku=SKU-1001 | field=id
         Detail: Duplicate SKU id 'SKU-1001' already appeared on row #1.
         Fix   : Assign a unique SKU id to each variant/offer or deduplicate the feed export.
    ============================================================================
    # Exit code: 1
    

    2. PASS Gate — Clean 5-SKU Feed Approved for Upload (exit code 0)

    $ python scripts/merchant_feed_gate.py --feed examples/feed_pass.csv --config examples/feed_config.json
    ============================================================================
    SHOPIFY & GOOGLE MERCHANT FEED PREFLIGHT GATE -- AUDIT REPORT
    ============================================================================
    Feed File        : examples/feed_pass.csv
    Config File      : examples/feed_config.json
    Currency         : USD
    Rows Scanned     : 5 (Clean=5, Flagged=0)
    ----------------------------------------------------------------------------
    VIOLATION COUNTS BY RULE:
      [OK]   GTIN_INVALID           : 0
      [OK]   TITLE_TOO_LONG         : 0
      [OK]   TITLE_PROMO_TEXT       : 0
      [OK]   PRICE_INVERSION        : 0
      [OK]   MISSING_REQUIRED       : 0
      [OK]   DUPLICATE_ID           : 0
      [OK]   BAD_LINK               : 0
    ----------------------------------------------------------------------------
    [PASS] Feed approved for upload: 0 violations across 5 SKU row(s).
    ============================================================================
    # Exit code: 0
    

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for E-commerce.

    Requires CSV format with GMC headers. Does not support XML feeds. Validation is 100% offline and does not check if URLs are live, only if they are syntactically valid HTTPS.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed today

    Software
    Python

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Network Access
    Listedtoday

    What's inside

    Frequently Asked Questions

    This skill acts as an offline validator that catches errors like invalid GTIN check digits, price inversions, and policy-violating titles before you upload your data, preventing account warnings and SKU disapprovals.

    The skill is a standalone Python-based utility that integrates with any AI agent capable of executing scripts or managing CI/CD workflows, and it works with standard CSV exports from Shopify and other PIMs.

    You receive the core validation script, a JSON Schema configuration template for setting your custom policy rules, and documentation for integrating the gate into your data pipeline.

    Unlike LLMs that struggle with precise arithmetic, this tool uses deterministic Python logic to guarantee 100% accuracy for modulo-10 GTIN checks and exact decimal price comparisons.

    The skill is designed for high-performance offline processing of large CSV files, though it currently requires a local or hosted environment to run the Python script rather than a direct API connection to Shopify.

    Updates are provided through the marketplace whenever there are changes to Google Merchant Center's core formatting requirements or GS1 validation standards.

    New in E-commerce