AI Theme Workflows
AI works best when it follows the same control-plane loop as a careful developer:Good AI Tasks
Good:- “Find the hero section and change only the CTA copy.”
- “Add a testimonials section using the same spacing as the feature section.”
- “Fix the Liquid validation error, then preview.”
- “Update the product card markup but keep platform cart behavior.”
- “Rewrite the whole storefront.”
- “Change anything you think looks bad.”
- “Bypass validation.”
- “Move checkout logic into the theme.”
Required Scopes
Use an API key with:themes.readthemes.write
themes.read alone.
CLI Workflow
Local AI Handoff Workflow
Use this when a human starts work, an AI edits locally, and another human or AI reviews it.AI pulls and inspects
The assistant runs
theme list, theme pull, theme inspect, then reads only the relevant Liquid files.AI runs local preview
The assistant starts
shoppex theme dev and uses fixture data unless the change depends on real catalog, stock, product detail, or settings data.AI validates and previews
The assistant runs
shoppex theme validate --include-typecheck and shoppex theme push --preview --include-typecheck.MCP Workflow
Set:theme.inspecttheme.search_filestheme.read_filetheme.applytheme.create_sectiontheme.create_pagetheme.update_configtheme.validatetheme.previewtheme.publish
Liquid-Specific Prompt Rules
Tell the assistant:- Keep templates presentational.
- Preserve
data-builder-blockanddata-builder-block-type. - Use static
{% render "snippets/name" %}calls only. - Use
safe_hreffor user URLs. - Use
| rawonly for platform-owned HTML. - Do not compute stock, price, sorting, or checkout rules in Liquid.
- If a new file is added, declare it in
theme-package.json. - Keep platform commerce hooks and data attributes intact.
- Prefer preview over publish unless the prompt explicitly says publish.
Inspect the theme, find the product card snippet, and adjust only the badge layout. Keep the existing platform data attributes and cart behavior. Validate and start a preview.
Handoff Block
At the end of a non-trivial AI theme session, ask the assistant to leave this:Review Before Publish
Before publishing, check:- validation passed
- preview URL shows the change
- cart and checkout still work
- no unsafe Liquid or dynamic partials were added
diffmatches the intended change
Next Steps
Editing Themes
Shared dashboard, CLI, Dev API, and MCP workflow.
Core Contract
Liquid responsibilities and safety rules.