electric-new-feature
Skill by electric-sql
Guides developers through adding a new synced feature with Electric and TanStack DB. It covers the Postgres schema, proxy route, collection setup, optimistic writes and live queries.
Install electric-new-feature
Built from the published package, never by AI.
git clone --depth 1 https://github.com/electric-sql/electric /tmp/electric && mkdir -p ~/.claude/skills && cp -r /tmp/electric/packages/typescript-client/skills/electric-new-feature ~/.claude/skills/electric-new-featureRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/electric-sql/electric /tmp/electric && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/electric/packages/typescript-client/skills/electric-new-feature ~/.gemini/antigravity-cli/skills/electric-new-featureAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install electric-new-feature in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill is an end-to-end guide for building a new synced feature with Electric and TanStack DB. It walks through the steps in order: designing a Postgres table with REPLICA IDENTITY FULL, defining a shape, creating a proxy route, setting up a TanStack DB collection with electricCollectionOptions, and running a local Postgres and Electric setup with Docker Compose. It also covers the write path, where optimistic mutations call an API endpoint that returns a txid for reconciliation, and read-side live queries with useLiveQuery.
The guide also lists common mistakes and migration notes. It warns against the old electrify() bidirectional sync API, the path-based table URL pattern, and shape_id in place of handle. It is aimed at developers starting a new feature from scratch who already use or plan to use Electric with TanStack DB.
Written from the project's SKILL.md and checked against it.
What it can do
- Postgres schema setupCreates a todos table and sets REPLICA IDENTITY FULL for Electric sync.
- Proxy routeShows a server route that forwards Electric protocol params and adds server-side secrets.
- TanStack DB collectionConfigures a collection with electricCollectionOptions and write handlers.
- Txid handshakeReturns a txid from the mutation transaction so the client can wait for sync.
- Optimistic mutationsShows insert, update and delete calls on a collection with optimistic updates.
- Live queriesBuilds filtered, sorted and limited lists with useLiveQuery.
- Migration notesFlags old ElectricSQL APIs and current URL and handle patterns to avoid.
What you need
- Docker and Docker Compose
- PostgreSQL with wal_level=logical
- Electric service image
- @electric-sql/client and TanStack DB packages
Try asking
- Walk me through adding a todos feature with Electric and TanStack DB.
- Write the Postgres table and proxy route for a synced notes feature.
- Show me how to add optimistic inserts with a txid handshake.
Good to know
- Electric is read-only, so writes must go through your own API endpoint.
- The table-as-path URL pattern was removed in v0.8.0.
- The example Docker setup uses ELECTRIC_INSECURE and is for development only.
Security check
F- Sends keys or private files to a web addressIn
packages/typescript-client/skills/electric-new-feature/SKILL.md:cUrl = process.env
Checked automatically: packages/typescript-client/skills/electric-new-feature/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md9 KB
Alternatives to electric-new-feature
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
electric-new-feature: common questions
Can Electric write data back to Postgres directly?
No. The source says current Electric is read-only. Writes go through your API endpoint and are reconciled with a txid handshake.
Why does my timestamptz field arrive as a string?
The source says the sync path needs a parser in shapeOptions for timestamptz. Without it, the value arrives as a string and Date methods can fail.
Which version does this guide target?
The source says it targets @electric-sql/client v1.5.10 and the latest @tanstack/react-db.
How do I install electric-new-feature?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is electric-new-feature free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is electric-new-feature safe to use?
It scores 89 of 100. Grades: maintenance A, licence A, quality A. Security check: grade F (sends keys or private files to a web address). Review the code before you install. How grades work.
What are alternatives to electric-new-feature?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
