Remix Cursor Rules Template
Generate production-ready Remix Cursor rules for Project Rules (.mdc), AGENTS.md, or legacy .cursorrules. This template encodes stack-specific conventions for projects using Remix. Full-stack React framework with nested routes, loaders, actions, and web standards.
The Complete Remix Cursor Rules
The full rule set in all three formats Cursor understands — copy the one your project uses. Project Rules (.mdc) load per-file via globs, AGENTS.md is portable across AI tools, and .cursorrules is the legacy single-file format.
Replacing a legacy file? Read the guide to migrate .cursorrules to Cursor Project Rules (.mdc) before copying this template into your project.
---
description: "Routing & Data Loading"
alwaysApply: false
---
- Use file-based routing with flat route convention.
- Use loader() for server-side data fetching on every route.
- Use spaces for indentation.
- Use camelCase for function and variable names.
- Return typed JSON responses from loaders.
- Use useLoaderData() for type-safe access to loader data.---
description: "Forms & Actions"
alwaysApply: false
---
- Use <Form> component for all mutations (no client-side fetch).
- Use action() functions for form submissions.
- Use useActionData() for validation errors and feedback.
- Use useNavigation() to show loading states during form submissions.
- Implement progressive enhancement with vanilla HTML forms.
- Use useFetcher() for non-navigation mutations.---
description: "Error & Boundary Handling"
alwaysApply: false
---
- Use ErrorBoundary exports for route-level error UI.
- Catch errors in loaders and actions with structured error responses.
- Use useRouteError() to access error details in error boundaries.
- Provide user-friendly error messages — never expose stack traces.
- Use isRouteErrorResponse() to distinguish route errors from unexpected errors.
- Log errors server-side with proper context.Customize These Rules
The generator below is preloaded with the Remix template. Adjust indentation, quotes, naming, add your own rules, then download — no need to start from scratch on the homepage.
What This Template Covers
Required guidance
- - Routing & Data Loading
- - Forms & Actions
- - Error & Boundary Handling
Default style
- - Indentation: 2 spaces
- - Quotes: single
- - Semicolons: disabled
- - Naming: camelCase
Optional sections: Sessions & Cookies.
Frequently Asked Questions
- What does the Remix Cursor rules template include?
- It includes 4 rule sections covering routing & data loading, forms & actions, error & boundary handling and other Remix development conventions.
- Can I generate Remix Project Rules and AGENTS.md from the same template?
- Yes. The generator can export the same stack-specific guidance as modern Project Rules (.mdc), AGENTS.md, or a legacy .cursorrules file.
- Should I combine Remix with other Cursor rules templates?
- Yes. You can combine Remix with related templates such as TypeScript, Tailwind CSS, Docker, or backend frameworks when your project uses multiple technologies.