berriai/litellm/url-state
- community
Checking that the SKILL.md file is still in the repository.
Read or write dashboard URL query state (tabs, filters, pagination, deep links, demo flags) with nuqs instead of raw history or URLSearchParams
Install
npx vskill@latest install berriai/litellm/url-stateSKILL.md
URL state
Query params the dashboard reacts to go through nuqs: useQueryState or useQueryStates with parsers from "nuqs". Do not call window.history.pushState or replaceState, hand-edit a URLSearchParams, or parse useSearchParams().get(...) for that state. Raw writes bypass nuqs, so other hooks on the same key go stale and queued nuqs updates can overwrite them
Validate in the parser, not after reading. Use parseAsStringLiteral for enums, parseAsInteger, parseAsBoolean, parseAsArrayOf for lists, .withDefault for defaults, and createParser when the wire format is custom (for example demo=1). Keep the parser map in a module const and share it between every reader and writer of the same key
Clear a param with setter(null); nuqs keeps unrelated params and the hash. Updates replace history by default, pass { history: "push" } when the change should be a back-button step. A param consumed once on arrival (a deep link or OAuth return flag) is captured in a useState initializer from the hook value and then cleared with the setter in a mount effect
Raw reads are fine for one-time reads that never re-render on URL changes: OAuth callback pages, login, the legacy ?page= redirect, and networking.tsx
Reuse the existing helpers before adding a hook: useUrlTab in src/hooks/useUrlTab.ts, useUrlTableState in src/components/shared/DataTable, and the route modules src/components/lens/route.ts and src/components/logs/request/logDetailRouting.ts
In tests, render with renderWithProviders from tests/test-utils.tsx, passing searchParams for the initial URL and onUrlUpdate to assert writes. When a test asserts window.location directly, wrap the render in NuqsAdapter from nuqs/adapters/react; writes flush asynchronously, so assert them inside waitFor. For inputs bound to URL state, set values with one fireEvent.change rather than user.type, which flakes when a re-render between keystrokes moves focus
See the nuqs docs for parser and option details
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingui/litellm-dashboard/.agents/skills/url-state/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/berriai/litellm/url-state)