Agent skill

React Router Data Mode

by halo-dev in halo-dev/upage

Build React applications using React Router's data mode with createBrowserRouter and RouterProvider.

MITAuto-check passed

Install React Router Data Mode

skills CLI
$ npx skills add halo-dev/upage --skill react-router-data-mode -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install halo-dev/upage react-router-data-mode --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/halo-dev/upage.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/react-router-data-mode .claude/skills/react-router-data-mode && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
react-router-data-mode
GitHub stars
555
Used in
1 other repo
Token cost
~927 tokens
SKILL.md length
213 words
Files
8 (incl. references)
Skills in repo
2
Repo updated
First seen
Licence
MIT

At a glance

Build React applications using React Router's data mode with createBrowserRouter and RouterProvider.

  • Working with route objects
  • SKILL.md covers When to Apply, References, Critical Patterns and Further Documentation
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Pending/optimistic UI without the Vite plugin

What it does

React Router Data Mode is an agent skill from halo-dev/upage. Build React applications using React Router's data mode with createBrowserRouter and RouterProvider. Use when working with route objects, loaders, actions, Form, useFetcher, or pending/optimistic UI without the Vite plugin.

Its SKILL.md is about 930 tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including reference files (for example `references/actions.md`, `references/data-loading.md` and `references/navigation.md`).

It works with React Router, Vite, React and DeepSeek. The repository describes itself as: 🔥 一款基于大模型的可视化网页构建平台,Lovable 开源替代。 The licence is MIT.

When your agent uses it

  • Working with route objects
  • Pending/optimistic UI without the Vite plugin

Example prompts

  • “/react-router-data-mode”

What it can do on your machine

Read from SKILL.md and the folder at commit f5bb335. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • reactrouter.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

React Router Data Mode loads about 927 tokens when it runs, and up to ~15k if it reads all its reference files. Until then it costs about 62 tokens; SKILL.md has 213 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~62
When it runs · the whole SKILL.md, loaded when a task matches
~927
With references · SKILL.md plus every file in references/, read only if the agent opens them
~15k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from halo-dev/upage at commit f5bb335, republished under its MIT licence (© halo-dev). 213 words, ~927 tokens.

Download SKILL.mdSave it as .claude/skills/react-router-data-mode/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.
name
react-router-data-mode
description
Build React applications using React Router's data mode with createBrowserRouter and RouterProvider. Use when working with route objects, loaders, actions, Form, useFetcher, or pending/optimistic UI without the Vite plugin.
license
MIT

React Router Data Mode

Data mode uses createBrowserRouter and RouterProvider to enable data loading, actions, and pending UI without the framework's Vite plugin. This is ideal for existing React applications that want to add data loading and mutation capabilities.

When to Apply

  • Using createBrowserRouter with route objects
  • Loading data with loader property on routes
  • Handling mutations with action property
  • Navigating with <Link>, <NavLink>, <Form>, redirect, and useNavigate
  • Implementing pending/loading UI states with useNavigation
  • Using useFetcher for mutations without navigation

References

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

ReferenceUse When
references/routing.mdConfiguring routes, nested routes, layout
references/route-object.mdUnderstanding route object properties
references/data-loading.mdLoading data with loaders
references/actions.mdHandling forms, mutations, validation
references/navigation.mdLinks, programmatic navigation, redirects
references/pending-ui.mdLoading states, optimistic UI
references/ssr.mdServer-side rendering with data mode

Critical Patterns

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

Basic Router Setup
tsx
import { createBrowserRouter, RouterProvider } from "react-router";

const router = createBrowserRouter([
  {
    path: "/",
    Component: Root,
    children: [
      { index: true, Component: Home },
      { path: "about", Component: About },
    ],
  },
]);

ReactDOM.createRoot(root).render(<RouterProvider router={router} />);
Forms & Mutations

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

tsx
// ✅ 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):

tsx
const fetcher = useFetcher();
const optimistic = fetcher.formData
  ? 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.

Optimistic UI Pattern

Use fetcher.formData to show expected results immediately:

tsx
function FavoriteButton({ itemId, isFavorite }) {
  const fetcher = useFetcher();

  // Optimistic: use pending form data, fallback to server state
  const optimistic = fetcher.formData
    ? fetcher.formData.get("favorite") === "true"
    : isFavorite;

  return (
    <fetcher.Form method="post" action={`/items/${itemId}/favorite`}>
      <input type="hidden" name="favorite" value={String(!optimistic)} />
      <button>{optimistic ? "★" : "☆"}</button>
    </fetcher.Form>
  );
}

See references/pending-ui.md for complete patterns.

Further Documentation

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

https://reactrouter.com/docs

© halo-dev, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 7 other files (references) in .agents/skills/react-router-data-mode of halo-dev/upage.

  • SKILL.md
  • references/actions.md
  • references/data-loading.md
  • references/navigation.md
  • references/pending-ui.md
  • references/route-object.md
  • references/routing.md
  • references/ssr.md

Open the folder on GitHubat commit f5bb335

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in halo-dev/upage, which our catalogue first saw on October 7, 2026.

Compare with similar skills

React Router Data Mode next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

React Router Data Mode compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
React Router Data Mode this skillhalo-dev/upage5551 repos~927Automated safety check: PassMIT
React Router Developmentremix-run/react-router57k1 repos~1.5kAutomated safety check: PassMIT
Local Testinglobehub/lobe-ui2.2k—~2.1kAutomated safety check: PassMIT
Using Docs Kitlobehub/lobe-ui2.2k—~2.8kAutomated safety check: PassMIT
Clerk React Patternsgeekskai/blog1031 repos~1kAutomated safety check: NotesMIT
Workos Widgetsusenotra/notra255—~2kAutomated safety check: PassAGPL-3.0

Similar skills

  • React Router Development

    remix-run/react-router

    Guides work on React Router apps by first identifying whether the app uses Framework, Data or Declarative mode, then loading the matching reference and the installed package docs.

    57k GitHub starsUsed in 1 repo~1.5k tokens
    Frontend & DesignAuto-check passed
  • Local Testing

    lobehub/lobe-ui

    Local browser verification for the lobe-ui component library and documentation site.

    2.2k GitHub stars~2.1k tokensUpdated today
    Frontend & DesignAuto-check passed
  • Using Docs Kit

    lobehub/lobe-ui

    Set up and author a documentation site with @lobehub/docs-kit (the lobedocs CLI, React Router + Vite static docs used by ui.lobehub.com).

    2.2k GitHub stars~2.8k tokensUpdated today
    Frontend & DesignAuto-check passed
  • React SPA auth patterns with @clerk/react for Vite/CRA - ClerkProvider setup, useAuth/useUser/useClerk hooks, React Router protected routes, custom sign-in flows.

    103 GitHub starsUsed in 1 repo~1k tokens
    Frontend & DesignAuto-check: notes
  • Workos Widgets

    usenotra/notra

    A skill your agent uses when the user is implementing, embedding, or debugging a WorkOS Widget — specifically the User Management, User Profile, Admin Portal SSO Connection, or Admin Portal Domain…

    255 GitHub stars~2k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Ssr Boost Migrate

    Lomray-Software/vite-ssr-boost

    Migrate an existing Vite and React Router SPA to vite-ssr-boost SSR in Data mode, preserving route objects and checking streaming, hydration, bundle size, and deployment readiness.

    118 GitHub stars~2.3k tokensUpdated 14 days ago
    Frontend & DesignAuto-check passed

More from halo-dev/upage

  • Build React applications using React Router's declarative mode with BrowserRouter.

    555 GitHub starsUsed in 1 repo~842 tokens
    Auto-check passed

Questions about React Router Data Mode

What does React Router Data Mode do?

Build React applications using React Router's data mode with createBrowserRouter and RouterProvider. React Router Data Mode is an agent skill from halo-dev/upage. Build React applications using React Router's data mode with createBrowserRouter and RouterProvider.

When should I use React Router Data Mode?

React Router Data Mode fits situations like: working with route objects; pending/optimistic UI without the Vite plugin.

How do I install React Router Data Mode in Claude Code?

Run `npx skills add halo-dev/upage --skill react-router-data-mode -a claude-code`. Or copy the skill folder (.agents/skills/react-router-data-mode in halo-dev/upage) into .claude/skills/react-router-data-mode in your project. Claude Code loads it when a task matches its description.

How do I install React Router Data Mode in Codex?

Run `npx skills add halo-dev/upage --skill react-router-data-mode -a codex`. Or copy the skill folder (.agents/skills/react-router-data-mode in halo-dev/upage) into .agents/skills/react-router-data-mode in your project. Codex loads it when a task matches its description.

Can I use React Router Data Mode in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add halo-dev/upage --skill react-router-data-mode -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/react-router-data-mode, .gemini/skills/react-router-data-mode, .github/skills/react-router-data-mode and .opencode/skills/react-router-data-mode in your project.

What does React Router Data Mode need to run?

SKILL.md names no scripts, command-line tools or credentials: React Router Data Mode is instructions for the agent only.

Does React Router Data Mode access the network?

SKILL.md names 1 domain. As links in the text: reactrouter.com. This is read from the text; nothing was executed.

Is React Router Data Mode safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does React Router Data Mode use?

React Router Data Mode is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does React Router Data Mode use?

About 927 tokens (SKILL.md is roughly 3.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 14k tokens, read only when the agent opens those files.

What are the alternatives to React Router Data Mode?

Skills that share tags, products or a category with React Router Data Mode: React Router Development (remix-run/react-router, 57k stars), Local Testing (lobehub/lobe-ui, 2.2k stars), Using Docs Kit (lobehub/lobe-ui, 2.2k stars) and Clerk React Patterns (geekskai/blog, 103 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains React Router Data Mode?

halo-dev (a GitHub organization) maintains it in halo-dev/upage, which has 555 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on September 23, 2026.

Source: halo-dev/upage on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.