url-state-patterns — Claude Code skill: URL state patterns
The url-state-patterns Claude Code skill keeps React state in sync with URL query parameters using nuqs. It activates for shareable filters, search, and dialogs opened through a link.
no license 110 installs ★ 23 updated 2026-06-08
npx skills add andrelandgraf/fullstackrecipes --skill url-state-patterns -a claude-codeWhat url-state-patterns does
The skill shows how to put React component state into query parameters with nuqs. For search and filters, it replaces useState with useQueryState and parsers for strings, booleans, and arrays. Setting a value to null removes its parameter; .withDefault() supplies a fallback without adding it to the URL.
Components that use useSearchParams need a Suspense boundary. The skill wraps an internal client component so consumers can use the public component directly. It applies the same structure to dialogs controlled by a URL parameter, whose state survives browser back and forward navigation. Complete the URL State with nuqs recipe first, and use the nuqs library.
What it helps with
- keep a search field in sync with the URL
- store filters in query parameters
- remove cleared values from the address
- open a dialog from a shared link
Example prompts for the agent
- Connect the React search field to a URL parameter with
nuqs. - Add tag and archived-item filters whose state lives in the URL.
- Build a delete dialog that opens from a link and closes on browser back.
How to install url-state-patterns
1Skills CLI (Vercel)
npx skills add andrelandgraf/fullstackrecipes --skill url-state-patterns -a claude-code2Manually: put the files in place
~/.claude/skills/url-state-patterns/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/url-state-patterns/
1Skills CLI (Vercel)
npx skills add andrelandgraf/fullstackrecipes --skill url-state-patterns -a codex2Manually: put the files in place
.agents/skills/url-state-patterns/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add andrelandgraf/fullstackrecipes --skill url-state-patterns -a cursor2Manually: put the files in place
.cursor/skills/url-state-patterns/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install andrelandgraf/fullstackrecipes skills/url-state-patterns2Manually: put the files in place
.github/skills/url-state-patterns/SKILL.md1Skills CLI (Vercel)
npx skills add andrelandgraf/fullstackrecipes --skill url-state-patterns -a gemini-cli2Platform CLI
gemini skills install https://github.com/andrelandgraf/fullstackrecipes --path skills/url-state-patternsManually: put the files in place
.devin/skills/url-state-patterns/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add andrelandgraf/fullstackrecipes --skill url-state-patterns -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about url-state-patterns
How do I install url-state-patterns in Claude Code?
Run npx skills add andrelandgraf/fullstackrecipes --skill url-state-patterns -a claude-code. The skill file is at ~/.claude/skills/url-state-patterns/SKILL.md.
What does url-state-patterns do?
It provides patterns for tying React state to URL query parameters with nuqs, including search, filters, and link-addressable dialogs.
What does url-state-patterns require?
Use the nuqs library and complete the URL State with nuqs recipe first.