nuqs
What it does
It guides the AI through reading and writing URL query values with typed parsers in React and Next.js. It is for developers who want shareable, bookmarkable page state.
When to use it
- βWhen you want filters, search text or tabs kept in the URL.
- βWhen you use useQueryState or useQueryStates in a React or Next.js project.
- βWhen you want to limit or isolate URL updates for better performance.
Skill link
https://github.com/trycompai/crm/blob/release/.agents/skills/nuqs/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βCan you store the search and date filters in the URL so the page keeps them after a refresh?β
5 new skills a week. 1 minute to read.
How it works
The AI picks typed parsers for each value, sets up the adapter for the framework and wires the state hooks so the URL and the screen stay in sync.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Community nuqs Best Practices for Next.js & React
Comprehensive guide for type-safe URL query state management with nuqs across Next.js, React Router, TanStack Router, Remix, and plain React. Covers nuqs v2.5βv2.9 features. Contains 39 rules across 8 categories, prioritized by impact to guide code generation, refactoring, and code review.
When to Apply
Reference these guidelines when:
- Implementing URL-based state with nuqs
- Setting up nuqs in a Next.js or React Router project
- Configuring parsers for URL parameters
- Integrating URL state with Server Components
- Optimizing URL update performance (
limitUrlUpdates, key isolation) - Sharing parser definitions with tRPC / TanStack Router / forms via Standard Schema
- Debugging nuqs-related issues
Rule Categories by Priority
| 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 Optimization | 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-use-typed-parsersβ Use typed parsers for non-string valuesparser-with-defaultβ Use withDefault for non-nullable stateparser-enum-validationβ Use enum parsers for constrained valuesparser-array-formatβ Choose correct array parser formatparser-json-validationβ Validate JSON parser inputparser-date-formatβ Select appropriate date parserparser-index-offsetβ Use parseAsIndex for 1-based URL display
2. Adapter & Setup (CRITICAL)
setup-nuqs-adapterβ Wrap app with NuqsAdaptersetup-use-clientβ Add 'use client' directive for hookssetup-import-serverβ Import server utilities from nuqs/serversetup-nextjs-versionβ Ensure compatible Next.js versionsetup-shared-parsersβ Define shared parsers in dedicated filesetup-default-optionsβ Configure app-wide defaults on NuqsAdapter (v2.5+)
3. State Management (HIGH)
state-use-query-statesβ Use useQueryStates for related parametersstate-clear-with-nullβ Clear URL parameters with nullstate-avoid-derivedβ Avoid derived state from URL parametersstate-options-inheritanceβ Use withOptions for parser-level configurationstate-setter-returnβ Use setter return value for URL accessstate-standard-schemaβ Use Standard Schema for cross-library validation (v2.5+)
4. Server Integration (HIGH)
server-search-params-cacheβ Use createSearchParamsCache (or createLoader) for Server Componentsserver-shallow-falseβ Use shallow:false to trigger server re-rendersserver-use-transitionβ Integrate useTransition for loading statesserver-parse-before-getβ Call parse() before get() in Server Componentsserver-next15-asyncβ Handle async searchParams in Next.js 15+
5. Performance Optimization (MEDIUM)
perf-throttle-updatesβ Throttle rapid URL updates withlimitUrlUpdatesperf-debounce-searchβ Debounce search input with built-inlimitUrlUpdatesperf-clear-on-defaultβ Use clearOnDefault for clean URLsperf-avoid-rerenderβ Memoize components using URL state (Next.js)- [`
FAQ
Does it work only with Next.js?
No. The guide also covers React Router, TanStack Router, Remix and plain React.
What is a parser?
It converts a URL value, such as text or a number, into a typed value the code can use, and back again.
Does it cover server components?
Yes, it covers integrating URL state with server components in Next.js.
Details
Original description by the author
nuqs (type-safe URL query state) best practices for Next.js and other React frameworks. This skill should be used when writing, reviewing, or refactoring code that uses nuqs for URL state management. Triggers on tasks involving useQueryState, useQueryStates, search params, URL state, query parameters, nuqs parsers, limitUrlUpdates, Standard Schema, NuqsAdapter, or Next.js routing with state.
repo: trycompai/crm
Popularity
- GitHub stars
- 12k
- Ranking position
- #11522
- License
- MIT
- Updated
- 11/1/2026
Comments
- β¦
More skills from this repository
ai-elements
12kHelps your agent build AI chat interfaces with ready-made components for conversations, messages, tool displays and prompt inputs.
ai-sdk
12kHelps your agent build AI features with the Vercel AI SDK, including text generation, streaming, tool calling and agents.
better-accessibility
12kHelps your agent make interfaces usable with a keyboard and screen readers, covering focus, labels, ARIA and forms.
better-auth-best-practices
12kHelps your agent set up Better Auth for login, sessions, OAuth and plugins in a TypeScript app, following its documented steps.
Similar skills
angular-developer
280kHelps your agent create Angular code and give project structure advice. Useful for starting new projects, creating code parts, or improving performance and accessibility.
frontend-a11y
280kHelps your agent make web interfaces accessible to everyone. It ensures websites and apps work well with screen readers and keyboard navigation.
frontend-patterns
280kHas your agent apply modern patterns in frontend development. It optimizes performance, manages state, and follows best practices in React and Next.js.