remix-storefront-routing

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

A set of routing and integration rules for Remix storefronts using React Router, TypeScript, and Medusa. It covers route structure, forms, page metadata, and calls to the shop's backend API.

In plain words
What is it for?
Use it to build product routes, loaders, forms, metadata, responsive pages, and integrations with Medusa APIs.
Why use it?
It reduces inconsistencies when adding pages and connecting storefront screens to product and other shop data.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it to build product routes, loaders, forms, metadata, responsive pages, and integrations with Medusa APIs.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/lambda-curry/medusa2-starter/remix-storefront-routing
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/lambda-curry/medusa2-starter

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-routing

README.md
[![agentmods](https://agentmods.dev/badge/rules/lambda-curry/medusa2-starter/remix-storefront-routing/github.svg)](https://agentmods.dev/rules/lambda-curry/medusa2-starter/remix-storefront-routing)
Your own site
<a href="https://agentmods.dev/rules/lambda-curry/medusa2-starter/remix-storefront-routing"><img src="https://agentmods.dev/badge/rules/lambda-curry/medusa2-starter/remix-storefront-routing/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-routing

Your own site · 80×15
<a href="https://agentmods.dev/rules/lambda-curry/medusa2-starter/remix-storefront-routing"><img src="https://agentmods.dev/badge/rules/lambda-curry/medusa2-starter/remix-storefront-routing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,260 This file is loaded in full into every session.
When invoked 1,260 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.01260 $0.01260
Opus 5.5 $0.00504 $0.00504
Sonnet 5.5 $0.00252 $0.00252
Haiku 4.5 $0.00126 $0.00126

Measured 15d ago against content hash 01a3a7a03b53, 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-routing 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-routing.mdc · 206 lines

How it starts

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

Remix Storefront Routing & Integration Patterns

You are an expert in React Router v8 (Remix), TypeScript, React, and e-commerce storefront development with Medusa integration, focusing on routing patterns, form handling, and API integration.

Core Principles

  • Write performant, accessible React components
  • Follow React Router v8 conventions and patterns
  • Implement proper SEO optimization
  • Use TypeScript for type safety
  • Follow responsive design principles with Tailwind CSS
  • Integrate seamlessly with Medusa backend APIs
  • Prioritize user experience and performance

React Router v8 (Remix) Patterns

Route Structure

// app/routes/products.$handle.tsx
import type { LoaderFunctionArgs, MetaFunction } from "react-router"
import { useLoaderData } from "react-router"

export const meta: MetaFunction<typeof loader> = ({ loaderData }) => {
  return [
    { title: loaderData?.product?.title || "Product" },
    { name: "description", content: loaderData?.product?.description },
  ]
}

export async function loader({ params }: LoaderFunctionArgs) {
  const product = await getProduct(params.handle!)
  
  if (!product) {
    throw new Response("Not Found", { status: 404 })
  }
  
  return { product }
}

export default function ProductPage() {
  const { product } = useLoaderData<typeof loader>()
  
  return (
    <div>
      <h1>{product.title}</h1>
      {/* Component implementation */}
    </div>
  )
}

Form Handling

// Use @lambdacurry/forms with remix-hook-form
import { RemixFormProvider, useRemixForm } from "remix-hook-form"
import { TextField } from "@lambdacurry/forms/remix-hook-form"
import { zodResolver } from "@hookform/resolvers/zod"
import { z } from "zod"

const schema = z.object({
  email: z.string().email("Please enter a valid email"),
  firstName: z.string().min(1, "First name is required"),
})

export default function ContactForm() {
  const form = useRemixForm({
    resolver: zodResolver(schema),
    defaultValues: {
      email: "",
      firstName: "",
    },
  })

  return (
    <RemixFormProvider {...form}>
      <form method="post">
        <TextField 
          name="email" 
          label="Email" 
          type="email"
          required 
        />
        <TextField 
          name="firstName" 
          label="First Name" 
          required 
        />
        <button type="submit">Submit</button>
      </form>
    </RemixFormProvider>
  )
}

Read the full file on GitHub · 206 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 · 206 lines · 1,260 tokens per session scan A 01a3a7a03b53

Subscribe to this mod's changes

remix-storefront-routing is a cursor rule published in the GitHub repository lambda-curry/medusa2-starter (164 stars, last pushed 17d ago), licensed MIT. It adds 1,260 tokens to every session, about $0.0050 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-routing compared with cursor rules from other repositories

remix-storefront-routing next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
remix-storefront-routinglambda-curry/medusa2-starterCursor rule16417d agoMITA1,260Cursor
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