storefront-performance
Skill1 starsChanged 18 days agoMITView on GitHub
Improve storefront Core Web Vitals (LCP, INP, CLS) using field data at the 75th percentile, image and font loading, caching of catalog pages, and lighter third-party scripts. Use when product or category pages feel slow, Web Vitals fail, or a theme, app, or script change needs a performance check.
In this repository28 other files it gives its agents.
- b2b-pricingSkill
- catalog-import-and-migrationSkill
- checkout-ux-and-conversionSkill
- conversion-event-trackingSkill
- ecommerce-seo-structured-dataSkill
- fraud-and-risk-basicsSkill
- google-merchant-product-feedsSkill
- headless-nextjs-storefrontSkill
- inventory-and-multi-warehouseSkill
- iranian-payment-gatewaysSkill
- marketplace-search-and-rankingSkill
- mcp-store-toolingSkill
- multi-vendor-payoutsSkill
- order-and-webhook-reliabilitySkill
- payment-gateway-integrationSkill
- product-catalog-modelingSkill
- product-description-guardrailsSkill
- returns-and-refundsSkill
- rtl-and-persian-localizationSkill
- shopify-app-developmentSkill
- storefront-accessibilitySkill
- stripe-paymentsSkill
- subscription-billingSkill
- tax-and-shippingSkill
- vector-product-searchSkill
- woocommerce-plugin-developmentSkill
- woocommerce-rest-apiSkill
- wordpress-plugin-securitySkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 52
Every template's p75 LCP, INP, and CLS is classified, mobile and desktop separately.
- Distinctive: line 55
After changes, field data at p75 improves over the next 28 days without a drop in conversion.
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Storefront performance
Judge speed by what real shoppers get, not one lab run. Core Web Vitals are measured at the 75th percentile of page loads, split by mobile and desktop. Thresholds and causes are in the Web Vitals notes.
| Metric | Good | Poor |
| LCP, Largest Contentful Paint | 2500 ms or less | over 4000 ms |
| INP, Interaction to Next Paint | 200 ms or less | over 500 ms |
| CLS, Cumulative Layout Shift | 0.1 or less | over 0.25 |
INP replaced First Input Delay as a Core Web Vital in March 2024.
Procedure
- Get field data per template (home, category, product, cart, checkout) from the Chrome UX Report, Search Console, or your own real-user monitoring with the
web-vitalslibrary. Lab tools explain causes but do not decide pass or fail. - Classify the p75 values:
node scripts/check-web-vitals.mjs vitals.jsonprints good, needs improvement, or poor for each template. - Fix the worst metric on the highest-traffic template first.
- LCP: the LCP element on a product page is usually the main product image. Serve it in a modern format at the displayed size, do not lazy-load it, give it
fetchpriority="high", and cut server response time with full-page caching for anonymous shoppers. - INP: break up long JavaScript tasks, defer third-party tags, and make variation pickers and add-to-cart update the UI before network work finishes.
- CLS: set
widthandheight(oraspect-ratio) on images, reserve space for banners, reviews widgets, and price blocks, and avoid inserting content above what the shopper is reading. - Recheck field data after 28 days, the window the Chrome UX Report uses.
Caching a store
Cache category and product pages for shoppers without a session. Bypass the cache for cart, checkout, account pages, and requests carrying cart or session cookies. Load the mini-cart count with a small request instead of disabling the page cache. Purge a product's page when its price or stock changes.
Third-party scripts
Chat widgets, review apps, A/B testing, and tag managers often cost more than the theme. List every script with its owner and purpose, remove unused ones, and load the rest after the page is interactive. A/B testing scripts that hide the page while loading hurt LCP directly.
Gotchas
loading="lazy"on the main product image delays LCP.- A cookie banner or promo bar inserted at the top shifts the whole page and adds CLS.
- Web fonts without
font-display: swapor a matching fallback can hide text or shift it. - Caching pages for logged-in shoppers can show one shopper's cart to another.
- A good Lighthouse score on a desktop connection says little about mobile p75 field data.
- Large carousels that load every slide image at once compete with the LCP image.
Verification
- Every template's p75 LCP, INP, and CLS is classified, mobile and desktop separately.
- The LCP image is not lazy-loaded and is requested early.
- Cart and checkout are never served from a shared page cache.
- After changes, field data at p75 improves over the next 28 days without a drop in conversion.
Evaluation
Worked examples and the checks they must satisfy are in evals/tasks.json.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

