Skip to content
Skills Library
Programming · Building & coding

shopify-reliability-patterns

/shopify-reliability-patterns

Implement reliability patterns for Shopify apps including circuit breakers for API outages, webhook retry handling, and graceful degradation. Use when building fault-tolerant Shopify integrations, handling webhook retry storms, or adding resilience to API calls. Trigger with phrases like "shopify reliability", "shopify circuit breaker", "shopify resilience", "shopify fallback", "shopify retry webhook".

Licence
MIT
Last repository change
26.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
6
Scripts
0
HTML comments
0
URLs in SKILL.md
4
Deprecation

No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Implement reliability patterns for Shopify apps including circuit breakers for API outages, webhook retry handling, and graceful degradation. Use when building fault-tolerant Shopify integrations, handling webhook retry storms, or adding resilience to API calls. Trigger with phrases like "shopify reliability", "shopify circuit breaker", "shopify resilience", "shopify fallback", "shopify retry webhook".

Triggers from the description

shopify reliabilityshopify circuit breakershopify resilienceshopify fallbackshopify retry webhook
Original author description

Implement reliability patterns for Shopify apps including circuit breakers for API outages, webhook retry handling, and graceful degradation. Use when building fault-tolerant Shopify integrations, handling webhook retry storms, or adding resilience to API calls. Trigger with phrases like "shopify reliability", "shopify circuit breaker", "shopify resilience", "shopify fallback", "shopify retry webhook".

How it works

  1. Overview
  2. Prerequisites
  3. Instructions
  4. Output
  5. Error Handling
  6. Examples
  7. Resources
Original SKILL.md headings · 89 lines, 468 words
SKILL.md preview
---
name: shopify-reliability-patterns
description: 'Implement reliability patterns for Shopify apps including circuit breakers

  for API outages, webhook retry handling, and graceful degradation.

  Use when building fault-tolerant Shopify integrations, handling webhook retry storms,

  or adding resilience to API calls.

  Trigger with phrases like "shopify reliability", "shopify circuit breaker",

  "shopify resilience", "shopify fallback", "shopify retry webhook".

  '
allowed-tools: Read, Write, Edit
version: 2.7.0
license: MIT
author: Jeremy Longshore <jeremy@intentsolutions.io>
tags:
- saas
- ecommerce
- shopify
compatibility: Designed for Claude Code
---
# Shopify Reliability Patterns

## Overview

Build fault-tolerant Shopify integrations that handle API outages, webhook retry storms, and rate limit exhaustion gracefully.

## Prerequisites

- Understanding of circuit breaker pattern
- Queue infrastructure (BullMQ, SQS, etc.) for async processing
- Cache layer for fallback data

## Instructions

### Step 1: Circuit Breaker for Shopify API

Wrap all Shopify API calls in a circuit breaker (using opossum) that opens at 50% error rate, only counting 5xx and timeout errors. When open, serve cached data. The breaker auto-tests recovery after 30 seconds in half-open state.

See [Circuit Breaker](references/circuit-breaker.md) for the complete implementation.

### Step 2: Webhook Idempotency

Shopify retries webhooks up to 19 times over 48 hours if your endpoint doesn't return 200. Your handler **must** be idempotent. Use Redis to track `X-Shopify-Webhook-Id` with a 7-day TTL. Always respond 200 within 5 seconds, then process asynchronously.

See [Webhook Idempotency](references/webhook-idempotency.md) for the complete implementation.

### Step 3: Graceful Degradation with Cached Fallback

Implement a three-tier fallback: try the live API first (caching the result), fall back to cached data, then fall back to an alternative data source (e.g., local DB). Track the data source so you can log degraded responses.

See [Cached Fallback](references/cached-fallback.md) for the complete implementation.

### Step 4: Webhook Processing Queue

Don't process webhooks inline — queue them with BullMQ for resilience. Verify HMAC first, respond 200 immediately, then enqueue with topic/shop/payload metadata. The worker processes jobs with exponential backoff (5 retries) and idempotency checks.

See [Webhook Processing Queue](references/webhook-processing-queue.md) for the complete implementation.

### Step 5: Rate Limit-Aware Retry

Retry logic that respects Shopify's `Retry-After` header (REST 429) and GraphQL throttle status restore rate. Calculates optimal wait time from available points rather than blindly backing off.

See [Rate Limit-Aware Retry](references/rate-limit-retry.md) for the complete implementation.

## Output

- Circuit breaker preventing cascade failures during Shopify outages
- Idempotent webhook processing preventing duplicate operations
- Graceful degradation with cached fallback data
- Queue-based webhook processing for resilience
- Rate limit-aware retry logic

## Error Handling

| Issue | Cause | Solution |
|-------|-------|----------|
| Circuit stays open | Shopify extended outage | Serve cached data, monitor status page |
| Duplicate orders processed | Missing idempotency | Use `X-Shopify-Webhook-Id` for dedup |
| Queue growing unbounded | Worker down | Monitor queue depth, alert on backlog |
| Stale cache served for hours | Circuit never recovers | Set max cache staleness, force refresh |

## Examples

### Health Check with Circuit State

```typescript
app.get("/health", async (req, res) => {
  res.json({
    status: shopifyCircuit.opened ? "degraded" : "healthy",
    shopify: {
      circuit: shopifyCircuit.opened ? "open" : "closed",
      stats: shopifyCircuit.stats,
    },
    webhookQueue: {
      waiting: await webhookQueue.getWaitingCount(),
      active: await webhookQueue.getActiveCount(),
      failed: await webhookQueue.getFailedCount(),
    },
  });
});
```

## Resources

- [Circuit Breaker Pattern](https://martinfowler.com/bliki/CircuitBreaker.html)
- [Opossum Circuit Breaker](https://nodeshift.dev/opossum/)
- [BullMQ Documentation](https://docs.bullmq.io/)
- [Shopify Webhook Retry Policy](https://shopify.dev/docs/apps/build/webhooks)
Files in this package (6)
  • SKILL.md 4 KB
  • references/cached-fallback.md 1 KB
  • references/circuit-breaker.md 2 KB
  • references/rate-limit-retry.md 1 KB
  • references/webhook-idempotency.md 2 KB
  • references/webhook-processing-queue.md 1 KB

Versions

The database has no other skills named shopify-reliability-patterns.

Identical content appears in 1 other GitHub folders. We show one copy with the highest score.

Database snapshot: 13.11.2026 · package version d5d1d9af949e (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100replit-reliability-patterns
    Implement Replit reliability patterns including circuit breakers, idempotency, and graceful degradation. Use when building fault-tolerant Replit integrations, implementing retry strategies, or adding resilience to production Replit services. Trigger with phrases like "replit…
  • 100exa-reliability-patterns
    Implement Exa reliability patterns including circuit breakers, idempotency, and graceful degradation. Use when building fault-tolerant Exa integrations, implementing retry strategies, or adding resilience to production Exa services. Trigger with phrases like "exa reliability",…
  • 100vercel-reliability-patterns
    Implement reliability patterns for Vercel deployments including circuit breakers, retry logic, and graceful degradation. Use when building fault-tolerant serverless functions, implementing retry strategies, or adding resilience to production Vercel services. Trigger with phrases…
  • 100customerio-reliability-patterns
    Implement Customer.io reliability and fault-tolerance patterns. Use when building circuit breakers, fallback queues, idempotency, or graceful degradation for Customer.io integrations. Trigger: "customer.io reliability", "customer.io resilience", "customer.io circuit breaker",…
  • 100reliability
    This skill should be used when designing, planning, implementing, or reviewing any non-trivial change, or when the user asks to "add retries", "add error handling", "add circuit breaker", "handle failures" — enforces graceful degradation, proper error handling, retry strategies,…
  • 100error-handling
    Implements error handling patterns, structured logging, retry strategies, circuit breakers, and graceful degradation. Use when designing error handling, setting up logging, implementing retries, adding error tracking, or when asked about error boundaries, log aggregation,…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.