Token导航 LogoToken导航TokenDH.com
研究检索只读github未标认证来源可访问许可证需确认审计通过

theme-skill主题技巧

Agent Skill

theme-skill 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

235

周安装

10

GitHub Stars

8

下载量

82
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/brickspacelab/theme-skill --skill theme-skill

简介

theme-skill 用于查找、检索和筛选相关信息,适合快速定位候选结果。

  • 适用于根据关键词或任务场景从来源线索中获取信息,提升研究效率。
  • 通过 npx skills add 命令从 GitHub 仓库安装,需结合原始 README 确认具体用法。
  • 安装前建议确认权限范围和维护状态,注意是否触发联网或文件读写操作。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

When to use

Use when the task involves Shopify JSON templates under templates/ (e.g. product.json, index.json, alternates like page.contact.json), or section JSON that references theme blocks from blocks/ in block-based themes.

This skill alone does not fully cover:

  • config/settings_schema.json or config/settings_data.json (global theme settings)
  • Checkout branding or Checkout UI extensions
  • Theme app extension code under extensions/
  • Replacing Liquid .liquid templates where the theme has not adopted JSON for that route

If the theme uses a build step that generates sections/ or blocks/, read that theme’s README and follow its source-of-truth paths before editing compiled output.

Quick start

  1. Understand requirements — Parse prompts or images for layout, columns/rows, content types, and styling (see Design images and mockups when the input is visual).
  2. Discover allowed block types — List blocks/ and read parent {% schema %} so every type you use exists in this theme (required; see below).
  3. (Optional) Check bundled examples — If examples/ is present, follow Choosing the best example to reference in examples/README.md: compare the workspace theme to each indexed example and open at most one best-matched file. If nothing fits, copy patterns from existing templates/*.json in the workspace theme instead. Never emit type strings from a bundled example until they appear in the target theme’s allowed set.
  4. Map to real blocks — Choose types only from that allowed set; resolve section type from sections/*.liquid for template-level JSON.
  5. Analyze schemas — Read each block or section {% schema %} for allowed children, setting IDs, types, defaults, and presets.
  6. Compile JSON — Build valid sections, nested blocks, and order / block_order arrays per Shopify’s template structure.
  7. Validate — Run the checklist below before finishing.

Workflow

Step 1 — Understand user requirements

From text:

  • Layout: grid, flex, slider, inline, etc.
  • Column/row counts
  • Content: images, buttons, text, product cards, etc.
  • Styling: spacing, colors, responsive behavior

From images:

  • Visual layout, columns and rows, elements and relationships, spacing and alignment
  • Visual hierarchy (headline vs body vs CTAs), approximate alignment (left/center/right), and content categories (hero, cards, logos, footer, etc.)
  • What is ambiguous — Exact breakpoints, font sizes, and pixel spacing are not reliably readable from a static image; call that out instead of guessing.

Design images and mockups

When the user provides a screenshot, Figma export, or design mockup:

  • Extract: structure (sections, columns, stacking order), content types, and qualitative spacing rhythm (tight vs airy), not exact pixel values unless provided separately.
  • Do not infer concrete Shopify type strings, setting keys, or enum values from the image alone. Always reconcile with Discover allowed block types on the target theme.
  • Limits: JSON templates do not express every visual detail. Arbitrary typography, one-off CSS, or global palette changes may require theme settings, section settings, or custom CSS outside the core JSON-template workflow—say so when the design cannot be matched with schema-defined settings only.
  • If the design cannot be built with the theme’s available blocks and settings, state the gap and offer the closest achievable structure.

Step 2 — Discover allowed block types

Do this before naming or emitting any type in JSON. This is the operational way to satisfy the validation rule that every type exists in the theme.

  1. List files in blocks/ — For themes using theme blocks, the basename of blocks/<name>.liquid is typically a valid block type (confirm in schema).
  2. Read {% schema %} on each section you add or edit in the template, and on each block file you nest. Collect every block type the parent allows (specific types, @theme, @app, etc., per Shopify rules for that parent). _-prefix caveat: Blocks whose filename starts with _ (e.g. _stat-bar.liquid) may not be matched by @theme in a parent schema, even if they have presets. Shopify theme check treats _-prefixed blocks as private/static and may require them to be explicitly listed in the parent’s blocks array. Before nesting a _-prefixed block inside a parent that only declares @theme, verify by checking existing templates or presets for a precedent. If none exists, the parent schema needs a new {"type": "_block-name"} entry—which is a Liquid edit, not a JSON-only change.
  3. Build the allowed set — Union of: types from blocks/ that the parent schema permits, types declared in the parent’s blocks array, and section type values from sections/<type>.liquid for template-level sections.
  4. Only use types in that set. If the user asks for a layout that no block provides, propose the closest real types, copy a working template in the same theme, or note that adding a new block is theme development work outside JSON-only edits.

Step 3 — Check bundled examples (optional)

If examples/ is present in this skill package, follow Choosing the best example to reference in examples/README.md:

  • Compare the workspace theme to each indexed example (theme name, README, overlap between blocks/ basenames and the example’s described types).
  • Open at most one best-matched file for patterns and sample JSON.
  • If nothing fits, copy patterns from existing templates/*.json in the workspace theme instead.
  • Never emit type strings from a bundled example until they appear in the target theme’s allowed set.

Step 4 — Map requirements to real blocks

Within the allowed type set from Step 2:

  • Search the theme’s blocks/ directory and section schemas for blocks that match the layout and content needs.
  • For template-level sections, list sections/ and map JSON type to section files (usually basename of sections/<type>.liquid).

Step 5 — Analyze block and section schemas

For each block or section, read {% schema %}:

  1. Nested blocks"blocks": [{"type": "@theme"}] vs specific types vs "blocks": [].
  2. Settings — Required vs optional, defaults, types. Pay attention to:

- range — Values must land on min + (N * step). A range with min: 10, max: 48, step: 2 rejects 13 (use 14). - select — Values must exactly match one of the options[].value strings. Do not invent values even if they look like valid CSS—only the listed options pass validation. - visible_if — Settings gated by visible_if may still be validated even when hidden. Prefer omitting them entirely rather than setting values that won't take effect (e.g. don't set font_size when type_preset!= 'custom').

  1. Presets — Recommended configurations.

Step 6 — Compile JSON structure

Follow Shopify’s JSON template shape. If the theme ships Cursor rules (e.g. .cursor/rules/templates.mdc, blocks.mdc, schemas.mdc), follow those for the project you are editing.

Template structure:

{
  "sections": {
    "<sectionId>": {
      "type": "<sectionType>",
      "settings": {},
      "blocks": {
        "<blockId>": {
          "type": "<blockType>",
          "name": "t:blocks.block_name",
          "settings": {},
          "blocks": {},
          "block_order": []
        }
      },
      "block_order": ["<blockId>"]
    }
  },
  "order": ["<sectionId>"]
}

Block instance IDs:

  • Use descriptive prefixes that reflect role (e.g. layout, container, item, image, text)—match conventions you see in the theme’s existing JSON.
  • Append a short unique suffix if needed.
  • Keep IDs unique within the template (and within each nested blocks scope per schema rules).

Settings (block-based themes):

  • Grids often use row_desktop, row_mobile, gap_size, enable_x_paddingonly if those keys exist in the target schema.
  • Prefer translation keys for block name when the theme does: e.g. "t:blocks.image".
  • Align color_scheme and spacing with the theme’s design system.

Richtext content rules:

Shopify sanitizes HTML in richtext and text (rich) settings. Only a limited set of tags and attributes are allowed:

  • Allowed tags: p, h1h6, ul, ol, li, a, br, strong, em, span
  • No style attributes<span style="color: red"> will be stripped. Use <em> or <strong> tags instead, then add CSS rules in the section/block stylesheet targeting those tags (e.g. .my-section em {color: var(--accent); font-style: normal;}).
  • No class attributes on inline elements in richtext.
  • If the design requires colored text within a single text block, this is a CSS customization gap—note it and add a stylesheet rule rather than using inline styles.

Step 7 — Validate

Run the Validation checklist below before finishing.

  • JSON is valid
  • Section and block instance IDs are unique in scope
  • Every block_order matches the keys in its sibling blocks object
  • Top-level order lists every section key to render
  • Each type exists in sections/ or blocks/ and is allowed by the parent schema
  • Nested block types are valid for the parent
  • Setting keys and value types match {% schema %}
  • Range values land on valid steps (min + N*step)
  • Select values match an options[].value exactly
  • No style or class attributes in richtext content strings
  • _-prefixed blocks are explicitly listed (not just @theme) in every parent they nest inside

Error handling

ProblemWhat to do
Block/section not foundSearch blocks/ and sections/; suggest close matches
Invalid nestingRe-read parent {% schema %} blocks array
_ block not allowedBlock has _ prefix; add it explicitly to parent schema blocks array—@theme won't match it
style attr strippedShopify sanitizes richtext; use <em>/<strong> + CSS instead of inline styles
Range step violationRead the schema step value; round your value to the nearest valid step
Invalid select valueOnly use values from the schema options array; don't invent CSS expressions
Schema too largeCopy patterns from a working template in the same theme
Ambiguous requestAsk which template file and which section/block instances change
Generated theme outputEdit source per theme docs, then build

Further reading

FilePurpose
reference/shopify.mdOfficial docs links, filenames, platform limits
examples/README.mdHow to pick a bundled theme example; index of files
docs/adding-theme-support.mdTheme partners: add bundled block standards under examples/

In a theme repository, also use project rules such as templates.mdc, blocks.mdc, and schemas.mdc when present under .agent/rules/.

Sources

These are the Shopify documentation pages this skill's content is derived from. When Shopify updates these pages, review the corresponding sections above (indicated by <!-- source:... --> comments).

Shopify docSections in this file
Theme architectureWhen to use this skill
JSON templatesStep 4 — Compile JSON structure, Validation checklist
SectionsDiscover allowed block types, Step 3 — Analyze schemas
Section schemaDiscover allowed block types, Step 3 — Analyze schemas
BlocksDiscover allowed block types
Theme blocksDiscover allowed block types, Step 3 — Analyze schemas

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.63%
按下载量换算28

Claude

31.78%
按下载量换算26

Cursor

17.54%
按下载量换算14

Gemini CLI

10.21%
按下载量换算8

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

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

来源信息

继续浏览同类 Skills