shopify · mindrally — скилл для Claude Code: что делает и как установить
Скилл задаёт правила вёрстки тем Shopify: шаблоны Liquid, архитектуру Online Store 2.0 и работу с корзиной.
npx skills add Mindrally/skills --skill shopify -a claude-codeЧто делает shopify
Пакет правил настраивает агента на разработку тем для Shopify по стандартам Online Store 2.0. Он переключает шаблонизацию на вызовы {% render %} и блоки {% cache %}. Устаревший тег {% include %} запрещён. В архитектуре секций агент генерирует схемы {% schema %} с блоками настроек, а страницы собирает через шаблоны JSON.
Для клиентских скриптов скилл форсирует чистый ES6+ с добавлением товаров в корзину через Fetch API по адресу /cart/add.js. Обновления разметки идут через Section Rendering API. Заодно прописаны базовые требования доступности: семантический HTML и навигация с клавиатуры.
Скилл ориентирован строго на стандартную структуру тем Shopify с каталогами sections/ и snippets/. Для headless-витрин эти правила не подходят.
Какие задачи решает
- собрать секцию Online Store 2.0 со схемой настроек и пресетами
- заменить устаревший тег
{% include %}на{% render %} - настроить отправку данных в корзину через
/cart/add.js - оптимизировать показ картинок с помощью фильтра
image_tag
Примеры запросов агенту
- Создай секцию
featured-collection.liquidсо схемой для выбора коллекции - Напиши функцию добавления товара в корзину через
/cart/add.js - Сверстай карточку товара в сниппете
product-cardс ленивой загрузкой картинок
Как установить shopify
1Через Skills CLI (Vercel)
npx skills add Mindrally/skills --skill shopify -a claude-code2Вручную: положить файлы
~/.claude/skills/shopify/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/shopify/
1Через Skills CLI (Vercel)
npx skills add Mindrally/skills --skill shopify -a codex2Вручную: положить файлы
.agents/skills/shopify/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add Mindrally/skills --skill shopify -a cursor2Вручную: положить файлы
.cursor/skills/shopify/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install Mindrally/skills shopify2Вручную: положить файлы
.github/skills/shopify/SKILL.md1Через Skills CLI (Vercel)
npx skills add Mindrally/skills --skill shopify -a gemini-cli2Командой платформы
gemini skills install https://github.com/Mindrally/skills --path shopifyВручную: положить файлы
.devin/skills/shopify/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add Mindrally/skills --skill shopify -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о shopify
Как установить shopify в Claude Code?
Выполните в терминале команду npx skills add Mindrally/skills --skill shopify -a claude-code.
Что делает скилл shopify?
Он настраивает агента на разработку тем Shopify по стандартам Online Store 2.0 с оптимизацией Liquid и Core Web Vitals.
Какие требования к шаблонам Liquid включены в скилл?
Скилл требует вызывать сниппеты через {% render %}, кешировать вычисления блоками {% cache %} и отказываться от устаревшего тега {% include %}.
Исходный текст
SKILL.md · Apache-2.0
---
name: shopify
description: Expert Shopify theme development guidelines for Liquid, Online Store 2.0, CSS, JavaScript, and UX best practices
metadata:
maintainer: Mindrally
source: https://github.com/Mindrally/skills
---
# Shopify Theme Development
You are an expert in Shopify theme development, Liquid templating, Online Store 2.0, and e-commerce best practices.
## Core Principles
- Write clean, maintainable Liquid code
- Follow Online Store 2.0 architecture patterns
- Optimize for performance and Core Web Vitals
- Ensure accessibility compliance
- Implement responsive, mobile-first designs
## Liquid Templating
### Best Practices
- Use meaningful variable names
- Leverage Liquid filters effectively
- Minimize logic in templates; use snippets for reusable code
- Cache expensive operations with `{% cache %}` blocks
- Use `{% render %}` instead of deprecated `{% include %}`
### Common Patterns
```liquid
{% comment %} Product card snippet {% endcomment %}
{% render 'product-card', product: product, show_vendor: true %}
{% comment %} Conditional rendering {% endcomment %}
{% if product.available %}
<button type="submit">Add to Cart</button>
{% else %}
<button disabled>Sold Out</button>
{% endif %}
{% comment %} Loop with forloop object {% endcomment %}
{% for product in collection.products limit: 12 %}
{% render 'product-card', product: product %}
{% endfor %}
```
## Online Store 2.0
### Section Architecture
- Create modular, reusable sections
- Define section schemas with appropriate settings
- Use blocks for repeatable content within sections
- Implement section groups for template flexibility
### Section Schema
```liquid
{% schema %}
{
"name": "Featured Collection",
"settings": [
{
"type": "collection",
"id": "collection",
"label": "Collection"
},
{
"type": "range",
"id": "products_to_show",
"min": 2,
"max": 12,
"step": 2,
"default": 4,
"label": "Products to show"
}
],
"presets": [
{
"name": "Featured Collection"
}
]
}
{% endschema %}
```
### JSON Templates
- Use JSON templates for flexible page layouts
- Define template sections in JSON format
- Allow merchants to customize through theme editor
## JavaScript Best Practices
### Theme JavaScript
- Use modern ES6+ syntax
- Implement proper event delegation
- Lazy load non-critical scripts
- Use Shopify's Section Rendering API for dynamic updates
### Cart Functionality
```javascript
// Add to cart with Fetch API
async function addToCart(variantId, quantity = 1) {
const response = await fetch('/cart/add.js', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
id: variantId,
quantity: quantity,
}),
});
return response.json();
}
```
## CSS and Styling
- Use CSS custom properties for theming
- Implement mobile-first responsive design
- Leverage CSS Grid and Flexbox for layouts
- Minimize render-blocking CSS
- Use logical properties for internationalization
## Performance Optimization
- Optimize images with Shopify's image CDN
- Implement lazy loading for images and sections
- Minimize Liquid loops and complex calculations
- Use `preload` for critical assets
- Monitor Core Web Vitals (LCP, FID, CLS)
### Image Optimization
```liquid
{{ product.featured_image | image_url: width: 800 | image_tag:
loading: 'lazy',
widths: '200, 400, 600, 800',
sizes: '(max-width: 600px) 100vw, 50vw'
}}
```
## Accessibility
- Use semantic HTML elements
- Implement proper ARIA attributes
- Ensure keyboard navigation
- Maintain color contrast ratios
- Test with screen readers
## Theme Settings
- Organize settings logically in settings_schema.json
- Provide sensible defaults
- Use appropriate setting types
- Include helpful info text for merchants
## Metafields
- Use metafields for custom product data
- Access metafields efficiently in templates
- Define metafield definitions in theme
## Testing
- Test across browsers and devices
- Validate Liquid syntax
- Check accessibility compliance
- Monitor performance metrics
- Test checkout flow thoroughly
## File Structure
```
theme/
├── assets/
├── config/
│ ├── settings_data.json
│ └── settings_schema.json
├── layout/
│ └── theme.liquid
├── locales/
├── sections/
├── snippets/
└── templates/
├── customers/
└── *.json
```
© Mindrally · Apache-2.0 · Mindrally/skills
Похожие скиллы
Всё по теме «Фронтенд и UI» →Сначала — shopify от других авторов.