remix-storefront-optimization

remix-storefront-optimization is a cursor rule for Cursor from lambda-curry/medusa2-starter. It costs 1,583 tokens per session, scanned A, original, MIT.

A set of optimisation and quality rules for Remix storefronts. It covers web performance, search engine visibility, error handling, accessibility, and testing for React-based shops.

In plain words
What is it for?
Use it when improving image loading, code splitting, caching, SEO, error pages, accessibility, and tests for user flows.
Why use it?
It helps address common storefront problems such as slow pages, poor search visibility, unclear failures, and inaccessible interfaces.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { ProductCard } from "../ProductCard".

Good fit Use it when improving image loading, code splitting, caching, SEO, error pages, accessibility, and tests for user flows.

Compare 6 cursor rules from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/lambda-curry/medusa2-starter
agentmods
npx agentmods add rules/lambda-curry/medusa2-starter/remix-storefront-optimization

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for remix-storefront-optimization

README.md
[![agentmods](https://agentmods.dev/badge/rules/lambda-curry/medusa2-starter/remix-storefront-optimization/github.svg)](https://agentmods.dev/rules/lambda-curry/medusa2-starter/remix-storefront-optimization)
Your own site
<a href="https://agentmods.dev/rules/lambda-curry/medusa2-starter/remix-storefront-optimization"><img src="https://agentmods.dev/badge/rules/lambda-curry/medusa2-starter/remix-storefront-optimization/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for remix-storefront-optimization

Your own site · 80×15
<a href="https://agentmods.dev/rules/lambda-curry/medusa2-starter/remix-storefront-optimization"><img src="https://agentmods.dev/badge/rules/lambda-curry/medusa2-starter/remix-storefront-optimization.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,583 This file is loaded in full into every session.
When invoked 1,583 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.01583 $0.01583
Opus 5.5 $0.00633 $0.00633
Sonnet 5.5 $0.00317 $0.00317
Haiku 4.5 $0.00158 $0.00158

Measured 15d ago against content hash f0989467d1fa, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

remix-storefront-optimization scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 15d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/remix-storefront-optimization.mdc · 258 lines

How it starts

The opening of the file, as written. The whole thing — 258 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Remix Storefront Optimization & Best Practices

You are an expert in web performance optimization, SEO, error handling, testing, and accessibility for React Router v8 (Remix) applications in e-commerce contexts.

Core Principles

  • Optimize for performance and user experience
  • Implement comprehensive SEO strategies
  • Handle errors gracefully and provide good user feedback
  • Write maintainable tests for components and user flows
  • Ensure accessibility compliance and inclusive design
  • Follow web standards and best practices

Performance Optimization

Image Optimization

// Use proper image optimization
<img
  src={product.thumbnail}
  alt={product.title}
  loading="lazy"
  className="aspect-square object-cover"
  sizes="(min-width: 1024px) 20vw, (min-width: 768px) 25vw, (min-width: 640px) 33vw, 50vw"
/>

Code Splitting

// Use React.lazy for code splitting
import { lazy, Suspense } from "react"

const CheckoutForm = lazy(() => import("./CheckoutForm"))

export function CheckoutPage() {
  return (
    <Suspense fallback={<div>Loading checkout...</div>}>
      <CheckoutForm />
    </Suspense>
  )
}

Caching Strategies

// Use proper cache headers in loaders
export async function loader({ request }: LoaderFunctionArgs) {
  const products = await getProducts()
  
  return data(
    { products },
    {
      headers: {
        "Cache-Control": "public, max-age=300, s-maxage=3600",
      },
    }
  )
}

SEO and Meta Tags

Dynamic Meta Tags

export const meta: MetaFunction<typeof loader> = ({ loaderData, location }) => {
  const product = loaderData?.product
  
  if (!product) {
    return [
      { title: "Product Not Found" },
      { name: "robots", content: "noindex" },
    ]
  }
  
  return [
    { title: `${product.title} | Your Store` },
    { name: "description", content: product.description },
    { property: "og:title", content: product.title },
    { property: "og:description", content: product.description },
    { property: "og:image", content: product.thumbnail },
    { property: "og:url", content: `https://yourstore.com${location.pathname}` },
    { name: "twitter:card", content: "summary_large_image" },
  ]
}

Read the full file on GitHub · 258 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 15d ago First seen · 258 lines · 1,583 tokens per session scan A f0989467d1fa

Subscribe to this mod's changes

remix-storefront-optimization is a cursor rule published in the GitHub repository lambda-curry/medusa2-starter (164 stars, last pushed 17d ago), licensed MIT. It adds 1,583 tokens to every session, about $0.0063 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-15.

Related

remix-storefront-optimization compared with cursor rules from other repositories

remix-storefront-optimization next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
remix-storefront-optimizationlambda-curry/medusa2-starterCursor rule16417d agoMITA1,583Cursor
medusa-cursorrulesXD3an/awesome-ai-coding-all-in-oneCursor rule142d agononeA414Cursor
vtex-io-vtex-io-admin-reactvtex/skillsCursor rule471mo agononeA2,213Cursor
vtex-io-vtex-io-storefront-reactvtex/skillsCursor rule471mo agononeA1,228Cursor
10-importscommerce-atoms/agentsCursor rule12mo agoMITA193Cursor
faststore-allvtex/skillsCursor rule471mo agononeC69Cursor
faststore-faststore-storefrontvtex/skillsCursor rule471mo agononeC61Cursor