Marketing Skills

Theme Architecture and Liquid Patterns

A reference file of the Theme Development skill. Your AI app reads it when the skill points to it.

Verify current platform behavior in Shopify's first-party documentation:

Architecture responsibilities

  • Layouts provide repeated document structure.
  • JSON or Liquid templates determine the page template.
  • Section groups and sections provide merchant-configurable page regions.
  • Blocks provide repeatable configurable content within supported sections.
  • Snippets provide reusable Liquid rendering logic.
  • Assets contain styles, scripts, images, and supporting resources.
  • Config and locale files hold settings and translations.

Use current official documentation for exact limits and schema behavior.

Implementation rules

  • Prefer existing theme conventions before introducing a new abstraction.
  • Keep merchant-editable content in appropriate settings, blocks, metafields, or resources.
  • Use semantic HTML and native controls before custom interaction patterns.
  • Escape or render content according to its source and intended markup.
  • Avoid repeated expensive loops and duplicated queries in hot templates.
  • Load scripts and media only where needed.
  • Keep JavaScript enhancements resilient when JavaScript fails or loads late where practical.
  • Preserve app blocks, dynamic sources, editor behavior, and localization.
  • Do not edit merchant-authored custom CSS or configuration without explicit scope.

Section design checklist

merchant_job:
supported_templates:
settings_and_defaults:
blocks_and_limits:
dynamic_sources:
empty_state:
editor_preview:
accessibility:
responsive_behavior:
performance:
localization:
app_compatibility:

Media

Use appropriately sized responsive media, intrinsic dimensions, meaningful alternative text rules, and loading priority based on page position. Do not lazy-load a likely largest-content element by default. Validate with the actual theme and page, not a universal snippet.

JavaScript state

Define source of truth, initialization, teardown, editor events, variant changes, focus behavior, errors, and repeated section rendering. Avoid global listeners or duplicated initialization without guards.

High-variant products

Shopify's high-variant guide, reviewed September 30, 2026, documents a 250-variant cap on Liquid product.variants.

  • Audit loops and serialized product data for assumptions that all variants are present.
  • Use product.options_with_values, product_option_value, and deferred section rendering for option selection where compatible with the existing theme.
  • An option_values combination without a variant can yield null selected-variant objects. Clear stale form IDs and disable purchasing in that state.
  • For combined listings, update the sibling product's content as well as its options.

Test deep links, rapid changes, stale responses, unavailable combinations, focus restoration, and the intended cart variant in a development store. The three-variant teaching fixture does not verify this path.

Source on GitHub