360 Secure SkillHub
360 安全技能中心

nuqs

汇总 nuqs 在 Next.js 中管理类型安全 URL 查询状态的 42 条规则,按解析器配置、适配器设置、状态管理、服务端集成、性能优化、历史导航、调试测试与高级模式八类优先级组织,每条规则说明原因并给出正误代码示例。适用于代码生成、重构与代码审查场景。

PyModel
热度 0.00
最近更新 2026-10-18 21:48:33
分类:开发依赖:代码执行 / 读写文件应用场景:代码生成 / 代码审查 / 调试排错

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add pymodel/react-frontend-skills/nuqs
Metadata
name
nuqs
description
nuqs type-safe URL search-param state.

Community nuqs Best Practices for Next.js

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.

When to Apply

Reference these guidelines when:

  • Implementing URL-based state with nuqs
  • Setting up nuqs in a Next.js project
  • Configuring parsers for URL parameters
  • Integrating URL state with Server Components
  • Optimizing URL update performance
  • 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)

2. Adapter & Setup (CRITICAL)

3. State Management (HIGH)

4. Server Integration (HIGH)

5. Performance Optimization (MEDIUM)

6. History & Navigation (MEDIUM)

7. Debugging & Testing (LOW-MEDIUM)

8. Advanced Patterns (LOW)

How to Use

Run in the project root first:

npx -y @pymodel/react-frontend-skills detect             # installed vs. targeted versions
npx -y @pymodel/react-frontend-skills scan --skill nuqs  # deprecated APIs → rule IDs

Read references/<rule-id>.md for each rule above that matches the task and for each scan hit: why it matters, then incorrect vs. correct code.