remix-hook-form-migration

remix-hook-form-migration is a cursor rule for Cursor from lambda-curry/medusa2-starter. It costs 0 tokens per session (1,142 once invoked), scanned A, original, MIT.

A migration guide for changing Remix forms from remix-validated-form to @lambdacurry/forms. It describes replacing Yup validation with Zod and updating form providers and field components.

In plain words
What is it for?
Use it when updating form schemas, providers, fields, and related validation code in a Remix application.
Why use it?
It reduces uncertainty when changing the form library by showing the old and new patterns side by side.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when updating form schemas, providers, fields, and related validation code in a Remix application.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/lambda-curry/medusa2-starter/remix-hook-form-migration
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-hook-form-migration

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

Your own site · 80×15
<a href="https://agentmods.dev/rules/lambda-curry/medusa2-starter/remix-hook-form-migration"><img src="https://agentmods.dev/badge/rules/lambda-curry/medusa2-starter/remix-hook-form-migration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 1,142 The whole file, excluding the scripts and references it only reads on demand.
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.00000 $0.01142
Opus 5.5 $0.00000 $0.00457
Sonnet 5.5 $0.00000 $0.00228
Haiku 4.5 $0.00000 $0.00114

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

Security

Grade A, and why

remix-hook-form-migration 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-hook-form-migration.mdc · 174 lines

How it starts

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

Migration from remix-validated-form to @lambdacurry/forms

Overview

The codebase is being migrated from remix-validated-form to @lambdacurry/forms for form handling. This document outlines the key changes and patterns observed in the migration.

Key Changes

1. Form Validation

  • Before: Used Yup schemas with remix-validated-form
  • After: Using Zod schemas with @lambdacurry/forms

Example of old validation (Yup):

const schema = Yup.object({
  name: Yup.string().required(),
  email: Yup.string().email().required(),
})

Example of new validation (Zod):

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

2. Form Components

Form Provider
  • Before: Used ValidatedForm from remix-validated-form
  • After: Using RemixFormProvider from remix-hook-form
Form Fields
  • Before: Custom field components with useField from remix-validated-form
  • After: Using components from @lambdacurry/forms/remix-hook-form:
    • TextField
    • Textarea
    • Checkbox
    • Other form components from the package

3. Form Context

  • Before: Used useField from remix-validated-form
  • After: Using useRemixFormContext from remix-hook-form

4. Form Submission

  • Before: Used built-in validation from remix-validated-form
  • After: Using getValidatedFormData from remix-hook-form with Zod resolver

5. Error Handling

  • Before: Used FormValidationError with field-level errors
  • After: Using react-hook-form's error structure with root-level errors

Example of new error handling:

import { FieldErrors } from 'react-hook-form';

// In your action:
if (errors) {
  return data({ errors }, { status: 400 });
}

// For form-level errors:
return data(
  { errors: { root: { message: 'Error message' } } as FieldErrors },
  { status: 400 }
);

6. Response Handling

Read the full file on GitHub · 174 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 · 174 lines · 0 tokens per session scan A a664f18904d9

Subscribe to this mod's changes

remix-hook-form-migration is a cursor rule published in the GitHub repository lambda-curry/medusa2-starter (164 stars, last pushed 17d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,142 tokens. 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-hook-form-migration compared with cursor rules from other repositories

remix-hook-form-migration next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
remix-hook-form-migrationlambda-curry/medusa2-starterCursor rule16417d agoMITA0Cursor
windsurfrulesAPIParkLab/APIParkCursor rule1.8k1mo agoApache-2.0A521Windsurf
backendtenstorrent/tt-studioCursor rule136d agoApache-2.0A0Cursor
tanstack-start-guidejahands/promptsCursor rule191mo agoMITA17Cursor
new-componentkubev2v/forklift-console-pluginCursor rule11todayApache-2.0A6Cursor
tanstack-react-router_routingWebMCP-org/webmcp-shCursor rule181mo agoMITA17,188Cursor
rendering-and-memoizationgrafana/grafana-pathfinder-appCursor rule24todayAGPL-3.0A50Cursor