Helps Claude work with React Router v7's data-driven routing patterns, including loaders, actions, and the router setup itself. The skill triggers on key imports like createBrowserRouter, useLoaderData, and useFetcher, so Claude knows to reference the documented patterns. What's useful here are the decision gates that walk through Form vs fetcher and loader vs useEffect choices in sequence, which mirrors how you actually think through these decisions when building. Covers both framework mode with the Vite plugin and the lower-level data router API. Good for anyone moving to v7's data patterns or just tired of explaining when to use which routing primitive.

skills.sh installs
577
GitHub stars
87
last updated
Aug 21, 2026

Install

$ npx -y skills add existential-birds/beagle --skill react-router-v7 --agent claude-code

Installs into .claude/skills of the current project.

Files

React Router v7 Best Practices

Quick Reference

Router Setup (Data Mode):

import { createBrowserRouter, RouterProvider } from "react-router";

const router = createBrowserRouter([
  {
    path: "/",
    Component: Root,
    ErrorBoundary: RootErrorBoundary,
    loader: rootLoader,
    children: [
      { index: true, Component: Home },
      { path: "products/:productId", Component: Product, loader: productLoader },
    ],
  },
]);

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

Framework Mode (Vite plugin):

// routes.ts
import { index, route } from "@react-router/dev/routes";

export default [
  index("./home.tsx"),
  route("products/:pid", "./product.tsx"),
];

Route Configuration

Nested Routes with Outlets

createBrowserRouter([
  {
    path: "/dashboard",
    Component: Dashboard,
    children: [
      { index: true, Component: DashboardHome },
      { path: "settings", Component: Settings },
    ],
  },
]);

function Dashboard() {
  return (
    <div>
      <h1>Dashboard</h1>
      <Outlet /> {/* Renders child routes */}
    </div>
  );
}

Dynamic Segments and Splats

Sponsors

Details

Repository
github.com/existential-birds/beagle
Category
Frontend Development
First seen
Jun 3, 2026

More from existential-birds/beagle

All 40
1dylantarre avatarreact-springdylantarre/animation-principlesUse when implementing Disney's 12 animation principles with React Spring's physics-based animations562skills.sh installs
2tommygeoco avatarui-audittommygeoco/ui-auditui audit562skills.sh installs
3ihlamury avatarapple-ui-skillsihlamury/design-skillsApple's UI design system. Use when building interfaces inspired by Apple's aesthetic - light mode, Inter font, 4px grid.558skills.sh installs
4flutter avatarflutter-home-screen-widgetflutter/skillsflutter home screen widget557skills.sh installs
5getsentry avatarsentry-react-native-sdkgetsentry/sentry-agent-skillsFull Sentry SDK setup for React Native and Expo. Use when asked to "add Sentry to React Native", "install @sentry/react-native", "setup Sentry in Expo", or conf549skills.sh installs
6existential-birds avatarreact-flow-architectureexistential-birds/beagleArchitectural guidance for building node-based UIs with React Flow. Use when designing flow-based applications, making decisions about state management, integra536skills.sh installs