nuqs by pproenca/dot-skills
npx skills add https://github.com/pproenca/dot-skills --skill nuqs在 Next.js 应用中使用 nuqs 进行类型安全的 URL 查询状态管理的综合指南。包含 8 个类别共 42 条规则,按影响优先级排序,以指导代码生成、重构和代码审查。
在以下情况下参考这些指南:
| 优先级 | 类别 | 影响程度 | 前缀 |
|---|---|---|---|
| 1 | 解析器配置 | 关键 | parser- |
| 2 | 适配器与设置 | 关键 | setup- |
| 3 | 状态管理 | 高 |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
state- |
| 4 | 服务器集成 | 高 | server- |
| 5 | 性能优化 | 中 | perf- |
| 6 | 历史记录与导航 | 中 | history- |
| 7 | 调试与测试 | 低-中 | debug- |
| 8 | 高级模式 | 低 | advanced- |
parser-use-typed-parsers - 为非字符串值使用类型化解析器parser-with-default - 对非空状态使用 withDefaultparser-enum-validation - 对受限值使用枚举解析器parser-array-format - 选择正确的数组解析器格式parser-json-validation - 验证 JSON 解析器输入parser-date-format - 选择合适的日期解析器parser-index-offset - 使用 parseAsIndex 实现基于 1 的 URL 显示parser-hex-colors - 对颜色值使用 parseAsHexsetup-nuqs-adapter - 使用 NuqsAdapter 包装应用setup-use-client - 为钩子添加 'use client' 指令setup-import-server - 从 nuqs/server 导入服务器工具setup-nextjs-version - 确保 Next.js 版本兼容setup-shared-parsers - 在专用文件中定义共享解析器state-use-query-states - 对相关参数使用 useQueryStatesstate-functional-updates - 对派生状态使用函数式更新state-clear-with-null - 使用 null 清除 URL 参数state-controlled-inputs - 正确处理受控输入值state-avoid-derived - 避免从 URL 参数派生状态state-options-inheritance - 使用 withOptions 进行解析器级配置state-setter-return - 使用设置器返回值访问 URLserver-search-params-cache - 对服务器组件使用 createSearchParamsCacheserver-shallow-false - 使用 shallow:false 触发服务器重新渲染server-use-transition - 集成 useTransition 处理加载状态server-parse-before-get - 在服务器组件中先调用 parse() 再调用 get()server-share-parsers - 在客户端和服务器之间共享解析器server-next15-async - 在 Next.js 15+ 中处理异步 searchParamsperf-throttle-updates - 限制快速 URL 更新perf-clear-on-default - 使用 clearOnDefault 保持 URL 简洁perf-avoid-rerender - 对使用 URL 状态的组件进行记忆化perf-serialize-utility - 使用 createSerializer 处理链接 URLperf-debounce-search - 在 URL 更新前对搜索输入进行防抖处理history-push-navigation - 对类似导航的状态使用 history:pushhistory-replace-ephemeral - 对临时状态使用 history:replacehistory-scroll-behavior - 控制 URL 变化时的滚动行为history-back-sync - 处理浏览器前进/后退导航debug-enable-logging - 启用调试日志进行故障排除debug-common-errors - 诊断常见的 nuqs 错误debug-testing - 测试带有 URL 状态的组件advanced-custom-parsers - 为复杂类型创建自定义解析器advanced-url-keys - 使用 urlKeys 缩短 URLadvanced-eq-function - 为对象解析器实现 eq 函数advanced-framework-adapters - 使用框架特定的适配器阅读各个参考文件获取详细解释和代码示例:
| 文件 | 描述 |
|---|---|
| AGENTS.md | 包含所有规则的完整编译指南 |
| references/_sections.md | 类别定义和排序 |
| assets/templates/_template.md | 新规则模板 |
| metadata.json | 版本和参考信息 |
每周安装量
482
代码仓库
GitHub 星标数
85
首次出现
2026年1月20日
安全审计
已安装于
claude-code385
opencode250
codex239
gemini-cli238
github-copilot231
cursor213
Comprehensive guide for type-safe URL query state management with nuqs in Next.js applications. Contains 42 rules across 8 categories, prioritized by impact to guide code generation, refactoring, and code review.
Reference these guidelines when:
| 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- |
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 parsersetup-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 filestate-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 configurationserver-search-params-cache - Use createSearchParamsCache 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-share-parsers - Share parsers between client and serverperf-throttle-updates - Throttle rapid URL updatesperf-clear-on-default - Use clearOnDefault for clean URLsperf-avoid-rerender - Memoize components using URL stateperf-serialize-utility - Use createSerializer for link URLsperf-debounce-search - Debounce search input before URL updatehistory-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 navigationdebug-enable-logging - Enable debug logging for troubleshootingdebug-common-errors - Diagnose common nuqs errorsdebug-testing - Test components with URL stateadvanced-custom-parsers - Create custom parsers for complex typesadvanced-url-keys - Use urlKeys for shorter URLsadvanced-eq-function - Implement eq function for object parsersadvanced-framework-adapters - Use framework-specific adaptersRead individual reference files for detailed explanations and code examples:
| File | Description |
|---|---|
| AGENTS.md | Complete compiled guide with all rules |
| references/_sections.md | Category definitions and ordering |
| assets/templates/_template.md | Template for new rules |
| metadata.json | Version and reference information |
Weekly Installs
482
Repository
GitHub Stars
85
First Seen
Jan 20, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
claude-code385
opencode250
codex239
gemini-cli238
github-copilot231
cursor213
Vue.js测试最佳实践:Vue 3组件、组合式函数、Pinia与异步测试完整指南
3,700 周安装
LLM提示词缓存优化指南:降低90%成本,实现多级缓存与语义匹配
323 周安装
小红书内容转换器:一键将通用文章转为小红书爆款笔记格式 | AI写作助手
323 周安装
内容摘要AI工具:智能提取YouTube、网页、PDF和推文内容,支持测验学习和深度探索
324 周安装
Notion知识捕获工具 - 将对话笔记自动转化为结构化Notion页面 | 知识管理自动化
324 周安装
现代Angular最佳实践指南:TypeScript严格性、信号响应式、性能优化与测试
324 周安装
iOS VoIP 通话开发:CallKit + PushKit 集成原生通话 UI 指南
324 周安装
parser-index-offset - Use parseAsIndex for 1-based URL displayparser-hex-colors - Use parseAsHex for color valuesstate-setter-return - Use setter return value for URL accessserver-next15-async