Install any skill in seconds. Free to start, no credit card required.
Get Started Free →This skill should be used when users need to work with TanStack DB for building reactive data layers in applications. It provides comprehensive guidance on collections, live queries, mutations, schema validation, error handling, and various integrations including LocalStorage and ElectricSQL.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | 33% | 0% |
| case-03 | ✗→✓ | ▲ Improved | -25% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 22% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 13% | 0% |
| case-06 | ✗→✓ | ▲ Improved | -9% | 0% |
TanStack DB is a reactive client store for APIs that provides normalized collections, sub-millisecond live queries, and instant optimistic writes. It solves endpoint sprawl and network waterfalls through type-safe data management with automatic updates when underlying data changes.
TanStack DB enables building reactive data layers through:
Use this skill when working with TanStack DB for building reactive data layers in applications. It provides comprehensive guidance on collections, live queries, mutations, schema validation, error handling, and various integrations including LocalStorage and ElectricSQL.
createCollection, useLiveQuery, useLiveSuspenseQuery, queryCollectionOptions, electricCollectionOptions, localStorageCollectionOptionsreferences/TanStack DB Overview.mdliveQueryCollectionOptions, from, where, select, join, groupBy, findOne, orderBy, limitreferences/TanStack DB Live Queries.mdcollection.insert, collection.update, collection.delete, createOptimisticAction, createTransactionreferences/TanStack DB Mutations.mdz.transform(), z.default(), SchemaValidationErrorreferences/Schema Validation and Type Transformations.mdSchemaValidationError, CollectionInErrorStateError, TransactionError, createTransactionreferences/Error Handling.mdlocalStorageCollectionOptions, collection.insert(), collection.update(), collection.delete()references/LocalStorage Collection.mdelectricCollectionOptions, onInsert, onUpdate, onDelete, awaitTxId, awaitMatchreferences/Electric Collection.mdCollectionConfig, SyncConfig, begin, write, commit, mutation handlersreferences/Creating a Collection Options Creator.mdcreateCollection with appropriate options (query, electric, localStorage, or custom)references/Schema Validation and Type Transformations.mduseLiveQuery or useLiveSuspenseQuery to create reactive queriesfrom(), where(), select(), join(), groupBy(), orderBy()references/TanStack DB Live Queries.mdcollection.insert(), collection.update(), collection.delete() for simple operationscreateOptimisticAction for intent-based mutations with automatic rollbackcreateTransaction for manual control over mutation batchingreferences/TanStack DB Mutations.mdlocalStorageCollectionOptions for browser-based persistence with cross-tab syncelectricCollectionOptions for real-time Postgres synchronizationreferences/LocalStorage Collection.md or references/Electric Collection.mdreferences/Error Handling.mdreferences/TanStack DB Overview.mdreferences/TanStack DB Live Queries.mdreferences/TanStack DB Mutations.mdreferences/Schema Validation and Type Transformations.mdreferences/Error Handling.mdreferences/LocalStorage Collection.mdreferences/Electric Collection.mdreferences/Creating a Collection Options Creator.mdOther measured skills in the registry, with their headline benchmark lift.