tanstack-db

Manage reactive client-side data with live queries and optimistic mutations for local-first apps.

14|5|Updated Jan 29, 2026
One-click install
npx skills add https://github.com/oakoss/agent-skills --skill tanstack-db-oakoss
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tanstack-db
Source: https://github.com/oakoss/agent-skills/tree/main/skills/tanstack-db
Command: npx skills add https://github.com/oakoss/agent-skills --skill tanstack-db-oakoss

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the complexity of managing reactive, local-first data in modern applications, enabling efficient client-side data operations and synchronization.

Core Features & Use Cases

  • Reactive Data Management: Provides a client-side database with live queries that automatically update the UI as data changes.
  • Optimistic Mutations: Allows for instant UI feedback on data changes, with automatic rollback on failure.
  • Use Case: Building a real-time collaborative document editor where changes made by one user are instantly reflected for all other users, with robust handling of local data and sync.

Quick Start

Use the tanstack-db skill to create a new collection for managing user preferences.

Frequently Asked Questions about tanstack-db

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage reactive client-side data with live queries in a local-first app?

You can manage reactive client-side data by using a client-side database that provides live queries, automatically updating the UI as data changes. This enables efficient local-first data operations without manual refresh logic.

How do optimistic mutations handle UI feedback and rollback on sync failure?

Optimistic mutations provide instant UI feedback by applying data changes locally first, then automatically rolling back the changes if the synchronization fails. This ensures robust error handling and data consistency.

How does differential dataflow achieve sub-millisecond query performance for client-side databases?

Differential dataflow processes incremental computations efficiently, enabling the client-side database to achieve sub-millisecond query performance. This allows complex data operations to execute instantly on the local machine.

Can I perform cross-collection joins and aggregations on local-first data?

Yes, you can perform cross-collection joins and aggregations directly on local-first data. The system supports these complex data operations locally, providing reactive query results without requiring a server roundtrip.

Does real-time synchronization work with ElectricSQL for local-first applications?

Yes, real-time synchronization works with ElectricSQL to sync local-first data across multiple clients. This integration supports collaborative applications by ensuring all connected clients maintain consistent data states.

What is the best way to build a real-time collaborative editor with instant local data updates?

The best way to build a collaborative editor is using a reactive client-side database with optimistic mutations and real-time synchronization. This combination instantly reflects local changes while syncing data across all active users.