- Home
- Skills
- E-commerce
- Shopify & Google Merchant Feed Preflight Gate
Works with the AI Agents you already use
Shopify & Google Merchant Feed Preflight Gate
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
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 ID | Rule Code | Field | Issue |
|---|---|---|---|
SHOE-001 | GTIN_INVALID | gtin | Failed GS1 mod-10 check (Expected 4, Got 5) |
SHIRT-04 | PRICE_INVERSION | sale_price | 25.00 USD is not less than 20.00 USD |
HAT-99 | TITLE_PROMO_TEXT | title | Contains restricted phrase: FREE SHIPPING |
GLOVE-2 | BAD_LINK | image_link | URL 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
- Correct the GTIN check digit for SKU
SHOE-001in the Shopify admin. - Adjust the
sale_priceforSHIRT-04to be strictly less than the base price. - Remove promotional text from the title of SKU
HAT-99to comply with GMC policy.
products.csv
CSV · data export
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 coveringcurrency,title_max(default150),required_attributes,allowed_availability,allowed_conditions,promo_patterns, andmax_caps_ratio.schemas/feed_report.schema.json: Machine-readable preflight audit report contract capturingstatus,exit_code,rows_scanned,counts_by_rule, and structured row-levelviolationswith 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 viadecimal.Decimal(neverfloat), validates currency alignment, and blockssale_price >= price(PRICE_INVERSION). - Enforces
required_attributescompleteness (MISSING_REQUIRED), flags duplicate SKU IDs (DUPLICATE_ID), and validates non-emptylinkandimage_linkURLs for validhttps://scheme and domain netloc (BAD_LINK) without double-flagging empty fields. - Emits pure-ASCII terminal output (Windows
cp1252-safe), supports--jsonand--out-report <path>, and exits0on[PASS]or1on[BLOCKED].
- Computes exact GS1 mod-10 check digits for GTIN-8, GTIN-12 (UPC), GTIN-13 (EAN), and GTIN-14 (
- 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, andmax_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 USDsale vs59.00 USDregular), 1 oversized promotional title (SKU-1004: 157 chars withBEST SELLERandFREE SHIPPING), 1 missingimage_link(SKU-1005), and 1 duplicateid(SKU-1001).examples/feed_pass.csv: Clean 5-SKU catalog with mathematically verified GS1 GTIN-12/13 barcodes, validhttps://links, validDecimalprices and sale prices, clean titles<= 150chars,0violations, andexit 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
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
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 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