dist/codex/shopify-commerce/skills/shopify-liquid/SKILL.md
Write Shopify Liquid templates — objects, tags, filters, global objects, section schema, Online Store 2.0 JSON templates, and Liquid best practices. Use when customizing Shopify theme templates.
npx skillsauth add orcaqubits/agentic-commerce-claude-plugins shopify-liquidInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Fetch live docs:
https://shopify.dev/docs/api/liquid for Liquid referencesite:shopify.dev liquid objects for available objectssite:shopify.dev liquid filters for available filtersLiquid is Shopify's template language:
Access data with double curly braces:
{{ product.title }} — product name{{ product.price | money }} — formatted price{{ cart.item_count }} — number of items in cart| Object | Description |
|--------|-------------|
| product | Current product (on product pages) |
| collection | Current collection |
| cart | Shopping cart |
| customer | Logged-in customer (nil if guest) |
| shop | Store settings |
| request | Current request (locale, page type) |
| content_for_header | Required scripts/meta (must be in layout) |
| content_for_layout | Template content (must be in layout) |
| all_products | Access any product by handle |
| collections | All collections |
| linklists | Navigation menus |
| pages | CMS pages |
| settings | Theme settings |
Control flow and logic:
{% if product.available %}
<span>In stock</span>
{% elsif product.variants.size > 0 %}
<span>Limited</span>
{% else %}
<span>Sold out</span>
{% endif %}
{% unless customer %}
<a href="/account/login">Log in</a>
{% endunless %}
{% case product.type %}
{% when 'Shirt' %}
<p>Clothing</p>
{% when 'Mug' %}
<p>Accessories</p>
{% endcase %}
{% for product in collection.products %}
<h2>{{ product.title }}</h2>
{% endfor %}
{% for item in cart.items limit:5 offset:2 %}
{{ item.title }}
{% endfor %}
{% paginate collection.products by 12 %}
{% for product in collection.products %}
{{ product.title }}
{% endfor %}
{{ paginate | default_pagination }}
{% endpaginate %}
{% assign greeting = 'Hello' %}
{% capture full_greeting %}{{ greeting }}, {{ customer.first_name }}!{% endcapture %}
Transform output:
upcase, downcase, strip, truncate, replace, split, url_encodeplus, minus, times, divided_by, round, ceil, floormoney, money_with_currency, money_without_trailing_zerosdate: '%B %d, %Y'first, last, size, sort, map, where, join, uniqimg_tag, script_tag, stylesheet_tagasset_url, img_url, file_url, shopify_asset_urlimage_url, image_tag (modern replacements for img_url/img_tag)Sections define their own settings in a {% schema %} tag:
{% schema %}
{
"name": "Featured Product",
"settings": [
{
"type": "product",
"id": "product",
"label": "Product"
},
{
"type": "color",
"id": "background_color",
"label": "Background color",
"default": "#ffffff"
}
],
"blocks": [
{
"type": "text",
"name": "Text block",
"settings": [
{
"type": "richtext",
"id": "content",
"label": "Content"
}
]
}
],
"presets": [
{
"name": "Featured Product"
}
]
}
{% endschema %}
Templates are JSON files that reference sections:
{
"sections": {
"main": {
"type": "main-product",
"settings": {}
},
"recommendations": {
"type": "product-recommendations",
"settings": {
"heading": "You may also like"
}
}
},
"order": ["main", "recommendations"]
}
image_url and image_tag instead of deprecated img_url / img_tag{% comment %} for documentation, not HTML comments (which are sent to the browser){% render 'snippet-name' %}) for reusable code — {% include %} is deprecated{% render %} over {% include %} — render creates an isolated scope| escape filter to user-generated content to prevent XSSFetch the Shopify Liquid reference for exact object properties, available filters, and section schema options before implementing.
development
Build with Spree's headless Next.js storefront — the official `spree/storefront` repo (Next.js 16 App Router with Server Actions and Turbopack, React 19 Server Components, Tailwind CSS 4, TypeScript 5, `@spree/sdk`, Sentry), server-only auth (httpOnly JWT cookies + publishable key), MeiliSearch faceted catalog, one-page checkout with Apple/Google Pay/Klarna/Affirm/SEPA, multi-region market routing, GA4 + JSON-LD SEO, and Vercel/Docker deployment. Use when forking or customizing the storefront, or evaluating headless adoption.
tools
Build Spree extensions as Rails engines — gem scaffolding, `bin/rails g spree:extension`, mounting routes/migrations/assets, the modern `prepend` decorator pattern (`*_decorator.rb` with `self.prepended(base)`), generators (`spree:model_decorator`, `spree:controller_decorator`), the four customization surfaces in preference order (Events > Webhooks > Dependencies > Decorators), Spree::Dependencies for swapping service objects, gem release/versioning, and the deprecated Deface engine. Use when building a reusable Spree extension or adding non-trivial customization to an app.
development
Build with Spree's event bus and Webhooks 2.0 — `Spree::Events` publication, `Spree::Subscriber` DSL with `subscribes_to` and `on`, wildcard matching, lifecycle events (`{model}.created/.updated/.deleted` via `publishes_lifecycle_events`), the canonical event catalog (order.*, payment.*, shipment.*, product.*), Webhooks 2.0 endpoints, HMAC-SHA256 signing (`X-Spree-Webhook-Signature`), exponential-backoff retries, and Sidekiq job orchestration. Use when wiring event-driven business logic, building webhook consumers, or replacing ActiveSupport callback chains.
tools
Cross-cutting Spree development patterns — the customization preference hierarchy (Events > Webhooks > Dependencies > Decorators), `Spree::Dependencies` service-object swapping, the `_decorator.rb` + `prepend` + `self.prepended` idiom, idempotent subscribers and webhook receivers, multi-store scoping discipline, prefixed IDs, calculator polymorphism (shipping/promotion/tax share the base), service-object composition with `dry-monads` or simple results, why to avoid `class_eval` reopening and Deface, and Spree-on-Rails idioms (Hotwire/Turbo Stimulus, ActiveStorage, Action Cable, Sidekiq). Use when designing the architecture of a Spree extension or solving cross-cutting concerns.