react-router-framework-mode

remix-run/agent-skills · Agent Skill

React Router framework-mode patterns for loaders, actions, middleware, route modules, and full-stack rendering flows.

Jump to install ↓

Overview

Publisherremix-runOrganization
Repositoryremix-run/agent-skills ↗
Skill folderreact-router-framework-mode
Stars134
Forks4
Bundled files13
LicenseMIT
Last updatedJune 18, 2026
LinksSkill source ↗ · Repository ↗

Mozgi check

What we found in the skill files. Details come with a subscription.

Security
low risk · no obvious risks found — the full report shows the details
Compatibility
needs extra software
Similar skills
139 similar skills found
Also with subscription

Installation

A skill is a folder with a SKILL.md file. Pick your agent and run the commands in a terminal (macOS, Linux or Git Bash on Windows) from your project root.

Copy the prompt into Claude, Codex or another assistant: it will review the skill and install it for you.

Install the “react-router-framework-mode” skill from mozgi.io (https://mozgi.io/skills/remix-run-react-router-framework-mode/) for me.

1. Download the archive: https://mozgi.io/skills/remix-run-react-router-framework-mode/download
   If it fails, take the skill folder from the source: https://github.com/remix-run/agent-skills/tree/main/skills/react-router-framework-mode
2. Read SKILL.md and the other files. Check the skill is safe: no hidden commands, no sending data elsewhere, no scripts doing something other than described. If anything looks suspicious, stop and tell me.
3. Put the “react-router-framework-mode” folder into your agent's skills folder: .claude/skills/ for Claude Code, .agents/skills/ for Codex, .cursor/skills/ for Cursor, .gemini/skills/ for Gemini CLI. Inside the project if we are in one, otherwise in the home folder (~/.claude/skills/ etc.).
4. Make sure <skills folder>/react-router-framework-mode/SKILL.md exists.
5. Briefly tell me what this skill does and offer to try it on my task.

If you cannot do a step yourself, tell me what to click or type.

Review the source files

13 files Download Zip

Read SKILL.md and any companion files before deciding whether to install. Click a file to preview it.

SKILL.md contents

Original author text · read-only

React Router Framework Mode

Framework mode is React Router's full-stack development experience with file-based routing, server-side, client-side, and static rendering strategies, data loading and mutations, and type-safe route module API.

When to Apply

  • Configuring new routes (app/routes.ts)
  • Loading data with loader or clientLoader
  • Handling mutations with action or clientAction
  • Navigating with <Link>, <NavLink>, <Form>, redirect, and useNavigate
  • Implementing pending/loading UI states
  • Configuring SSR, SPA mode, or pre-rendering (react-router.config.ts)
  • Implementing authentication

References

Load the relevant reference for detailed guidance on the specific API/concept:

| Reference | Use When |

| ------------------------------------ | ----------------------------------------------------- |

| references/routing.md | Configuring routes, nested routes, dynamic segments |

| references/route-modules.md | Understanding all route module exports |

| references/special-files.md | Customizing root.tsx, adding global nav/footer, fonts |

| references/data-loading.md | Loading data with loaders, streaming, caching |

| references/actions.md | Handling forms, mutations, validation |

| references/navigation.md | Links, programmatic navigation, redirects |

| references/pending-ui.md | Loading states, optimistic UI |

| references/error-handling.md | Error boundaries, error reporting |

| references/rendering-strategies.md | SSR vs SPA vs pre-rendering configuration |

| references/middleware.md | Adding middleware (requires v7.9.0+) |

| references/sessions.md | Cookie sessions, authentication, protected routes |

| references/type-safety.md | Auto-generated route types, type imports, type safety |

Version Compatibility

Some features require specific React Router versions. Always verify before implementing:

npm list react-router

| Feature | Minimum Version | Notes |

| ----------------------- | --------------- | ----------------------------- |

| Middleware | 7.9.0+ | Requires v8_middleware flag |

| Core framework features | 7.0.0+ | loaders, actions, Form, etc. |

Critical Patterns

These are the most important patterns to follow. Load the relevant reference for full details.

Forms & Mutations

Search forms - use <Form method="get">, NOT onSubmit with setSearchParams:

// ✅ Correct
<Form method="get">
  <input name="q" />
</Form>

// ❌ Wrong - don't manually handle search params
<form onSubmit={(e) => { e.preventDefault(); setSearchParams(...) }}>

Inline mutations - use useFetcher, NOT <Form> (which causes page navigation):

const fetcher = useFetcher();
const optimistic = fetcher.formData?.get("favorite") === "true" ?? isFavorite;

<fetcher.Form method="post" action={`/favorites/${id}`}>
  <button>{optimistic ? "★" : "☆"}</button>
</fetcher.Form>;

See references/actions.md for complete patterns.

Layouts

Global UI belongs in root.tsx - don't create separate layout files for nav/footer:

// app/root.tsx - add navigation, footer, providers here
export default function App() {
  return (
    <div>
      <nav>...</nav>
      <Outlet />
      <footer>...</footer>
    </div>
  );
}

Use nested routes for section-specific layouts. See references/routing.md.

Route Module Exports

meta uses loaderData, not deprecated data:

// ✅ Correct
export function meta({ loaderData }: Route.MetaArgs) { ... }

// ❌ Wrong - `data` is deprecated
export function meta({ data }: Route.MetaArgs) { ... }

See references/route-modules.md for all exports.

Further Documentation

If anything related to React Router is not covered in these references, you can search the official documentation:

https://reactrouter.com/docs

Frequently asked questions

What does the react-router-framework-mode skill do?

React Router framework-mode patterns for loaders, actions, middleware, route modules, and full-stack rendering flows.

How do I install react-router-framework-mode?

Open the “Installation” block on this page and pick your agent — Claude Code, Codex, Cursor or Gemini CLI — for ready-made commands that copy the skill folder to the right place. Or copy the prompt from the “Via assistant” tab and let the assistant review and install the skill.

Which AI models work with react-router-framework-mode?

Skills are plain Markdown instructions (the Agent Skills format), so react-router-framework-mode works with any agent that reads SKILL.md: Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and more. The model loads the instructions only when a task matches the skill's description.

Is react-router-framework-mode free?

The skill is published openly by remix-run under the MIT license. The skill itself costs nothing — you only pay your AI provider for the tokens you use.

Is it safe to install skills?

A skill is a set of instructions your agent will follow, so read SKILL.md and its companion files before installing. Scripts in the skill folder only run if your agent runs them — keep an eye on what it does and do not grant unnecessary permissions.

How is a skill different from an MCP server or a plugin?

An MCP server or plugin gives the model new tools — code that runs and returns a result. A skill gives it knowledge and process: how to approach a task, which steps to follow and what good output looks like. It needs no server or API key.

Related skills

All skills →