Native Data Fetching
CherryHQ/cherry-studio-app
A skill your agent uses when implementing or debugging ANY network request, API call, or data fetching.
Octane bindings for TanStack DB. An agent skill from octanejs/octane.
$ npx skills add octanejs/octane --skill tanstack-db -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install octanejs/octane tanstack-db --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/octanejs/octane.git skills-src && mkdir -p .claude/skills && cp -r skills-src/packages/tanstack-db/skills/tanstack-db .claude/skills/tanstack-db && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "tanstack-db" agent skill from https://github.com/octanejs/octane/tree/main/packages/tanstack-db/skills/tanstack-db into .claude/skills/tanstack-db/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "tanstack-db", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/octanejs/octane/tree/main/packages/tanstack-db/skills/tanstack-dbType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add octanejs/octane --skill tanstack-db -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install octanejs/octane tanstack-db --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/octanejs/octane.git skills-src && mkdir -p .agents/skills && cp -r skills-src/packages/tanstack-db/skills/tanstack-db .agents/skills/tanstack-db && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "tanstack-db" agent skill from https://github.com/octanejs/octane/tree/main/packages/tanstack-db/skills/tanstack-db into .agents/skills/tanstack-db/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "tanstack-db", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add octanejs/octane --skill tanstack-db -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install octanejs/octane tanstack-db --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/octanejs/octane.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/packages/tanstack-db/skills/tanstack-db .cursor/skills/tanstack-db && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "tanstack-db" agent skill from https://github.com/octanejs/octane/tree/main/packages/tanstack-db/skills/tanstack-db into .cursor/skills/tanstack-db/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "tanstack-db", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/octanejs/octane.git --path packages/tanstack-db/skills/tanstack-db--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add octanejs/octane --skill tanstack-db -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install octanejs/octane tanstack-db --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/octanejs/octane.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/packages/tanstack-db/skills/tanstack-db .gemini/skills/tanstack-db && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "tanstack-db" agent skill from https://github.com/octanejs/octane/tree/main/packages/tanstack-db/skills/tanstack-db into .gemini/skills/tanstack-db/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "tanstack-db", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install octanejs/octane tanstack-dbInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add octanejs/octane --skill tanstack-db -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/octanejs/octane.git skills-src && mkdir -p .github/skills && cp -r skills-src/packages/tanstack-db/skills/tanstack-db .github/skills/tanstack-db && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "tanstack-db" agent skill from https://github.com/octanejs/octane/tree/main/packages/tanstack-db/skills/tanstack-db into .github/skills/tanstack-db/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "tanstack-db", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add octanejs/octane --skill tanstack-db -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install octanejs/octane tanstack-db --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/octanejs/octane.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/packages/tanstack-db/skills/tanstack-db .opencode/skills/tanstack-db && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "tanstack-db" agent skill from https://github.com/octanejs/octane/tree/main/packages/tanstack-db/skills/tanstack-db into .opencode/skills/tanstack-db/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "tanstack-db", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
tanstack-dbOctane bindings for TanStack DB. An agent skill from octanejs/octane.
Tanstack DB is an agent skill from octanejs/octane. Octane bindings for TanStack DB. useLiveQuery hook with dependency arrays (8 overloads: query function, config object, pre-created collection, disabled state via returning undefined/null). useLiveSuspenseQuery for Octane Suspense with Error Boundaries (data always defined). useLiveInfiniteQuery for cursor-based pagination (pageSize, fetchNextPage, hasNextPage, isFetchingNextPage). usePacedMutations for debounced Octane state updates. Return shape: data, state, collection, status, isLoading, isReady, isError…
Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Development, covering Error handling. It works with TanStack. The repository describes itself as: React’s programming model, compiled. The successor to Inferno. The licence is MIT.
Read from SKILL.md and the folder at commit 35eb3c7. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
pnpmFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use pnpm, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Tanstack DB loads about 2.7k tokens when it runs. Until then it costs about 148 tokens; SKILL.md has 416 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from octanejs/octane at commit 35eb3c7, republished under its MIT licence (© octanejs). 416 words, ~2,712 tokens.
.claude/skills/tanstack-db/SKILL.md (or your agent's skills folder).This skill builds on db-core. Read it first for collection setup, query builder, and mutation patterns.
import { useLiveQuery, eq, not } from '@octanejs/tanstack-db'
function TodoList() {
const { data: todos, isLoading } = useLiveQuery((q) =>
q
.from({ todo: todoCollection })
.where(({ todo }) => not(todo.completed))
.orderBy(({ todo }) => todo.created_at, 'asc'),
)
if (isLoading) return <div>Loading...</div>
return (
<ul>
{todos.map((todo) => (
<li key={todo.id}>{todo.text}</li>
))}
</ul>
)
}@octanejs/tanstack-db re-exports everything from @tanstack/db. In Octane projects, import everything from @octanejs/tanstack-db.
// Query function with dependency array
const {
data,
state,
collection,
status,
isLoading,
isReady,
isError,
isIdle,
isCleanedUp,
} = useLiveQuery(
(q) =>
q
.from({ todo: todoCollection })
.where(({ todo }) => eq(todo.userId, userId)),
[userId],
)
// Config object
const { data } = useLiveQuery({
query: (q) => q.from({ todo: todoCollection }),
gcTime: 60000,
})
// Pre-created collection (from route loader)
const { data } = useLiveQuery(preloadedCollection)
// Conditional query — return undefined/null to disable
const { data, status } = useLiveQuery(
(q) => {
if (!userId) return undefined
return q
.from({ todo: todoCollection })
.where(({ todo }) => eq(todo.userId, userId))
},
[userId],
)
// When disabled: status='disabled', data=undefined// data is ALWAYS defined — never undefined
// Must wrap in <Suspense> and <ErrorBoundary>
function TodoList() {
const { data: todos } = useLiveSuspenseQuery((q) =>
q.from({ todo: todoCollection }),
)
return (
<ul>
{todos.map((t) => (
<li key={t.id}>{t.text}</li>
))}
</ul>
)
}
// With deps — re-suspends when deps change
const { data } = useLiveSuspenseQuery(
(q) =>
q
.from({ todo: todoCollection })
.where(({ todo }) => eq(todo.category, category)),
[category],
)const { data, fetchNextPage, hasNextPage, isFetchingNextPage } =
useLiveInfiniteQuery(
(q) =>
q
.from({ posts: postsCollection })
.where(({ posts }) => eq(posts.category, category))
.orderBy(({ posts }) => posts.createdAt, 'desc'),
{ pageSize: 20 },
[category],
)
// data is the flat array of all loaded pages
// fetchNextPage() loads the next page
// hasNextPage is true when more data is availableimport { usePacedMutations, debounceStrategy } from "@octanejs/tanstack-db"
const mutate = usePacedMutations({
onMutate: (value: string) => {
noteCollection.update(noteId, (draft) => {
draft.content = value
})
},
mutationFn: async ({ transaction }) => {
await api.notes.update(noteId, transaction.mutations[0].changes)
},
strategy: debounceStrategy({ wait: 500 }),
})
// In handler:
<textarea onChange={(e) => mutate(e.target.value)} />import { useLiveQueryEffect, eq } from '@octanejs/tanstack-db'
// Fire side effects when rows enter, exit, or update a query result.
// No render output — the effect is created on mount, disposed on unmount,
// and recreated when deps change.
function ChatComponent() {
useLiveQueryEffect(
{
query: (q) =>
q.from({ msg: messages }).where(({ msg }) => eq(msg.role, 'user')),
skipInitial: true,
onEnter: async (event) => {
await generateResponse(event.value)
},
},
[],
)
return <div>...</div>
}When a query uses includes (subqueries in select), each child field is a live Collection by default. Subscribe to it with useLiveQuery in a subcomponent:
function ProjectList() {
const { data: projects } = useLiveQuery((q) =>
q.from({ p: projectsCollection }).select(({ p }) => ({
id: p.id,
name: p.name,
issues: q
.from({ i: issuesCollection })
.where(({ i }) => eq(i.projectId, p.id))
.select(({ i }) => ({ id: i.id, title: i.title })),
})),
)
return (
<ul>
{projects.map((project) => (
<li key={project.id}>
{project.name}
<IssueList issuesCollection={project.issues} />
</li>
))}
</ul>
)
}
// Child component subscribes to the child Collection
function IssueList({ issuesCollection }) {
const { data: issues } = useLiveQuery(issuesCollection)
return (
<ul>
{issues.map((issue) => (
<li key={issue.id}>{issue.title}</li>
))}
</ul>
)
}Only the affected IssueList re-renders when an issue changes — the parent does not.
With toArray(), child results are plain arrays and the parent re-renders on child changes:
import { toArray, eq } from '@octanejs/tanstack-db'
const { data: projects } = useLiveQuery((q) =>
q.from({ p: projectsCollection }).select(({ p }) => ({
id: p.id,
name: p.name,
issues: toArray(
q
.from({ i: issuesCollection })
.where(({ i }) => eq(i.projectId, p.id))
.select(({ i }) => ({ id: i.id, title: i.title })),
),
})),
)
// project.issues is Array<{ id, title }> — no subcomponent neededSee db-core/live-queries/SKILL.md for full includes rules (correlation conditions, nested includes, aggregates).
Live query results include computed, read-only virtual properties on every row:
$synced: true when the row is confirmed by sync; false when it is still optimistic.$origin: "local" if the last confirmed change came from this client, otherwise "remote".$key: the row key for the result.$collectionId: the source collection ID.These props are added automatically and can be used in where, select, and orderBy clauses. Do not persist them back to storage.
const { data } = useLiveQuery(
(q) =>
q
.from({ todo: todoCollection })
.where(({ todo }) => eq(todo.$synced, false)),
[],
)
// Shows only optimistic (unconfirmed) todos// Include ALL external reactive values
const { data } = useLiveQuery(
(q) =>
q
.from({ todo: todoCollection })
.where(({ todo }) =>
and(eq(todo.userId, userId), eq(todo.status, filter)),
),
[userId, filter],
)
// Empty array = static query, never re-runs
const { data } = useLiveQuery((q) => q.from({ todo: todoCollection }), [])
// No array = re-runs on every render (usually wrong)<ErrorBoundary fallback={<div>Error</div>}>
<Suspense fallback={<div>Loading...</div>}>
<TodoList />
</Suspense>
</ErrorBoundary>// In route loader:
await todoCollection.preload()
// In component — data available immediately:
const { data } = useLiveQuery((q) => q.from({ todo: todoCollection }))See meta-framework/SKILL.md for full preloading patterns.
Wrong:
const { data } = useLiveQuery((q) =>
q.from({ todo: todoCollection }).where(({ todo }) => eq(todo.userId, userId)),
)Correct:
const { data } = useLiveQuery(
(q) =>
q
.from({ todo: todoCollection })
.where(({ todo }) => eq(todo.userId, userId)),
[userId],
)When the query uses external state not in the deps array, the query won't re-run when that value changes, showing stale results.
Source: docs/framework/octane/overview.md
Wrong:
<Suspense fallback={<div>Loading...</div>}>
<TodoList /> {/* uses useLiveSuspenseQuery */}
</Suspense>Correct:
<ErrorBoundary fallback={<div>Error</div>}>
<Suspense fallback={<div>Loading...</div>}>
<TodoList />
</Suspense>
</ErrorBoundary>useLiveSuspenseQuery throws errors during rendering. Without an Error Boundary, the entire app crashes.
Source: docs/guides/live-queries.md
If useLiveQuery throws InvalidSourceError: The value provided for alias "todo" is not a Collection, it usually means two copies of @tanstack/db are installed. The collection was created by one copy, but useLiveQuery checks instanceof against the other.
In dev mode, TanStack DB also throws DuplicateDbInstanceError if two instances are detected.
Diagnose:
pnpm ls @tanstack/dbIf multiple versions appear, fix with one of:
pnpm overrides (in root package.json):
{
"pnpm": {
"overrides": {
"@tanstack/db": "^0.6.0"
}
}
}Vite resolve.alias (in vite.config.ts):
import path from 'path'
export default defineConfig({
resolve: {
alias: {
'@tanstack/db': path.resolve('./node_modules/@tanstack/db'),
},
},
})The root cause is typically a dependency that bundles its own copy instead of declaring @tanstack/db as a peerDependency.
The query builder looks like SQL but has constraints that SQL doesn't — equality joins only, orderBy required for limit/offset, no distinct without select. Agents write SQL-style queries that violate these constraints. See db-core/live-queries/SKILL.md § Common Mistakes for all constraints.
See also: db-core/live-queries/SKILL.md — for query builder API and all operators.
See also: db-core/mutations-optimistic/SKILL.md — for mutation patterns.
See also: meta-framework/SKILL.md — for preloading in route loaders.
© octanejs, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in packages/tanstack-db/skills/tanstack-db of octanejs/octane.
Open the folder on GitHubat commit 35eb3c7
Tanstack DB next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Tanstack DB this skilloctanejs/octane | 1.4k | — | ~2.7k | Automated safety check: Pass | MIT | |
| Native Data FetchingCherryHQ/cherry-studio-app | 4k | 6 repos | ~2.9k | Automated safety check: Notes | MIT | |
| Nextjs Data Fetchinggiuseppe-trisciuoglio/developer-kit | 355 | — | ~2.2k | Automated safety check: Notes | MIT | |
| Expo Data Fetchingexpo/skills | 2.7k | — | ~3.4k | Automated safety check: Notes | MIT | |
| Adynato Mobile APImajiayu000/claude-skill-registry | 666 | 1 repos | ~2.5k | Automated safety check: Pass | MIT | |
| API Clientaiskillstore/marketplace | 430 | 1 repos | ~5.1k | Automated safety check: Notes | None |
CherryHQ/cherry-studio-app
A skill your agent uses when implementing or debugging ANY network request, API call, or data fetching.
giuseppe-trisciuoglio/developer-kit
Provides Next.js App Router data fetching patterns including SWR and React Query integration, parallel data fetching, Incremental Static Regeneration (ISR), revalidation strategies, and error…
expo/skills
A skill your agent uses when implementing or debugging ANY network request, API call, or data fetching.
majiayu000/claude-skill-registry
API integration patterns for Adynato mobile apps. An agent skill from majiayu000/claude-skill-registry.
aiskillstore/marketplace
A skill your agent uses when setting up API clients - TanStack Query, Axios, JWT token management, error handling, or response parsing.
tw93/Mole
A catalog of recurring bug shapes in the Mole Mac cleaner, used to review safety-sensitive diffs for deletion safety, unbounded commands, shell traps and weak tests.
octanejs/octane
Audit one, several, or all existing Octane bindings; implement selected maintenance findings or remove redundant copied files with evidence matched to source ownership.
octanejs/octane
Work a GitHub issue in the octane repo. An agent skill from octanejs/octane.
octanejs/octane
Perform a complete @tanstack/react-table v8-to-v9 migration: hook and feature architecture, row-model slots, React state and subscriptions, rendering, composable tables, type helpers, and every…
octanejs/octane
Audit or defend Octane performance. An agent skill from octanejs/octane.
octanejs/octane
Implement and verify new React-library ports or copied/rewritten React surfaces in Octane bindings from npm names or npm/GitHub links/lists.
octanejs/octane
Work out which part of the octane monorepo owns an unfamiliar failure or task.
Works with
Categories
Octane bindings for TanStack DB. An agent skill from octanejs/octane. Tanstack DB is an agent skill from octanejs/octane. Octane bindings for TanStack DB.
Tanstack DB fits situations like: tasks that involve Error handling.
Run `npx skills add octanejs/octane --skill tanstack-db -a claude-code`. Or copy the skill folder (packages/tanstack-db/skills/tanstack-db in octanejs/octane) into .claude/skills/tanstack-db in your project. Claude Code loads it when a task matches its description.
Run `npx skills add octanejs/octane --skill tanstack-db -a codex`. Or copy the skill folder (packages/tanstack-db/skills/tanstack-db in octanejs/octane) into .agents/skills/tanstack-db in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add octanejs/octane --skill tanstack-db -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/tanstack-db, .gemini/skills/tanstack-db, .github/skills/tanstack-db and .opencode/skills/tanstack-db in your project.
Going by SKILL.md and its folder, Tanstack DB needs the command-line tools its instructions call (pnpm).
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Tanstack DB is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Tanstack DB: Native Data Fetching (CherryHQ/cherry-studio-app, 4k stars), Nextjs Data Fetching (giuseppe-trisciuoglio/developer-kit, 355 stars), Expo Data Fetching (expo/skills, 2.7k stars) and Adynato Mobile API (majiayu000/claude-skill-registry, 666 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
octanejs (a GitHub organization) maintains it in octanejs/octane, which has 1,449 GitHub stars. The repository holds 17 skills in this directory. The repository was last updated on October 7, 2026.
Source: octanejs/octane on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.