react-router-v7-app

react-router-v7-app is a skill for Claude Code, Codex from atman-33/workhub. It costs 46 tokens per session (1,463 once invoked), scanned A, original, MIT.

A set of implementation patterns for applications built with React Router version 7, a JavaScript library for connecting web pages to URL paths. It covers route files, server data loading, form actions, and loading states.

In plain words
What is it for?
Use it when creating or changing React Router 7 routes, loaders, actions, components, and related tests.
Why use it?
It gives a React Router project a consistent structure and reduces uncertainty about where routes, data fetching, and form logic belong.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Part of the stack-react-router plugin — 1 skill shipped together

Good fit Use it when creating or changing React Router 7 routes, loaders, actions, components, and related tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/atman-33/workhub/react-router-v7-app
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.

Any agent
npx skills add atman-33/workhub --skill react-router-v7-app
Clone the repo
git clone --depth 1 https://github.com/atman-33/workhub

Made for: Claude Code, Codex.

Or install stack-react-router, the plugin that ships this one along with the rest of its 1 skill.

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-app

README.md
[![agentmods](https://agentmods.dev/badge/skills/atman-33/workhub/react-router-v7-app/github.svg)](https://agentmods.dev/skills/atman-33/workhub/react-router-v7-app)
Your own site
<a href="https://agentmods.dev/skills/atman-33/workhub/react-router-v7-app"><img src="https://agentmods.dev/badge/skills/atman-33/workhub/react-router-v7-app/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for react-router-v7-app

Your own site · 80×15
<a href="https://agentmods.dev/skills/atman-33/workhub/react-router-v7-app"><img src="https://agentmods.dev/badge/skills/atman-33/workhub/react-router-v7-app.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,463 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00046 $0.01463
Opus 5 $0.00023 $0.00732
Sonnet 5 $0.00009 $0.00293
Haiku 4.5 $0.00005 $0.00146

Measured 5d ago against content hash 3079de32f6d2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

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

plugins/stack-react-router/skills/react-router-v7-app/SKILL.md · 206 lines

How it starts

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

React Router v7 App Implementation

1. Route Structure

  • Use file-based routing in app/routes/.
  • Route files: route.tsx for route components.
  • Prefer folder routes like users.$id/route.tsx when a route needs colocated helpers, components, or tests; sibling files in the folder do not become routes.
  • If tests live under app/routes/, configure flatRoutes({ ignoredRouteFiles: [...] }) to exclude *.test.* and *.spec.* from route discovery.
  • Use underscore prefix for route groups: _app, _landing.
  • Use dot notation for nested routes: users.$id.tsx.

2. Data Loading Patterns

  • Use loader functions for server-side data fetching.
  • Use action functions for form submissions and mutations.
  • Leverage useLoaderData() and useActionData() hooks.
  • Handle loading states with useNavigation().

3. Route Component Structure

Use arrow functions for all exports.

import type { Route } from './+types/route';

export const loader = async ({ request, params, context }: Route.LoaderArgs) => {
  // Server-side data loading
  // Return an object
  return { ... };
};

export const action = async ({ request, params, context }: Route.ActionArgs) => {
  // Handle form submissions and mutations
  // Return an object
  return { ... };
};

const Page = ({ loaderData, actionData }: Route.ComponentProps) => {
  // Component implementation with typed props
  return (
    <div>
      {/* Content */}
    </div>
  );
};

export default Page;

4. Error Handling

  • Use ErrorBoundary components for route-level error handling.
  • Implement proper error responses in loaders/actions.
  • Use isRouteErrorResponse() for typed error handling.

5. Meta and Headers

  • Export meta function for dynamic page metadata.
  • Export headers function for custom HTTP headers.
  • Use proper SEO practices with meta tags.

6. Project Structure

The app folder should follow this structure:

public                # Static files (images, fonts, etc.)
|
app
|
+-- components        # Shared components
|
+-- config            # Global configuration and environment variables
|
+-- constants         # Global constants
|
+-- hooks             # Shared hooks
|
+-- lib               # Pre-configured reusable libraries
|
+-- routes            # React Router routing directory
|
+-- stores            # Global state stores
|
+-- testing           # Test utilities and mock servers
|
+-- types             # Base types used across the application
|
+-- utils             # Shared utility functions
|

Read the full file on GitHub · 206 lines

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. 5d ago First seen · 206 lines · 46 tokens per session scan A 3079de32f6d2

Subscribe to this mod's changes

react-router-v7-app is a skill published in the GitHub repository atman-33/workhub (2 stars, last pushed today), licensed MIT. It adds 46 tokens to every session and 1,463 once invoked, about $0.0002 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-09-03.

Related

Other skills, from other repositories

frontend

Use when building React components, optimizing performance, analyzing bundle sizes, scaffolding projects, implementing accessibility, reviewing frontend code quality, performing visual overhauls, or designing UI/UX systems.

Joncik91/ucai · 40 tokens

nextjs-patterns

Next.js App Router — Server Components, Actions, streaming, caching. Use when building or migrating Next.js apps.

martineserios/thebrana · 28 tokens

react-patterns

React + TypeScript component and hook standards. TRIGGER when: creating components, custom hooks, or reviewing React code. SKIP: visual styling and theme tokens (use mui-styling); global store design (use state-management).

komluk/scaffolding · 51 tokens

fe-build

Implements frontend components and pages for React / Next.js / Vite SPA + TypeScript projects. Use when: starting implementation after feature.md or a spec is approved, writing components, building pages. Do NOT load for: writing specs, code review, bug analysis.

sh5623/fe-rail · 57 tokens

nextjs-ssr-patterns

Default command for population on a fresh worktree or after a git pull that includes a lockfile change: npm ci — lockfile-respecting, deterministic install. Run from the project root. This is the form CI workflows and Dockerfiles use. The bare npm install form is acceptable only when the lockfile is known-stale or for…

lukasrepublic/agentic-foundry · 0 tokens

vite-spa-patterns

Default command for population on a fresh worktree or after a git pull that includes a lockfile change: npm ci — lockfile-respecting, deterministic install. Run from the project root. This is the form CI workflows and Dockerfiles use. The bare npm install form is acceptable only when the lockfile is known-stale or for…

lukasrepublic/agentic-foundry · 0 tokens