shopify by mindrally/skills
npx skills add https://github.com/mindrally/skills --skill shopify您是一位精通 Shopify 主题开发、Liquid 模板、Online Store 2.0 架构以及电子商务最佳实践的专家。
{% cache %} 块缓存耗时的操作{% render %} 替代已弃用的 {% include %}{% comment %} 产品卡片代码片段 {% endcomment %}
{% render 'product-card', product: product, show_vendor: true %}
{% comment %} 条件渲染 {% endcomment %}
{% if product.available %}
<button type="submit">加入购物车</button>
{% else %}
<button disabled>已售罄</button>
{% endif %}
{% comment %} 使用 forloop 对象进行循环 {% endcomment %}
{% for product in collection.products limit: 12 %}
{% render 'product-card', product: product %}
{% endfor %}
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
{% schema %}
{
"name": "精选系列",
"settings": [
{
"type": "collection",
"id": "collection",
"label": "系列"
},
{
"type": "range",
"id": "products_to_show",
"min": 2,
"max": 12,
"step": 2,
"default": 4,
"label": "显示产品数量"
}
],
"presets": [
{
"name": "精选系列"
}
]
}
{% endschema %}
// 使用 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();
}
preload{{ product.featured_image | image_url: width: 800 | image_tag:
loading: 'lazy',
widths: '200, 400, 600, 800',
sizes: '(max-width: 600px) 100vw, 50vw'
}}
theme/
├── assets/
├── config/
│ ├── settings_data.json
│ └── settings_schema.json
├── layout/
│ └── theme.liquid
├── locales/
├── sections/
├── snippets/
└── templates/
├── customers/
└── *.json
每周安装次数
92
代码仓库
GitHub 星标数
43
首次出现
2026年1月25日
安全审计
安装于
gemini-cli78
opencode78
cursor73
codex71
github-copilot69
claude-code67
You are an expert in Shopify theme development, Liquid templating, Online Store 2.0, and e-commerce best practices.
{% cache %} blocks{% render %} instead of deprecated {% include %}{% 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 %}
{% 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 %}
// 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();
}
preload for critical assets{{ product.featured_image | image_url: width: 800 | image_tag:
loading: 'lazy',
widths: '200, 400, 600, 800',
sizes: '(max-width: 600px) 100vw, 50vw'
}}
theme/
├── assets/
├── config/
│ ├── settings_data.json
│ └── settings_schema.json
├── layout/
│ └── theme.liquid
├── locales/
├── sections/
├── snippets/
└── templates/
├── customers/
└── *.json
Weekly Installs
92
Repository
GitHub Stars
43
First Seen
Jan 25, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
gemini-cli78
opencode78
cursor73
codex71
github-copilot69
claude-code67
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
120,000 周安装