Token导航 LogoToken导航

Agent Skill · 前端设计

shopify-theme-development(Shopify 主题开发)

shopify-theme-development 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

shopify-theme-development 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在前端设计类的 10,216 个 Skill 里排第 6,283。

总安装 533周安装 22GitHub Stars 19下载 174核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:shopify-theme-development(Shopify 主题开发)
来源仓库:https://github.com/finsilabs/awesome-ecommerce-skills
仓库路径:skills/shopify-theme-development
安装命令:
npx skills add https://github.com/finsilabs/awesome-ecommerce-skills --skill shopify-theme-development
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/finsilabs/awesome-ecommerce-skills --skill shopify-theme-development

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

用于处理 Shopify 主题开发过程中的协作信息与变更追踪任务。适合在 Issue、Pull Request 或代码评审中整理主题相关讨论与修改点。通过 npx 命令安装,集成于支持技能扩展的 AI 编程工具链。使用时应注意主题文件的读写权限,避免误删关键配置文件。

shopify-theme-development 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/shopify-theme-development

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/finsilabs/awesome-ecommerce-skills --skill sho…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

shopify-theme-development 怎么安装?

在终端执行 npx skills add https://github.com/finsilabs/awesome-ecommerce-skills --skill shopify-theme…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

shopify-theme-development 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

shopify-theme-development 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

shopify-theme-development 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

shopify-theme-development 用的人多吗?

公开数据是累计安装 533 次,近一周安装 22 次,下载 174 次,GitHub 19 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

shopify-theme-development 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
shopify-theme-development

Shopify 主题开发 · 本页

53319需要联网未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Shopify Theme Development

Overview

Build and customize Shopify themes using Liquid templating, JSON templates, sections and blocks for merchant-customizable layouts, and theme app extensions for app integrations. This skill covers the Shopify theme architecture (Online Store 2.0), the Shopify CLI development workflow, performance optimization with lazy loading and critical CSS, and patterns for building flexible sections that merchants can configure through the theme editor.

When to Use This Skill

  • When building a new Shopify theme from scratch or forking Dawn
  • When creating custom sections and blocks for the theme editor
  • When implementing product pages, collection grids, or cart functionality in Liquid
  • When optimizing a Shopify theme for Core Web Vitals and speed
  • When building theme app extensions to inject app content into themes

Core Instructions

  1. Set up the development environment with Shopify CLI # Install Shopify CLI npm install -g @shopify/cli @shopify/theme # Initialize a new theme (or clone Dawn) shopify theme init my-theme # Start development server with hot reload shopify theme dev --store=your-store.myshopify.com Theme directory structure (Online Store 2.0): my-theme/ ├── assets/ # CSS, JS, images ├── config/ # settings_schema.json, settings_data.json ├── layout/ # theme.liquid (main layout) ├── locales/ # Translation files ├── sections/ # Sections (reusable, merchant-configurable) ├── snippets/ # Partials (reusable Liquid fragments) └── templates/ # JSON templates referencing sections ├── product.json ├── collection.json └── index.json
  2. Create a JSON template with sections // templates/product.json {"sections": {"main": {"type": "main-product", "settings": {}}, "recommendations": {"type": "product-recommendations", "settings": {"heading": "You may also like", "products_to_show": 4}}, "reviews": {"type": "product-reviews", "settings": {}}}, "order": ["main", "recommendations", "reviews"]}
  3. Build a customizable product section with blocks {% comment %} sections/main-product.liquid {% endcomment %} <section class="product-section" data-section-id="{{section.id}}"> <div class="product-grid"> <div class="product-media"> {% for media in product.media %} {% case media.media_type %} {% when 'image' %} <div class="product-media-item {% if forloop.first %}active{% endif %}"> {{media | image_url: width: 800 | image_tag: loading: 'lazy', widths: '200,400,600,800,1000', sizes: '(min-width: 768px) 50vw, 100vw', class: 'product-image'}} </div> {% when 'video' %} <div class="product-media-item"> {{media | video_tag: autoplay: false, controls: true}} </div> {% endcase %} {% endfor %} </div> <div class="product-info"> {% for block in section.blocks %} {% case block.type %} {% when 'title' %} <h1 class="product-title" {{block.shopify_attributes}}> {{product.title}} </h1> {% when 'price' %} <div class="product-price" {{block.shopify_attributes}}> {% if product.compare_at_price > product.price %} <s class="price-compare">{{product.compare_at_price | money}}</s> {% endif %} <span class="price-current">{{product.price | money}}</span> {% if product.compare_at_price > product.price %} <span class="price-badge">Sale</span> {% endif %} </div> {% when 'variant_picker' %} <div class="variant-picker" {{block.shopify_attributes}}> {% for option in product.options_with_values %} <fieldset class="option-group"> <legend>{{option.name}}</legend> {% for value in option.values %} <label class="option-label"> <input type="radio" name="{{option.name}}" value="{{value}}" {% if option.selected_value == value %}checked{% endif %} > <span>{{value}}</span> </label> {% endfor %} </fieldset> {% endfor %} </div> {% when 'buy_buttons' %} <div class="buy-buttons" {{block.shopify_attributes}}> {% form 'product', product %} <input type="hidden" name="id" value="{{product.selected_or_first_available_variant.id}}"> <div class="quantity-selector"> <label for="quantity">Quantity</label> <input type="number" id="quantity" name="quantity" value="1" min="1"> </div> <button type="submit" class="btn btn-primary add-to-cart" {% unless product.selected_or_first_available_variant.available %}disabled{% endunless %} > {% if product.selected_or_first_available_variant.available %} Add to cart — {{product.selected_or_first_available_variant.price | money}} {% else %} Sold out {% endif %} </button> {% endform %} </div> {% when 'description' %} <div class="product-description" {{block.shopify_attributes}}> {{product.description}} </div> {% when 'custom_text' %} <div class="custom-text" {{block.shopify_attributes}}> {{block.settings.text}} </div> {% endcase %} {% endfor %} </div> </div> </section> {% schema %} {"name": "Product Page", "tag": "section", "class": "section-product", "blocks": [{"type": "title", "name": "Title", "limit": 1}, {"type": "price", "name": "Price", "limit": 1}, {"type": "variant_picker", "name": "Variant Picker", "limit": 1}, {"type": "buy_buttons", "name": "Buy Buttons", "limit": 1}, {"type": "description", "name": "Description", "limit": 1}, {"type": "custom_text", "name": "Custom Text", "settings": [{"type": "richtext", "id": "text", "label": "Text"}]}], "presets": [{"name": "Product Page", "blocks": [{"type": "title"}, {"type": "price"}, {"type": "variant_picker"}, {"type": "buy_buttons"}, {"type": "description"}]}]} {% endschema %}
  4. Implement AJAX cart with the Cart API // assets/cart.js class CartManager {async addItem(variantId, quantity = 1) {const response = await fetch('/cart/add.js', {method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({items: [{id: variantId, quantity}],}),}); if (!response.ok) {const error = await response.json(); throw new Error(error.description || 'Could not add to cart');} const data = await response.json(); this.updateCartUI(); return data;} async updateQuantity(lineKey, quantity) {const response = await fetch('/cart/change.js', {method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({id: lineKey, quantity}),}); const cart = await response.json(); this.updateCartUI(cart); return cart;} async getCart() {const response = await fetch('/cart.js'); return response.json();} async updateCartUI(cart) {cart = cart || await this.getCart(); // Update cart count badge const badge = document.querySelector('[data-cart-count]'); if (badge) badge.textContent = cart.item_count; // Update cart drawer if open const drawer = document.querySelector('cart-drawer'); if (drawer) drawer.render(cart);}} window.cart = new CartManager();
  5. Optimize for performance {% comment %} layout/theme.liquid — Critical performance optimizations {% endcomment %} <!doctype html> <html lang="{{request.locale.iso_code}}"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- Preconnect to Shopify CDN --> <link rel="preconnect" href="https://cdn.shopify.com" crossorigin> <link rel="preconnect" href="https://fonts.shopifycdn.com" crossorigin> <!-- Preload critical assets --> {% if template.name == 'product' %} {% assign hero_image = product.featured_image %} {% if hero_image %} <link rel="preload" as="image" href="{{hero_image | image_url: width: 800}}" imagesrcset="{{hero_image | image_url: width: 400}} 400w, {{hero_image | image_url: width: 800}} 800w" imagesizes="(min-width: 768px) 50vw, 100vw" > {% endif %} {% endif %} <!-- Inline critical CSS --> <style> {{'critical.css' | asset_url | stylesheet_tag | split: '<link' | first}} </style> <!-- Defer non-critical CSS --> <link rel="stylesheet" href="{{'theme.css' | asset_url}}" media="print" onload="this.media='all'"> <noscript><link rel="stylesheet" href="{{'theme.css' | asset_url}}"></noscript> {{content_for_header}} </head> <body> {{content_for_layout}} <!-- Defer JavaScript --> <script src="{{'theme.js' | asset_url}}" defer></script> </body> </html>
  6. Create a theme app extension # Generate a theme app extension block shopify app generate extension --type theme_app_extension --name my-app-block {% comment %} extensions/my-app-block/blocks/product-badge.liquid {% endcomment %} <div class="app-product-badge" {{block.shopify_attributes}}> {% if block.settings.badge_text!= blank %} <span class="badge" style="background-color: {{block.settings.badge_color}}; color: {{block.settings.text_color}};" > {{block.settings.badge_text}} </span> {% endif %} </div> {% schema %} {"name": "Product Badge", "target": "section", "settings": [{"type": "text", "id": "badge_text", "label": "Badge text", "default": "New"}, {"type": "color", "id": "badge_color", "label": "Badge color", "default": "#FF0000"}, {"type": "color", "id": "text_color", "label": "Text color", "default": "#FFFFFF"}]} {% endschema %}

Examples

Collection grid with lazy-loaded images

{% comment %} sections/collection-grid.liquid {% endcomment %}
<section class="collection-grid">
  <h1>{{ collection.title }}</h1>

  <div class="product-grid" role="list">
    {% paginate collection.products by 24 %}
      {% for product in collection.products %}
        <div class="product-card" role="listitem">
          <a href="{{ product.url }}">
            {% if product.featured_image %}
              {{ product.featured_image | image_url: width: 400 | image_tag:
                loading: 'lazy',
                widths: '200,300,400',
                sizes: '(min-width: 1024px) 25vw, (min-width: 768px) 33vw, 50vw',
                class: 'product-card-image'
              }}
            {% endif %}
            <h2 class="product-card-title">{{ product.title }}</h2>
            <p class="product-card-price">{{ product.price | money }}</p>
          </a>
        </div>
      {% endfor %}

      {% if paginate.pages > 1 %}
        <nav class="pagination" aria-label="Pagination">
          {{ paginate | default_pagination: next: 'Next', previous: 'Previous' }}
        </nav>
      {% endif %}
    {% endpaginate %}
  </div>
</section>

Variant change with JavaScript

// assets/variant-selector.js
class VariantSelector extends HTMLElement {
  connectedCallback() {
    this.addEventListener('change', this.onVariantChange.bind(this));
    this.productData = JSON.parse(
      this.querySelector('[type="application/json"]').textContent
    );
  }

  onVariantChange() {
    const selectedOptions = [...this.querySelectorAll('input:checked')].map(
      input => input.value
    );

    const variant = this.productData.variants.find(v =>
      v.options.every((opt, i) => opt === selectedOptions[i])
    );

    if (!variant) return;

    // Update URL without reload
    const url = new URL(window.location);
    url.searchParams.set('variant', variant.id);
    window.history.replaceState({}, '', url);

    // Update price display
    const priceEl = document.querySelector('.price-current');
    if (priceEl) {
      priceEl.textContent = this.formatMoney(variant.price);
    }

    // Update add-to-cart button
    const addToCart = document.querySelector('.add-to-cart');
    const idInput = document.querySelector('input[name="id"]');
    if (addToCart && idInput) {
      idInput.value = variant.id;
      addToCart.disabled = !variant.available;
      addToCart.textContent = variant.available ? 'Add to cart' : 'Sold out';
    }
  }

  formatMoney(cents) {
    return '$' + (cents / 100).toFixed(2);
  }
}

customElements.define('variant-selector', VariantSelector);

Best Practices

  • Use Online Store 2.0 JSON templates — they enable merchants to add, remove, and reorder sections without editing code
  • Leverage the image_url and image_tag filters — they generate responsive srcset attributes automatically from Shopify's CDN
  • Always include {{block.shopify_attributes}} — this data attribute is required for the theme editor to identify and select blocks
  • Defer all JavaScript — use defer or type="module" on script tags; avoid render-blocking JS
  • Use Shopify's native Liquid filters — | money, | image_url, | asset_url are optimized and handle edge cases; don't reinvent them
  • Provide section presets — presets define the default state when a merchant adds a section; without them, the section won't appear in "Add section"
  • Keep sections under 50KB of Liquid — large sections slow down the Liquid renderer; extract reusable code into snippets
  • Test on Shopify's staging theme — always preview changes on an unpublished theme before deploying to the live theme

Common Pitfalls

ProblemSolution
Section not appearing in "Add section" menuEnsure the section has a presets array in its {% schema %}; sections without presets are only available in JSON templates
Theme editor shows "Error rendering section"Check for Liquid syntax errors; use shopify theme check to lint your Liquid code
Images not loading on Shopify CDNUse image_url filter with explicit width parameter; the old img_url filter is deprecated
Cart count badge not updating after AJAX addFetch /cart.js after every cart mutation and update the badge; don't rely on the response from add.js alone
Slow Largest Contentful Paint (LCP)Preload the hero/product image in <head> using <link rel="preload" as="image">; inline critical CSS
Metafields not accessible in LiquidEnsure metafield definitions are created in Shopify admin; access via product.metafields.namespace.key

Related Skills

  • @product-page-design
  • @ecommerce-seo
  • @ecommerce-caching
  • @storefront-performance
  • @shopify-app-development

平台分布

Codex

35.57%
按下载量换算62

Claude

27.64%
按下载量换算48

Cursor

18.72%
按下载量换算33

Gemini CLI

8.37%
按下载量换算15

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills