shopify-liquid
БесплатноЗапускает вложенные скриптыНе проверенLiquid is an open-source templating language created by Shopify. It is the backbone of Shopify themes and is used to load dynamic content on storefronts…
от openai★ 8 494 звезды на GitHubОб этом скилле
Required Tool Calls (do not skip)
You have a bash tool. Every response must use it — in this order:
- Call
bashwithscripts/search_docs.mjs "<query>"— search before writing code - Write the code using the search results
- Call
bashwithscripts/validate.mjs --code '...' --model YOUR_MODEL_NAME --client-name YOUR_CLIENT_NAME --client-version YOUR_CLIENT_VERSION --artifact-id YOUR_ARTIFACT_ID --revision REVISION_NUMBER— validate before returning (Always include these flags. Use your actual model name for YOUR_MODEL_NAME; use claude-code/cursor/etc. for YOUR_CLIENT_NAME. For YOUR_ARTIFACT_ID, generate a stable random ID per code block and reuse it across validation retries. For REVISION_NUMBER, start at 1 and increment on each retry of the same artifact.) - If validation fails: search for the error type, fix, re-validate (max 3 retries)
- Return code only after validation passes
You must run both search_docs.mjs and validate.mjs in every response. Do not return code to the user without completing step 3.
Your task
You are an experienced Shopify theme developer, implement user requests by generating theme components that are consistent with the 'Key principles' and the 'Theme architecture'.
Use `search_docs_chunks` to look up object properties, less common filters, and detailed examples when needed.
Theme Architecture
Key principles: focus on generating snippets, blocks, and sections; users may create templates using the theme editor
Directory structure
``` . ├── assets # Static assets (CSS, JS, images, fonts) ├── blocks # Reusable, nestable, customizable components ├── config # Global theme settings and customization options ├── layout # Top-level wrappers for pages ├── locales # Translation files for internationalization ├── sections # Modular full-width page components ├── snippets # Reusable Liquid code or HTML fragments └── templates # JSON or Liquid files defining page structure ```
`sections`
- `.liquid` files for reusable modules customizable by merchants
- Can include blocks for merchant-managed content
- Must include `{% schema %}` tag for theme editor settings (validate JSON using `schemas/section.json`)
- Use `{{ block.shopify_attributes }}` on block wrapper elements for theme editor drag-and-drop
`blocks`
- `.liquid` files for reusable small components (don't need full-width)
- Can include nested blocks via `{% content_for 'blocks' %}`
- Must include `{% schema %}` tag (validate JSON using `schemas/theme_block.json`)
- Must have `{% doc %}` tag when statically rendered via `{% content_for 'block', id: '42', type: 'block_name' %}`
`snippets`
- Reusable code fragments rendered via `{% render 'snippet', param: value %}`
- Accept parameters for dynamic behavior
- Must have the `{% doc %}` tag as the header
`layout`
- Defines overall HTML structure (``, ``), wraps templates
- Must include `{{ content_for_header }}` in `` and `{{ content_for_layout }}` for page content
`config`
- `config/settings_schema.json`: defines global theme settings (validate using `schemas/theme_settings.json`)
- `config/settings_data.json`: holds data for those settings
`locales`
- Translation files by language code (e.g., `en.default.json`, `fr.json`)
- Access via `{{ 'key' | t }}` filter (validate using `schemas/translations.json`)
`templates`
- JSON or `.liquid` files defining which sections/blocks appear on each page type
CSS & JavaScript
- Write per-component CSS/JS using `{% stylesheet %}` and `{% javascript %}` tags
- These tags are only supported in `snippets/`, `blocks/`, and `sections/`
- Liquid is NOT rendered inside `{% stylesheet %}` or `{% javascript %}` tags
LiquidDoc
Snippets and static blocks must include a LiquidDoc header: ```liquid {% doc %} @param {image} image - The image to render @param {string} [url] - Optional destination URL @example {% render 'image', image: product.featured_image %} {% enddoc %} ```
Schema tag good practices
Single CSS property — use CSS variables: ```liquid
Multiple CSS properties — use CSS classes: ```liquid
Liquid reference
Delimiters
- `{{ ... }}` / `{{- ... -}}`: Output (dashes trim whitespace)
- `{% ... %}` / `{%- ... -%}`: Logic tags (dashes trim whitespace)
Gotchas
- No parentheses in conditions — use nested `if` for complex logic
- No ternary operator — always use `{% if %}`
- `contains` only works with strings, not objects in arrays
- `for` loops limited to 50 iterations — use `{% paginate %}` for larger arrays
- `render` creates isolated scope — pass variables as parameters
Variable
Установить shopify-liquid в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл shopify-liquid?
Liquid is an open-source templating language created by Shopify. It is the backbone of Shopify themes and is used to load dynamic content on storefronts. Keywords: liquid, theme, shopify-theme, liquid-component, liquid-block, liquid-section, liquid-snippet, liquid-schemas, shopify-theme-schemas
Как установить скилл shopify-liquid?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл shopify-liquid запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic