nuqs Best Practices
SkillSearchGives your agent best-practice guidance for managing URL query state in React apps with nuqs.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the nuqs Best Practices skill
About this capability
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
What this skill tells your AI
The instructions your AI receives, as published by fellipeutaka/kanpeki in .agents/skills/nuqs/SKILL.md and read by ahel’s review.
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
Signals
- GitHub stars
- 33
- Forks
- 1
- Last commit
- Aug 2026
Advanced
- Catalog kind
- skill
- Gateway key
nuqs- Source
- github.com/fellipeutaka/kanpeki