debug-enable-logging — Enable debug logging for troubleshooting
debug-common-errors — Diagnose common nuqs errors
debug-testing — Test components and hooks with URL state
8. Advanced Patterns (LOW)
advanced-url-keys — Use urlKeys for shorter URL param names
advanced-eq-function — Implement eq function for object parsers
advanced-adapter-props — Configure NuqsAdapter global defaults and URL middleware
advanced-standard-schema — Use createStandardSchemaV1 and inferParserType
advanced-optimistic-search-params — useOptimisticSearchParams for Remix/React Router
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: fellipeutaka-leon-nuqs3description: nuqs Best Practices4---56# nuqs Best Practices78Type-safe URL query state management with nuqs 2.x. Contains rules across 8 categories, prioritized by impact.910## Rule Categories1112| Priority | Category | Impact | Prefix |13|----------|----------|--------|--------|14| 1 | Parser Configuration | CRITICAL | `parser-` |15| 2 | Adapter & Setup | CRITICAL | `setup-` |16| 3 | State Management | HIGH | `state-` |17| 4 | Server Integration | HIGH | `server-` |18| 5 | Performance | MEDIUM | `perf-` |19| 6 | History & Navigation | MEDIUM | `history-` |20| 7 | Debugging & Testing | LOW-MEDIUM | `debug-` |21| 8 | Advanced Patterns | LOW | `advanced-` |2223## Quick Reference2425### 1. Parser Configuration (CRITICAL)2627- [`parser-typed`](references/parser-typed.md) — Use typed parsers for non-string values28- [`parser-with-default`](references/parser-with-default.md) — Use withDefault for non-nullable state29- [`parser-enum-literals`](references/parser-enum-literals.md) — Use literal/enum parsers for constrained values30- [`parser-array-format`](references/parser-array-format.md) — Choose correct array parser format31- [`parser-json-validation`](references/parser-json-validation.md) — Validate JSON parser with Standard Schema32- [`parser-date-format`](references/parser-date-format.md) — Select appropriate date parser33- [`parser-index-offset`](references/parser-index-offset.md) — Use parseAsIndex for 1-based URL display34- [`parser-hex-colors`](references/parser-hex-colors.md) — Use parseAsHex for color values35- [`parser-custom`](references/parser-custom.md) — Create custom parsers for complex types3637### 2. Adapter & Setup (CRITICAL)3839- [`setup-adapter`](references/setup-adapter.md) — Wrap app with correct NuqsAdapter40- [`setup-client-hooks`](references/setup-client-hooks.md) — Add 'use client' for hooks41- [`setup-server-imports`](references/setup-server-imports.md) — Import server utilities from nuqs/server42- [`setup-shared-parsers`](references/setup-shared-parsers.md) — Define shared parsers in a dedicated file4344### 3. State Management (HIGH)4546- [`state-use-query-states`](references/state-use-query-states.md) — Use useQueryStates for related parameters47- [`state-functional-updates`](references/state-functional-updates.md) — Use functional updates for derived state48- [`state-clear-with-null`](references/state-clear-with-null.md) — Clear URL parameters with null49- [`state-controlled-inputs`](references/state-controlled-inputs.md) — Handle controlled input value properly50- [`state-avoid-derived`](references/state-avoid-derived.md) — Avoid derived state from URL parameters51- [`state-options-inheritance`](references/state-options-inheritance.md) — Use withOptions for parser-level config52- [`state-setter-return`](references/state-setter-return.md) — Use setter return value for URL access5354### 4. Server Integration (HIGH)5556- [`server-create-loader`](references/server-create-loader.md) — Use createLoader for page-level server parsing57- [`server-search-params-cache`](references/server-search-params-cache.md) — Use createSearchParamsCache for nested RSC access58- [`server-shallow-false`](references/server-shallow-false.md) — Use shallow:false to trigger server re-renders59- [`server-use-transition`](references/server-use-transition.md) — Integrate useTransition for loading states60- [`server-share-parsers`](references/server-share-parsers.md) — Share parsers between client and server61- [`server-next15-async`](references/server-next15-async.md) — Handle async searchParams in Next.js 15+6263### 5. Performance (MEDIUM)6465- [`perf-limit-url-updates`](references/perf-limit-url-updates.md) — Throttle/debounce URL updates66- [`perf-clear-on-default`](references/perf-clear-on-default.md) — Use clearOnDefault for clean URLs67- [`perf-avoid-rerender`](references/perf-avoid-rerender.md) — Memoize components using URL state68- [`perf-serialize-utility`](references/perf-serialize-utility.md) — Use createSerializer for link URLs6970### 6. History & Navigation (MEDIUM)7172- [`history-push-navigation`](references/history-push-navigation.md) — Use history:push for navigation-like state73- [`history-replace-ephemeral`](references/history-replace-ephemeral.md) — Use history:replace for ephemeral state74- [`history-scroll-behavior`](references/history-scroll-behavior.md) — Control scroll behavior on URL changes75- [`history-back-sync`](references/history-back-sync.md) — Handle browser back/forward navigation7677### 7. Debugging & Testing (LOW-MEDIUM)7879- [`debug-enable-logging`](references/debug-enable-logging.md) — Enable debug logging for troubleshooting80- [`debug-common-errors`](references/debug-common-errors.md) — Diagnose common nuqs errors81- [`debug-testing`](references/debug-testing.md) — Test components and hooks with URL state8283### 8. Advanced Patterns (LOW)8485- [`advanced-url-keys`](references/advanced-url-keys.md) — Use urlKeys for shorter URL param names86- [`advanced-eq-function`](references/advanced-eq-function.md) — Implement eq function for object parsers87- [`advanced-adapter-props`](references/advanced-adapter-props.md) — Configure NuqsAdapter global defaults and URL middleware88- [`advanced-standard-schema`](references/advanced-standard-schema.md) — Use createStandardSchemaV1 and inferParserType89- [`advanced-optimistic-search-params`](references/advanced-optimistic-search-params.md) — useOptimisticSearchParams for Remix/React Router9091---92> Converted and distributed by [TomeVault](https://tomevault.io/claim/fellipeutaka) — claim your Tome and manage your conversions.93<!-- tomevault:4.0:skill_md:2026-04-13 -->
Run npx skillmds@latest add tomevault-io/fellipeutaka-leon-nuqs in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
nuqs Best Practices It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
tomevault-io (@tomevault-io) published this skill. Their other Agent Skills are listed on their SkillMD profile.