AI Blocks › Make your store load fast
Theme script and style loader
Give it your theme.liquid, apps and fonts. Get scripts delayed or deferred, styles unblocked and fonts set safely.
Theme script and style loader is a free AI skill for the job "Make your store load fast". Give the instructions to an AI assistant that supports the required files and tools, then review its output.
Free · No account · Made by AI Blocks · Level: advanced · Thinking: high
What it does
Scripts and styles that load before the page is drawn make shoppers stare at a blank screen. Apps are a common cause: chat, reviews, loyalty and cookie tools all load their code on every page, even though few people see them in the first screen. This skill sorts your scripts into three groups: must load early (tracking tags and anything in the first screen), can wait (chat, lower-page widgets, loyalty), and can load later with a defer or async tag. It writes the code to hold chosen scripts until the first scroll, tap or key press, unblocks non-critical stylesheets, moves libraries onto your own store files, and sets font rules so text shows at once. Every change comes with a test, and nothing is applied to your live theme. Gains in demos were large, but those stores had many heavy apps, so a lean store gains less.
You give it
- Your theme.liquid and the theme editor's app embeds list
- The PageSpeed blocking time, unused JavaScript and render-blocking sections
- Which apps are visible in the first screen, and which are tracking tags
- Your list of custom fonts (optional)
- Audit report (optional)
You get
- Theme code that holds chosen scripts back until the first visit action
- Edited tags for each script and stylesheet, with the reason
- Font rules with swap and a close fallback
- A list of what was delayed, what was left alone and why, plus a test list for every change
Use it when
- Blocking time is your biggest problem on mobile.
- PageSpeed lists render-blocking scripts or styles, or a custom font makes text invisible or jump.
- You need to keep apps that aren't needed in the first screen.
How to use it
- Start a chat with the skill. Open it if you added it to your AI, or copy it and paste it in.
- Duplicate your theme first: Online Store, Themes, the three dots, Duplicate. Edit only the copy.
- Paste theme.liquid and the PageSpeed sections, and mark which apps appear in the first screen.
- Make one change at a time on the copy. After each, refresh with the console open, move the mouse, and test the cart, variant picker, search, reviews and checkout.
- Run PageSpeed three times and average, then publish the copy only when everything works.