electricsql

Installation
SKILL.md

ElectricSQL

Overview

ElectricSQL is a sync engine that streams partial replicas of Postgres data to local clients via Shapes. It handles the read path — syncing rows from Postgres to the client in real-time using logical replication. Writes flow back through your existing API; Electric syncs the confirmed state back to all connected clients.

When to use: Real-time sync from Postgres to client apps, local-first architectures needing live data from Postgres, replacing polling with streaming updates, apps using TanStack DB with Electric collections, multi-client collaborative apps backed by Postgres.

When NOT to use: Non-Postgres databases, apps needing client-to-server sync built into the engine (Electric handles reads only), simple REST CRUD with no real-time needs, apps that don't benefit from local data.

Quick Reference

Pattern API / Approach Key Points
Shape request GET /v1/shape?table=items&offset=-1 Initial sync fetches full snapshot
Live updates ?live=true&handle=...&offset=... Long-poll for real-time changes after initial sync
SSE streaming ?live=true&live_sse=true Persistent Server-Sent Events connection
Where clause ?where=status='active' SQL-style row filtering at the server
Parameterized where ?where=user_id=$1&params[1]=abc SQL injection safe parameterized filtering
Related skills
Installs
46
GitHub Stars
11
First Seen
Feb 24, 2026