Implements, reviews, debugs, or tests type-safe URL query state with nuqs 2.x. Covers adapter selection, parser configuration, URL update semantics, and server-side state sharing across React frameworks.
Ships in frontend. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Treat the URL as the state contract. Follow the steps in order, and load only the reference branches whose conditions match the application.
For every query key, record:
Inspect the installed nuqs, framework, and router major versions before
choosing integration paths.
Read the matching branch references:
Complete when every query key has one documented URL representation and the adapter import and provider boundary match the installed router.
Put related parsers in a dependency-neutral module. Import parsers from
nuqs/server when any server-side consumer imports that module; client hooks
can reuse the exported parser object.
Prefer built-ins that match the wire format. Use .withDefault(value) only
when absent and invalid values should resolve to a non-null domain default.
Defaults stay internal unless explicitly written; setting state to null
removes the query key.
import {
parseAsInteger,
parseAsString,
parseAsStringLiteral,
} from "nuqs/server";
export const searchParams = {
q: parseAsString.withDefault(""),
page: parseAsInteger.withDefault(1),
sort: parseAsStringLiteral(["relevance", "date"] as const).withDefault(
"relevance",
),
};
Create a custom parser only for a wire format that built-ins cannot express.
Its parse function returns null for invalid input, and parsing and
serialization form a pure, lossless round trip for every valid value.
Read the matching branch references:
Complete when every key has exactly one parser, nullability follows its default policy, invalid input has an explicit outcome, and all consumers import the same parser definition.
Use useQueryState for one independent key. Use useQueryStates when keys form
one state object or must update atomically. Keep the URL-backed value as the
source of truth; isolate any temporary input draft and define when it commits
back to the URL. Client hook modules carry the 'use client' directive where
the framework requires it.
Choose update semantics deliberately:
history: 'replace' for ephemeral state. Use 'push' when
each change should become a Back-button navigation point.shallow: false only when an update must rerun a server component
or route loader.scroll only for navigation that should move the viewport.clearOnDefault: true for canonical URLs. Set it to false
only when the URL must preserve an explicitly written default value.limitUrlUpdates: throttle(ms) to bound repeated URL or server updates.
Use debounce(ms) for server-side fetching after the user pauses; debounce
the hook value separately for client-side fetching.Read the matching branch references:
null, and the
setter return value for derived or
coordinated writes.Complete when each updater has explicit removal, history, server-notification, scroll, and rate-limit behavior for every key it can change.
Reuse the parser contract at every loader, request handler, route validator, or
Server Component that reads query state. Prefer createLoader for entry-point
parsing. Use createSearchParamsCache only when nested Next.js Server
Components need parsed values without prop drilling. When there is no
server-side reader, confirm that the query-state behavior is intentionally
client-first.
Read the matching branch references:
shallow: false
only when the update must rerun server work, and expose pending UI with
useTransition when needed.searchParams on supported
Next.js versions.Complete when every server boundary parses the shared contract before reading values, or every key is confirmed to have no server consumer.
Run the application's focused typecheck and tests. Exercise representative
URLs for absent, valid, empty, and invalid values, then update and clear every
key. Verify reload, copied-link, Back/Forward, and server refresh behavior for
the selected options. For high-frequency shallow: false updates, also verify
the request cadence.
Read the matching branch references:
Complete when tests and manual checks account for every query key and prove its parse, serialize, default, clear, navigation, and server-notification behavior.
agents/openai.yaml (opens in a new tab)references/advanced-adapter-props.md (opens in a new tab)references/advanced-eq-function.md (opens in a new tab)references/advanced-optimistic-search-params.md (opens in a new tab)references/advanced-standard-schema.md (opens in a new tab)references/advanced-url-keys.md (opens in a new tab)references/debug-common-errors.md (opens in a new tab)references/debug-enable-logging.md (opens in a new tab)references/debug-testing.md (opens in a new tab)references/history-back-sync.md (opens in a new tab)references/history-push-navigation.md (opens in a new tab)references/history-replace-ephemeral.md (opens in a new tab)references/history-scroll-behavior.md (opens in a new tab)references/parser-array-format.md (opens in a new tab)references/parser-custom.md (opens in a new tab)references/parser-date-format.md (opens in a new tab)references/parser-enum-literals.md (opens in a new tab)references/parser-hex-colors.md (opens in a new tab)references/parser-index-offset.md (opens in a new tab)references/parser-json-validation.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
34 skills in this plugin
/ai-sdkAnswer questions about the AI SDK and help build AI-powered features. Use when developers: (1) Ask about AI SDK functions like generateText, streamText, ToolLoopAgent, embed, or tools, (2) Want to build AI agents, chatbots, RAG systems, or text generation features, (3) Have questions about AI providers (OpenAI, Anthropic, Google, etc.), streaming, tool calling, structured output, or embeddings, (4) Use React hooks like useChat or useCompletion. Triggers on: "AI SDK", "Vercel AI SDK", "generateText", "streamText", "add AI to my app", "build an agent", "tool calling", "structured output", "useChat"./baseline-uiQuickly deslop UI code by fixing spacing, hierarchy, typography, and small layout issues. Use when the interface needs a fast cleanup or polish pass.//frontend:nuqsfrom frontend
npx claudepluginhub fellipeutaka/leon --plugin frontend