react-router-v7

react-router-v7 is a skill for Claude Code, Codex from proyecto26/projectx. It costs 51 tokens per session (3,083 once invoked), scanned A, original, MIT.

A development guide for React Router v7, a web framework for connecting URLs to pages and server-side actions in React applications.

In plain words
What is it for?
Use it when building or maintaining routes, layouts, protected pages, URL parameters, forms, server requests, and SSR in apps/web.
Why use it?
It provides project conventions for handling routes, data loading, forms, navigation, authentication, and server-rendered pages in the web app.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/proyecto26/projectx/react-router-v7
Any agent
npx skills add proyecto26/projectx --skill react-router-v7
Clone the repo
git clone --depth 1 https://github.com/proyecto26/projectx

Made for: Claude Code, Codex.

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 react-router-v7

README.md
[![agentmods](https://agentmods.dev/badge/skills/proyecto26/projectx/react-router-v7.svg)](https://agentmods.dev/skills/proyecto26/projectx/react-router-v7)
Your own site
<a href="https://agentmods.dev/skills/proyecto26/projectx/react-router-v7"><img src="https://agentmods.dev/badge/skills/proyecto26/projectx/react-router-v7.svg" alt="Measured on agentmods" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,083 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00051 $0.03083
Opus 5 $0.00026 $0.01541
Sonnet 5 $0.00010 $0.00617
Haiku 4.5 $0.00005 $0.00308

Measured 4d ago against content hash 85b4342f9e4c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

react-router-v7 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 4d 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.

.agents/skills/react-router-v7/SKILL.md · 450 lines

How it starts

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

React Router v7 Best Practices

Project Structure

The frontend app is in apps/web/ using React Router v7 with SSR (Framework Mode).

apps/web/
├── src/
│   ├── routes/           # File-based routing
│   │   ├── layouts/      # Layout routes (root, auth, admin)
│   │   ├── admin/        # Admin routes
│   │   └── _index.tsx    # Home page
│   ├── pages/            # Page components
│   ├── components/       # Shared components
│   ├── services/         # API services (http.server.ts)
│   ├── cookies/          # Session management (auth.server.ts)
│   ├── lib/              # Utilities and helpers
│   ├── root.tsx          # Root layout
│   └── entry.server.tsx  # Server entry
├── react-router.config.ts
└── vite.config.ts

File-Based Routing

Routes are defined by file structure in src/routes/:

File Route
_index.tsx /
about.tsx /about
products.tsx /products
products.$id.tsx /products/:id
products._index.tsx /products (index)
auth.login.tsx /auth/login
admin/index.tsx /admin
$.tsx Catch-all (404)

Layout Routes

routes/
├── layouts/
│   ├── root-layout.tsx   # Root layout with Outlet
│   └── auth-layout.tsx   # Auth layout (login/register)
├── products.tsx          # Layout for /products/*
├── products._index.tsx   # /products
└── products.$id.tsx      # /products/:id

Quick Reference

Framework Mode (This Project - Vite plugin with SSR):

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

export default [
  layout("./routes/layouts/root-layout.tsx", [
    index("./routes/_index.tsx"),
    route("products/:pid", "./routes/products.$id.tsx"),
    route("admin/*", "./routes/admin/index.tsx"),
  ]),
];

Data Mode (Alternative for SPAs):

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} />);

Read the full file on GitHub · 450 lines

Files

What ships with it

8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 4d ago First seen · 450 lines · 51 tokens per session scan A 85b4342f9e4c

Subscribe to this mod's changes

react-router-v7 is a skill published in the GitHub repository proyecto26/projectx (83 stars, last pushed 4mo ago), licensed MIT. It adds 51 tokens to every session and 3,083 once invoked, about $0.0003 per session on Opus 5. 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-08-30.

Related

Other skills, from other repositories

modern-short-video

Create modern product launch/pitch videos using Remotion. Use when creating app promo videos, SaaS launch videos, product demos, or startup pitch videos.

Marve10s/Better-Fullstack · 35 tokens

create-remotion-geist

Create Remotion videos using the Geist design system aesthetic. Use when asked to create videos, animations, or motion graphics that should follow Vercel's visual style - dark theme, spring animations, Geist typography, and the Geist color palette.

Marve10s/Better-Fullstack · 54 tokens

nextjs-docs

Use this skill whenever the user asks about Next.js, React full-stack development, App Router, Server Components, or building web applications with Next.js. This skill covers Next.js 16.2.7 with React 19.2, App Router, Cache Components, Turbopack, and all modern patterns. Use it for code generation, architecture…

pledgeandgrow/pledge-skills · 138 tokens

remotion-best-practices

Best practices for Remotion - Video creation in React.

Marve10s/Better-Fullstack · 17 tokens

vercel-ai-sdk-streaming

Build streaming AI features in Next.js with Vercel AI SDK, tool calling, RSC/UI hooks, and edge-safe API routes. Use for TypeScript fullstack AI UX with React Server Components.

vaquarkhan/Fullstack-development-agent-skills · 48 tokens

react-nextjs-frontend

Apply frontend guidance for React and Next.js stacks, including routing, rendering strategy, state boundaries, and performance defaults. Use when a project uses React, Next.js, TypeScript, and component-driven UI delivery.

vaquarkhan/Fullstack-development-agent-skills · 48 tokens