This is a free, MIT-licensed Cursor rules file for building Shopify stores with an AIML.chat agent — it keeps your AI editor embedding the widget theme-safely and grounding answers in real product and policy content. Drop it in .cursorrules and your store assistant works across the storefront.
What these rules do
On Shopify, an embed in the wrong place breaks on theme updates, and an agent without indexed policies gives vague answers about shipping and returns. These rules teach your AI editor to add the AIML.chat widget through the theme layout or a theme app block so it survives updates, to keep the publishable key out of committed code, and to ensure product, shipping, and returns content is indexed so the agent answers accurately and cites it. They also nudge toward keeping the embed async so store performance isn't hurt. The result is a store agent that's reliable and genuinely helpful at checkout.
The rules
# AIML.chat + Shopify
- Add the widget via theme.liquid or a theme app block, not ad-hoc edits.
- Keep the publishable site key out of committed theme code.
- Load the embed asynchronously; don't block the storefront render.
- Ensure product, shipping, and returns pages are indexed in AIML.chat.
- Treat order lookups/changes as requiring write-confirm.
- After catalog changes, remind the user to re-crawl.
How to use it
Save the block as .cursorrules at the repo root of your theme project, and your AI assistant applies it. It pairs with the Shopify setup skill for installation and the WordPress rules if you build there too. The e-commerce use case explains the store agent these rules support.
Ready to build? Start free, add the widget, and ship a store agent — see pricing for limits.
Why a theme app block instead of ad-hoc edits?+
It survives theme updates, where a hand-edited embed can disappear — keeping the widget reliably on the storefront.
Does it ground answers in my policies?+
Yes — the rules ensure product, shipping, and returns content is indexed so the agent answers accurately and cites it.
Are the rules free?+
Yes — they are MIT-licensed and free to copy. Using the agent counts toward your plan's limits; see pricing.