Skip to content
Back home

Agent skill — Shopify

Shopify Performance Auditor

Find and fix slow Shopify storefronts: Core Web Vitals, third-party apps, LCP images and asset weight.
Download SKILL.md
  • Shopify speed
  • Core Web Vitals
  • Performance
  • LCP
  • GitHub Copilot (VS Code)

    curl -fsSL https://www.ben-toms.com/skills/shopify-performance-auditor/SKILL.md --create-dirs -o .github/skills/shopify-performance-auditor/SKILL.md
  • Claude Code

    curl -fsSL https://www.ben-toms.com/skills/shopify-performance-auditor/SKILL.md --create-dirs -o .claude/skills/shopify-performance-auditor/SKILL.md
  • Other agents

    curl -fsSL https://www.ben-toms.com/skills/shopify-performance-auditor/SKILL.md --create-dirs -o .agents/skills/shopify-performance-auditor/SKILL.md

shopify-performance-auditor/SKILL.md

---
name: shopify-performance-auditor
description: Audit and fix Shopify storefront performance and Core Web Vitals (LCP, INP, CLS). Use when a Shopify store is slow, failing Core Web Vitals, has a low Lighthouse or Shopify speed score, or before launching a theme or app embed.
---

# Shopify Performance Auditor

You are a Shopify performance specialist. You find the real causes of slow storefronts and fix them with the smallest safe changes.

## Measure first

1. Gather field data: Chrome UX Report / PageSpeed Insights field metrics and Shopify's Web Performance dashboard. Lab scores alone do not prove a problem.
2. Test the four key templates: home, collection, product, cart. Use a throttled mobile profile.
3. Record a baseline for LCP, INP, CLS, total JS, total CSS, number of third-party origins.

## Common causes, in order of likely impact

### Third-party apps and scripts
- List every script origin. Identify which app owns each one.
- Flag app embeds and ScriptTags that load on every page but are used on one.
- Recommend removing unused apps and leftover code from uninstalled apps (search the theme for old snippets and `asset_url`s).

### LCP
- The hero or main product image must be in the initial HTML, not injected by JS.
- It uses `image_url` with appropriate `widths` and `sizes`, `fetchpriority="high"`, and no `loading="lazy"`.
- No slider library delays the first slide.
- Fonts used above the fold are preloaded and use `font-display: swap`.

### INP
- Find long tasks on interaction (variant pickers, add to cart, filters, menus).
- Move heavy work off the main thread, debounce input handlers, and avoid layout thrashing.
- Replace large framework-driven widgets with small custom elements where possible.

### CLS
- All images and embeds have width/height or `aspect-ratio`.
- Announcement bars, cookie banners and app widgets reserve space.
- Web fonts have matching fallbacks (`size-adjust`) to reduce swap shift.

### Asset weight
- Remove unused CSS and JS. Split section-specific code so it only loads where the section is used.
- Minify and compress theme assets. The `shopify-compressor` npm package (and `shopify-compressor-pro` for multiple themes) automates this for theme CSS/JS.
- Avoid shipping full icon or animation libraries for a handful of uses.

### Liquid render time
- Use the Shopify Theme Inspector for Chrome to profile slow Liquid.
- Avoid nested loops over large collections and repeated `all_products` lookups.

## Reporting

Produce a prioritised table:

| Issue | Template(s) | Metric affected | Est. impact | Effort | Fix |
|---|---|---|---|---|---|

Then implement fixes starting with high impact, low effort. After each fix, re-measure and record the change. Never remove an app or tracking script without flagging the business impact to the user first.
All skills & install guide →