Manages URL search params with type safety and schema validation.
Install
mkdir -p .claude/skills/nuqs && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/11515" && unzip -o skill.zip -d .claude/skills/nuqs && rm skill.zipInstalls to .claude/skills/nuqs
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Type-safe URL query state management with nuqs 2.x. Use when writing or reviewing code that uses useQueryState, useQueryStates, URL search params, query parameters, nuqs parsers, createLoader, createSearchParamsCache, createSerializer, or URL state in Next.js, React, Remix, React Router, or TanStack Router.Key capabilities
- →Bind URL query parameters to state using `useQueryState` and `useQueryStates`.
- →Ensure type-safe parsing and serialization of query parameters.
- →Manage history and navigation behavior with `history:push` and `history:replace`.
- →Integrate with Next.js, React, Remix, React Router, or TanStack Router.
- →Optimize performance by limiting URL updates and clearing on default values.
- →Handle server-side parsing with `createLoader` and `createSearchParamsCache`.
How it works
The skill manages type-safe URL query state by binding query parameters to application state, handling parsing, serialization, and history management across various React frameworks.
Inputs & outputs
When to use nuqs
- →Sync state with URL params
- →Validate query parameter inputs
- →Manage filter state in URLs
About this skill
nuqs Best Practices
Type-safe URL query state management with nuqs 2.x. Contains rules across 8 categories, prioritized by impact.
Rule Categories
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Parser Configuration | CRITICAL | parser- |
| 2 | Adapter & Setup | CRITICAL | setup- |
| 3 | State Management | HIGH | state- |
| 4 | Server Integration | HIGH | server- |
| 5 | Performance | MEDIUM | perf- |
| 6 | History & Navigation | MEDIUM | history- |
| 7 | Debugging & Testing | LOW-MEDIUM | debug- |
| 8 | Advanced Patterns | LOW | advanced- |
Quick Reference
1. Parser Configuration (CRITICAL)
parser-typed— Use typed parsers for non-string valuesparser-with-default— Use withDefault for non-nullable stateparser-enum-literals— Use literal/enum parsers for constrained valuesparser-array-format— Choose correct array parser formatparser-json-validation— Validate JSON parser with Standard Schemaparser-date-format— Select appropriate date parserparser-index-offset— Use parseAsIndex for 1-based URL displayparser-hex-colors— Use parseAsHex for color valuesparser-custom— Create custom parsers for complex types
2. Adapter & Setup (CRITICAL)
setup-adapter— Wrap app with correct NuqsAdaptersetup-client-hooks— Add 'use client' for hookssetup-server-imports— Import server utilities from nuqs/serversetup-shared-parsers— Define shared parsers in a dedicated file
3. State Management (HIGH)
state-use-query-states— Use useQueryStates for related parametersstate-functional-updates— Use functional updates for derived statestate-clear-with-null— Clear URL parameters with nullstate-controlled-inputs— Handle controlled input value properlystate-avoid-derived— Avoid derived state from URL parametersstate-options-inheritance— Use withOptions for parser-level configstate-setter-return— Use setter return value for URL access
4. Server Integration (HIGH)
server-create-loader— Use createLoader for page-level server parsingserver-search-params-cache— Use createSearchParamsCache for nested RSC accessserver-shallow-false— Use shallow:false to trigger server re-rendersserver-use-transition— Integrate useTransition for loading statesserver-share-parsers— Share parsers between client and serverserver-next15-async— Handle async searchParams in Next.js 15+
5. Performance (MEDIUM)
perf-limit-url-updates— Throttle/debounce URL updatesperf-clear-on-default— Use clearOnDefault for clean URLsperf-avoid-rerender— Memoize components using URL stateperf-serialize-utility— Use createSerializer for link URLs
6. History & Navigation (MEDIUM)
history-push-navigation— Use history:push for navigation-like statehistory-replace-ephemeral— Use history:replace for ephemeral statehistory-scroll-behavior— Control scroll behavior on URL changeshistory-back-sync— Handle browser back/forward navigation
7. Debugging & Testing (LOW-MEDIUM)
debug-enable-logging— Enable debug logging for troubleshootingdebug-common-errors— Diagnose common nuqs errorsdebug-testing— Test components and hooks with URL state
8. Advanced Patterns (LOW)
advanced-url-keys— Use urlKeys for shorter URL param namesadvanced-eq-function— Implement eq function for object parsersadvanced-adapter-props— Configure NuqsAdapter global defaults and URL middlewareadvanced-standard-schema— Use createStandardSchemaV1 and inferParserTypeadvanced-optimistic-search-params— useOptimisticSearchParams for Remix/React Router
When not to use it
- →When URL query parameters are not used for state management.
- →When working outside of Next.js, React, Remix, React Router, or TanStack Router environments.
- →When type-safe URL state management is not a requirement.
Limitations
- →Requires use within Next.js, React, Remix, React Router, or TanStack Router.
- →Focuses on URL query parameter state management.
- →Relies on specific nuqs 2.x APIs like `useQueryState`.
How it compares
This skill provides a structured, type-safe, and framework-integrated approach to URL query state management, contrasting with manual URL parameter handling.
Compared to similar skills
nuqs side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| nuqs (this skill) | 0 | 5mo | No flags | Intermediate |
| ssr-hydration-scraping | 0 | 4mo | No flags | Intermediate |
| nextjs-developer | 328 | 2mo | No flags | Advanced |
| landing-page-guide-v2 | 48 | 8mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
ssr-hydration-scraping
Project-N-E-K-O
Best practices for extracting data from modern React/Vue SSR pages (like Next.js or Nuxt.js) by targeting hydration state blocks (__NEXT_DATA__, __NUXT__) using regex and `jmespath`, avoiding brittle DOM selector scraping.
nextjs-developer
zenobi-us
Expert Next.js developer mastering Next.js 14+ with App Router and full-stack features. Specializes in server components, server actions, performance optimization, and production deployment with focus on building fast, SEO-friendly applications.
landing-page-guide-v2
bear2u
Create distinctive, high-converting landing pages that combine proven conversion elements with exceptional design quality. Build beautiful, memorable landing pages using Next.js 14+ and ShadCN UI that avoid generic AI aesthetics while following the 11 essential elements framework.
frontend-developer
sickn33
Build React components, implement responsive layouts, and handle client-side state management. Masters React 19, Next.js 15, and modern frontend architecture. Optimizes performance and ensures accessibility. Use PROACTIVELY when creating UI components or fixing frontend issues.
nextjs-best-practices
davila7
Next.js App Router principles. Server Components, data fetching, routing patterns.
frontend-code-review
langgenius
Trigger when the user requests a review of frontend files (e.g., `.tsx`, `.ts`, `.js`). Support both pending-change reviews and focused file reviews while applying the checklist rules.