Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

electric-shapes

Skill by electric-sql

Configures ShapeStream and Shape from @electric-sql/client to sync a Postgres table to the client. It is for developers setting up sync, shapes, type parsing and sync error handling.

  • Score 94
  • 10k stars
  • Apache-2.0
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install electric-shapes

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-shapes ~/.claude/skills/electric-shapes

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install electric-shapes in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This skill gives an AI assistant guidance for configuring ShapeStream and Shape from the @electric-sql/client package to sync a Postgres table to the client. It covers ShapeStreamOptions such as url, table, where, columns, replica, offset and handle, along with custom type parsers, column mappers, onError retry behavior and backoff options.

It also explains log modes, requestSnapshot, fetchSnapshot, subscribe and unsubscribe, and the Shape materialized view. The skill includes setup examples and common mistakes, such as returning nothing from onError, which stops the stream. Shape URLs should point to a proxy route in your app, not directly to Electric. It is aimed at developers setting up sync, configuring shapes, parsing types or handling sync errors.

Written from the project's SKILL.md and checked against it.

What it can do

  • ShapeStream setupConfigures ShapeStream and Shape to sync a Postgres table to the client.
  • WHERE and column filtersFilters rows with a WHERE clause and selects specific columns, including the primary key.
  • Custom type parsersAdds parsers for types such as timestamptz, so values arrive as Dates instead of strings.
  • Column mappersMaps column names between snake_case and camelCase using snakeCamelMapper or createColumnMapper.
  • Error retry handlingUses onError return values to retry sync, with backoff options.
  • Resume from offsetResumes a stream from a stored offset and handle.
  • Replica full modeSends unchanged columns and old values on updates when replica is set to full.

What you need

  • @electric-sql/client package
  • A Postgres table to sync
  • A proxy route in your app for shape URLs

Try asking

  • Set up a ShapeStream that syncs my todos table filtered by user_id.
  • Add a timestamptz parser so createdAt arrives as a Date in my client.
  • Make my onError handler retry the sync instead of stopping it.

Good to know

  • Returning undefined from onError stops the stream permanently.
  • Setting offset without handle throws MissingShapeHandleError.
  • WHERE clauses with non-deterministic functions such as now() are rejected by the server.
  • Changing params on a running stream has no effect. Create a new ShapeStream instead.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: packages/typescript-client/skills/electric-shapes/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md8 KB
  • references/type-parsers.md2 KB
  • references/where-clause.md3 KB

Alternatives to electric-shapes

All alternatives →
openclaw-github-repo-commandersickn33
94

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.

AAA Skill 50k
gradiogradio-app
94

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.

AAA Skill 44k
hig-components-menussickn33
94

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.

AAA Skill 50k
fastapi-templateswshobson
94

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.

AAA Skill 43k
appfunctionsandroid
94

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.

AAA Skill 11k
agent-qa-authoringsickn33
94

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.

AAA Skill 50k

Compare with openclaw-github-repo-commander, gradio or hig-components-menus

electric-shapes: common questions

What does the electric-shapes skill cover?

It covers ShapeStream and Shape configuration, custom type parsers, column mappers, onError retry semantics, backoff options, log modes, and the Shape materialized view.

Why does my sync stop after an error?

The source says onError returning undefined stops the stream permanently. Returning at least an empty object retries the sync.

How do I resume a shape from a saved position?

Pass both offset and handle to ShapeStream. The source says both are required to resume from a stored position.

How do I install electric-shapes?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is electric-shapes free?

The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.

Is electric-shapes safe to use?

It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to electric-shapes?

Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.

electric-shapes Install

Add to stack

Loading.