Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Shopify Liquid App Dev

ASecurity

Shopify theme development with Liquid syntax, custom storefront App Extensions, Admin GraphQL API integrations, Webhooks processing, and Storefront API patterns.

8 stars
0 votes
0 copies
0 views
Added 9/29/2026
ai-agentsjavascriptgojavanodeexpressapidatabasebackendperformance

Works with

cliapi

Security Analysis

A100/100

Scanned 9/29/2026

$npx -y skills add hamzabellouch/agent-skills --skill shopify-liquid-app-dev --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Shopify Liquid App Dev?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Shopify Liquid App Dev
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/hamzabellouch-shopify-liquid-app-dev/badge)](https://www.skillsdirectory.com/skills/hamzabellouch-shopify-liquid-app-dev)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: shopify-liquid-app-dev
metadata:
  category: E-Commerce and Retail Tech
description: Shopify theme development with Liquid syntax, custom storefront App Extensions, Admin GraphQL API integrations, Webhooks processing, and Storefront API patterns.
compatibility: Shopify CLI 3.x, Theme App Extensions, Liquid, Remix / Node.js Shopify App Engine
---

# Shopify Liquid Theme & App Extension Development

## Overview
This skill provides guidelines and patterns for building scalable Shopify themes using **Liquid** and developing full-stack Shopify Apps with **Theme App Extensions**, **Admin GraphQL APIs**, and secure **Webhook Subscribers**.

---

## 1. Shopify Architecture Principles

1. **Theme App Extensions over Direct Code Injection**: Never modify a merchant's `theme.liquid` directly via script tags. Use Theme App Extensions (`app-block` and `app-embed-block`) to ensure zero left-over code upon app uninstallation.
2. **GraphQL Admin API over REST**: Prefer the GraphQL Admin API for all backend store mutations and data queries to optimize payloads and enforce strict schema typing.
3. **Liquid Performance Optimization**: Avoid nested loops over large collections (`{% for product in collections.all.products %}`). Cache expensive Liquid calculations with `{% cache %}` blocks where available.
4. **Mandatory HMAC Webhook Verification**: Verify `X-Shopify-Hmac-SHA256` signatures on all incoming webhooks before processing store events (`orders/create`, `products/update`).
5. **Session Token Auth (App Bridge)**: Utilize Shopify App Bridge with JWT session tokens for seamless, iframe-embedded app administration without third-party cookie dependencies.

---

## 2. Shopify Extension Architecture

```
[ Customer Browser ]
       │
       │ 1. Render Theme with Liquid App Extension
       ▼
[ Shopify Storefront ]
       │ 2. App Embed Block (JavaScript / Storefront API)
       ▼
[ Shopify App Backend (Remix/Node) ] ──(GraphQL Admin API)──▶ [ Shopify Core ]
       │
       │ 3. Asynchronous Webhooks (HMAC Verified)
       ▼
[ App Database / Queue ]
```

| Component | Standard Path | Purpose | Key Constraints |
| :--- | :--- | :--- | :--- |
| **App Block** | `extensions/theme-ext/blocks/*.liquid` | Render interactive UI sections inside product pages | Must define schema with `target: section` |
| **App Embed Block** | `extensions/theme-ext/blocks/*.liquid` | Inject global storefront scripts/styles | `target: body` or `head` |
| **Admin API** | `/admin/api/2026-04/graphql.json` | Programmatic store management | Rate limited by cost points (1000 pts limit) |
| **Storefront API** | `/api/2026-04/graphql.json` | Unauthenticated customer-facing queries | Requires public Storefront Access Token |

---

## 3. Anti-Patterns & Common Failures

* **Anti-Pattern: Hardcoding API Keys in Liquid Files**
  * *Risk*: Total compromise of shop credentials via public view-source.
  * *Remediation*: Pass only public Storefront tokens; perform sensitive operations via backend proxy endpoints.
* **Anti-Pattern: Synchronous Processing of Shopify Webhooks**
  * *Risk*: Gateway timeout (5 second HTTP threshold) leading to webhook delivery retries and duplicate execution.
  * *Remediation*: Return `200 OK` immediately after pushing webhook payload into a worker queue (BullMQ, Celery, SQS).
* **Anti-Pattern: Unbound Liquid Collection Loops**
  * *Risk*: Liquid render time penalty causing merchant store Lighthouse score drops.
  * *Remediation*: Enforce pagination (`{% paginate collection.products by 24 %}`).

---

## 4. Production Code Snippets

### A. Shopify Theme App Block (`extensions/theme-ext/blocks/product-upsell.liquid`)

```liquid
{% comment %}
  Shopify Theme App Extension: Product Upsell Block
  Target: section (Product details page)
{% endcomment %}

<div class="product-upsell-container" data-product-id="{{ product.id }}">
  {% if block.settings.heading != blank %}
    <h3 class="upsell-heading" style="color: {{ block.settings.heading_color }};">
      {{ block.settings.heading | escape }}
    </h3>
  {% endif %}

  <div class="upsell-content" id="upsell-widget-{{ block.id }}">
    <p class="loading-state">Loading exclusive offers...</p>
  </div>
</div>

<script>
  document.addEventListener('DOMContentLoaded', function() {
    const container = document.querySelector('[data-product-id="{{ product.id }}"]');
    if (!container) return;

    fetch(`/apps/my-custom-proxy/upsell?product_id={{ product.id }}&shop={{ shop.permanent_domain }}`)
      .then(response => response.json())
      .then(data => {
        const widget = document.getElementById('upsell-widget-{{ block.id }}');
        if (data.recommended_product) {
          widget.innerHTML = `
            <div class="upsell-card">
              <img src="${data.recommended_product.image_url}" alt="${data.recommended_product.title}" />
              <h4>${data.recommended_product.title}</h4>
              <p>Special Add-on Price: ${data.recommended_product.price}</p>
              <button onclick="addUpsellToCart('${data.recommended_product.variant_id}')">Add to Cart</button>
            </div>
          `;
        } else {
          widget.style.display = 'none';
        }
      })
      .catch(err => console.error('Upsell widget error:', err));
  });

  function addUpsellToCart(variantId) {
    fetch('/cart/add.js', {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({ items: [{ id: variantId, quantity: 1 }] })
    })
    .then(res => res.json())
    .then(() => window.location.reload());
  }
</script>

{% schema %}
{
  "name": "Product Custom Upsell",
  "target": "section",
  "stylesheet": "upsell.css",
  "javascript": "upsell.js",
  "settings": [
    {
      "type": "text",
      "id": "heading",
      "label": "Block Heading",
      "default": "Frequently Bought Together"
    },
    {
      "type": "color",
      "id": "heading_color",
      "label": "Heading Text Color",
      "default": "#111827"
    }
  ]
}
{% endschema %}
```

---

### B. Node.js Webhook Receiver & HMAC Verification (`webhook_handler.js`)

```javascript
import crypto from 'crypto';
import express from 'express';

const app = express();

// Parse raw body for HMAC signature verification
app.post('/webhooks/orders-create', express.raw({ type: 'application/json' }), (req, res) => {
  const hmacHeader = req.headers['x-shopify-hmac-sha256'];
  const topicHeader = req.headers['x-shopify-topic'];
  const shopHeader = req.headers['x-shopify-shop-domain'];

  const secret = process.env.SHOPIFY_API_SECRET;

  // 1. Verify HMAC Signature
  const generatedHmac = crypto
    .createHmac('sha256', secret)
    .update(req.body, 'utf8')
    .digest('base64');

  if (!crypto.timingSafeEqual(Buffer.from(generatedHmac), Buffer.from(hmacHeader))) {
    console.error(`[UNAUTHORIZED] Invalid HMAC signature from ${shopHeader}`);
    return res.status(401).send('HMAC verification failed');
  }

  // 2. Fast Acknowledge to prevent Shopify timeout
  res.status(200).send('Webhook Received');

  // 3. Asynchronous Payload Processing
  const payload = JSON.parse(req.body.toString());
  console.log(`[WEBHOOK] Received ${topicHeader} for shop ${shopHeader}. Order ID: ${payload.id}`);

  // Enqueue job for background processing
  enqueueOrderJob(shopHeader, payload);
});

function enqueueOrderJob(shop, orderData) {
  // Pushes task to Redis/BullMQ worker queue
}

app.listen(3000, () => console.log('Shopify Webhook listener running on port 3000'));
```

Attribution

hamzabellouchhamzabellouch
View sourceSee grades on GitHubMore from hamzabellouch →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".

1100021 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

698621 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3421 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Amp, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Grok Build, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

741 votes
View all in ai-agents →