schema-architect
Intelligently generates and validates Shopify Liquid Schema JSON based on Liquid logic.
When & Why to Use This Skill
Schema Architect is a specialized developer tool designed to automate the creation and validation of Shopify Liquid Schema JSON. By intelligently analyzing Liquid logic, it eliminates the manual overhead of writing complex schema blocks, ensures syntax accuracy, and automatically infers appropriate setting types (like image_pickers or checkboxes) based on variable usage, significantly streamlining Shopify theme development.
Use Cases
- Automating the generation of complex {% schema %} blocks for new Shopify sections to ensure 100% valid JSON syntax.
- Converting static Liquid templates into dynamic sections by automatically mapping variables to Shopify's theme editor settings.
- Debugging and fixing type mismatches or structural errors in existing Shopify section schemas by cross-referencing them with Liquid code logic.
- Accelerating the development workflow for Shopify developers by reducing the time spent on repetitive configuration tasks.
| name | Schema Architect |
|---|---|
| version | 1.0.0 |
| description | Intelligently generates and validates Shopify Liquid Schema JSON based on Liquid logic. |
Capabilities
This skill abstracts the complexity of writing valid JSON schema for Shopify sections. Not only does it fix syntax errors, but it also intelligently infers the type of settings required based on how variables are used in the liquid code.
Tools Usage Guide
1. generate_schema
Analyzes Liquid code and produces a valid {% schema %}...{% endschema %} block.
- Param
liquid_content: The full liquid content of a section file. - Returns: A JSON object containing the suggested schema.
Example
Input:
<h1>{{ section.settings.heading }}</h1>
{% if section.settings.show_image %}
<img src="{{ section.settings.image | image_url }}" />
{% endif %}
Output:
{
"name": "Generated Section",
"settings": [
{
"type": "text",
"id": "heading",
"label": "Heading",
"default": "Default Heading"
},
{
"type": "checkbox",
"id": "show_image",
"label": "Show Image",
"default": true
},
{
"type": "image_picker",
"id": "image",
"label": "Image"
}
]
}