Use when writing or modifying code that interacts with REX (Retail Express), Shopify, or any external integration/sync system. Triggers on work involving SOAP calls, REX API, Shopify API, inventory sync, order sync, product sync, fulfillment sync, or any code in services/retailExpress/, services/shopify*, or queue workers. Use before writing any integration code to avoid known pitfalls.
التثبيت
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
Use when writing or modifying code that interacts with REX (Retail Express), Shopify, or any external integration/sync system. Triggers on work involving SOAP calls, REX API, Shopify API, inventory sync, order sync, product sync, fulfillment sync, or any code in services/retailExpress/, services/shopify*, or queue workers. Use before writing any integration code to avoid known pitfalls.
Integration Guard
Overview
A pre-code checklist and reference for external integration work. REX and Shopify integrations have accumulated many gotchas from production incidents. This skill codifies those lessons so you don't repeat them.
When to Use
Before writing ANY code that touches REX or Shopify APIs
Before modifying sync workers or queue processors
When debugging integration failures
When adding new sync flows
Specialized Skills (invoke for deeper guidance)
For detailed domain knowledge, invoke the specialized skill FIRST:
Domain
Skill
When
REX SOAP API
/rex-soap-protocol
Any SOAP envelope, REX API call, fulfillment sync, error handling
Queue/sync workers
/sync-worker
Any queue worker, retry logic, checkpoint, echo detection, backoff
Shopify API/webhooks
/shopify-integration
Any webhook handler, API call, pagination, inventory push
This integration-guard provides a general checklist. The specialized skills above provide the deep patterns.
Pre-Code Checklist
Run through ALL of these before writing integration code:
1. Data Type Safety
REX order IDs are bigints — Always cast to BigInt() or use string comparison. JavaScript Number loses precision above 2^53.
// BADif (rexOrderId === localId) // fails for large IDs// GOODif (String(rexOrderId) === String(localId))
suppliers.id is UUID, products.supplier_id is integer — Cast to text for joins:
JOIN suppliers ON suppliers.id::text = products.supplier_id::text
REX SKU field mapping (recall: search_vault(query="REX SKU field mapping")):
supplier_sku → maps to our sku
supplier_sku2 → maps to our sku2
Top-level sku in REX response is usually NULL — don't use it
2. SOAP Protocol (invoke /rex-soap-protocol for full details)