tanstack/db/svelte-db
Claude Code and agent skill by tanstack/db
- community
Checking that the SKILL.md file is still in the repository.
Svelte 5 bindings for TanStack DB. useLiveQuery with Svelte 5 runes ($state, $derived, $effect). Dependency arrays use getter functions (() => value) for reactive props. Direct destructuring breaks reactivity — use dot notation or wrap with $derived. Conditional queries via returning undefined/null. Import from @tanstack/svelte-db (re-exports all of @tanstack/db).
Install
npx vskill@latest install tanstack/db/svelte-dbSKILL.md
The same SKILL.md was published earlier as tanstack/db/svelte-db.
This skill builds on db-core. Read it first for collection setup, query builder, and mutation patterns.
TanStack DB — Svelte 5
Setup
@tanstack/svelte-db re-exports everything from @tanstack/db.
Hook
useLiveQuery
Returns a reactive object with getter properties:
Svelte-Specific Patterns
Destructuring with $derived
Props in dependency arrays
Includes (Hierarchical Data)
When a query uses include() for a subquery in select, each child field is a live Collection. Subscribe to it with useLiveQuery in a subcomponent:
With toArray(), child results are plain arrays and the parent re-emits on child changes:
See db-core/live-queries/SKILL.md for full includes rules (correlation conditions, nested includes, aggregates).
Common Mistakes
CRITICAL Passing values instead of getter functions in deps
Wrong:
Correct:
In Svelte 5, deps must be getter functions. Passing values directly captures them at creation time — changes won't trigger re-execution.
Source: docs/framework/svelte/overview.md
HIGH Direct destructuring breaks reactivity
Wrong:
Correct:
Direct destructuring captures values at creation time. Use dot notation or wrap with $derived.
Source: packages/svelte-db/src/useLiveQuery.svelte.ts
See also: db-core/live-queries/SKILL.md — for query builder API.
See also: db-core/mutations-optimistic/SKILL.md — for mutation patterns.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingpackages/svelte-db/skills/svelte-db/SKILL.md
Popularity
- Repository stars
- 3,880
- Repository forks
- 258
- 7-day trend score
- 41
Stars and forks are for the whole GitHub repository, not this skill alone. 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/tanstack/db/svelte-db)