react-no-router

react-no-router is a skill for Claude Code, Codex from asmyshlyaev177/state-in-url. It costs 126 tokens per session (2,122 once invoked), scanned A, original, MIT.

A guide for using URL-synced state in plain React applications without a router. It covers apps made with Vite, Create React App, or widgets embedded in another page.

In plain words
What is it for?
Use it for URL-backed filters, pagination, tabs, and other state in standalone React apps.
Why use it?
It avoids adding a router just to update the browser address and explains which React-specific entry point to import.

Skill for Claude CodeCodex

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

Good fit Use it for URL-backed filters, pagination, tabs, and other state in standalone React apps.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/asmyshlyaev177/state-in-url/react-no-router
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 asmyshlyaev177/state-in-url --skill react-no-router
Clone the repo
git clone --depth 1 https://github.com/asmyshlyaev177/state-in-url

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-no-router

README.md
[![agentmods](https://agentmods.dev/badge/skills/asmyshlyaev177/state-in-url/react-no-router/github.svg)](https://agentmods.dev/skills/asmyshlyaev177/state-in-url/react-no-router)
Your own site
<a href="https://agentmods.dev/skills/asmyshlyaev177/state-in-url/react-no-router"><img src="https://agentmods.dev/badge/skills/asmyshlyaev177/state-in-url/react-no-router/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-no-router

Your own site · 80×15
<a href="https://agentmods.dev/skills/asmyshlyaev177/state-in-url/react-no-router"><img src="https://agentmods.dev/badge/skills/asmyshlyaev177/state-in-url/react-no-router.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 126 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,122 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.00126 $0.02122
Opus 5.5 $0.00050 $0.00849
Sonnet 5.5 $0.00025 $0.00424
Haiku 4.5 $0.00013 $0.00212

Measured 1mo ago against content hash 8c2dddc1a91b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

react-no-router 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 1mo 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.

skills/react-no-router/SKILL.md · 216 lines

How it starts

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

This skill builds on state-in-url/feature-state-hook. Read it first for the module-scoped default-state rule.

state-in-url — plain React, no router

A Vite or CRA app with no router uses state-in-url/react. It is a full useUrlState with the same API as every other entry point; it writes the URL through window.history because there is no router to navigate with.

import { useUrlState } from 'state-in-url/react';

Do not add a router to get a different import, and do not hand-compose useUrlStateBase for this — that is only for a router with no entry point of its own.

Setup

// useFilters.ts
import { useUrlState } from 'state-in-url/react';

type FiltersState = { sort: 'name' | 'date'; page: number };
const FILTERS_STATE: FiltersState = { sort: 'name', page: 1 };

export function useFilters() {
  return useUrlState(FILTERS_STATE);
}
// FiltersBar.tsx
import { useFilters } from './useFilters';

export function FiltersBar() {
  const { urlState, setUrl } = useFilters();
  return <button onClick={() => setUrl({ page: urlState.page + 1 })}>Next</button>;
}

setUrl defaults to replace; pass { replace: false } to push a history entry instead.

Core Patterns

Share state without passing it down

State is keyed by the identity of the default-state object, so every component calling a hook built on the same module-scoped constant reads and writes one entry and re-renders together. No provider, no props.

function Controls() {
  const { setUrl } = useFilters();
  return <button onClick={() => setUrl({ sort: 'date' })}>By date</button>;
}

function Results() {
  const { urlState } = useFilters();
  return <List sort={urlState.sort} />;
}

This is the reason the default state must be a module-scoped const — see feature-state-hook.

A router with no entry point of its own

For TanStack Router, wouter, or a custom history, build the hook with useUrlStateBase and a memoized object carrying push and replace.

Read the full file on GitHub · 216 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. 1mo ago Changed 8c2dddc1a91b
  2. 1mo ago Changed 85f2d2cf9be1
  3. 2mo ago First seen · 216 lines · 126 tokens per session scan A f0928d0f0547

Subscribe to this mod's changes

react-no-router is a skill published in the GitHub repository asmyshlyaev177/state-in-url (419 stars, last pushed 1mo ago), licensed MIT. It adds 126 tokens to every session and 2,122 once invoked, about $0.0005 per session on Opus 5.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-22.

Related

react-no-router compared with skills from other repositories

react-no-router next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
react-no-routerasmyshlyaev177/state-in-urlSkill4191mo agoMITA126Claude Code, Codex
reskinCopilotKit/CopilotKitSkill39ktodayMITA154Claude Code
copilotkit-channelsCopilotKit/CopilotKitSkill39ktodayMITA112Claude Code
setup-slack-channelCopilotKit/CopilotKitSkill39ktodayMITA206Claude Code
a2ui-catalogCopilotKit/CopilotKitSkill39ktodayMITA190Claude Code
copilotkit-cliCopilotKit/CopilotKitSkill39ktodayMITA87Claude Code
a2ui-coreCopilotKit/CopilotKitSkill39ktodayMITA18Claude Code