About nuqs
A development skill for managing URL state with nuqs in Vite React apps that do not use TanStack Router. It outlines URL-state conventions and key configuration details, while directing apps with TanStack Router to use its search parameters instead.
Key features
- 01URL-shareable state conventions
- 02Vite React setup without a router
- 03Default history and shallow behavior
- 04JSON parsing validation guidance
- 05Batching related query parameters
Use cases
- 01Keeping shareable filters in the URL
- 02Storing map coordinates and zoom in query parameters
- 03Separating URL state from ephemeral UI state
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ fixmyberlin/ fixmyskills --skill nuqsAfter installing, type/nuqsin Claude Code to confirm it loaded.
Details
From the project READMELLM reference: Fetch llms.txt for the documentation index and latest API. Full docs in one file: llms-full.txt. Human-readable docs: nuqs.dev/docs.
Do not duplicate upstream API reference in this skill — use llms.txt / llms-full.txt for parsers, options, testing adapter, and troubleshooting.
URL state rule (FMC)
| App | URL state |
|---|---|
| Uses TanStack Router (SPA or Start) | Router search params: validateSearch — skill tanstack-router-conventions. Never nuqs. |
| Vite React app WITHOUT TanStack Router | nuqs |
On TanStack Router use validateSearch instead (tanstack-router-conventions → references/params-search-ui-routes.md).
Setup (Vite, no router)
Upstream detail: Installation · Adapters.
import { NuqsAdapter } from 'nuqs/adapters/react'
createRoot(root).render(
<NuqsAdapter>
<App />
</NuqsAdapter>,
)
Adapter export verified in nuqs 2.9.5: NuqsAdapter from nuqs/adapters/react. Tests: NuqsTestingAdapter from nuqs/adapters/testing (see upstream Testing).
State split: URL-shareable state → nuqs; ephemeral UI → Zustand (zustand-state-management).
High-impact gotchas
clearOnDefault— defaults totrue(value equal to the default is removed from the URL). Setfalseonly if the param must stay visible at its default.- History and shallow — default history is
replace(passhistory: 'push'when back-button entries are wanted);shallowdefaults totrue. parseAsJson— requires a runtime validator (e.g. Zod schema) in v2+.- Debug —
localStorage.debug = 'nuqs'. - Package — ESM-only; the
nuqs/parsersentry was removed in v2, import parsers fromnuqs. useQueryStates— batch related params (filters, lat/lng/zoom) into one URL update.
Related FMC skills
| Skill | Role |
|---|---|
tanstack-router-conventions | validateSearch for apps with TanStack Router |
zustand-state-management | Ephemeral client state that does not belong in the URL |