comeonoliver/skillshub/electric-postgres-security
Claude Code and agent skill by comeonoliver/skillshub
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Pre-deploy security checklist for Postgres with Electric. Checks REPLICATION role, SELECT grants, CREATE on database, table ownership, REPLICA IDENTITY FULL on all synced tables, publication management (auto vs manual with ELECTRIC_MANUAL_TABLE_PUBLISHING), connection pooler exclusion for DATABASE_URL (use direct connection), and ELECTRIC_POOLED_DATABASE_URL for pooled queries. Load before deploying Electric to production or when diagnosing Postgres permission errors.
Install
npx vskill@latest install comeonoliver/skillshub/electric-postgres-securitySemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as comeonoliver/skillshub/electric-postgres-security.
This skill builds on electric-proxy-auth. Read it first for proxy security patterns.
Electric — Postgres Security Checklist
Run through each section before deploying Electric to production.
User Permission Checks
Check: Electric user has REPLICATION role
Expected:
Fail condition: rolreplication = false or user does not exist. Fix: ALTER ROLE electric_user WITH REPLICATION;
Check: Electric user has SELECT on synced tables
Expected:
Fail condition: Returns false. Fix: GRANT SELECT ON todos TO electric_user; or GRANT SELECT ON ALL TABLES IN SCHEMA public TO electric_user;
Check: Electric user has CREATE on database
Expected:
Fail condition: Returns false and not using ELECTRIC_MANUAL_TABLE_PUBLISHING=true. Fix: GRANT CREATE ON DATABASE mydb TO electric_user;
Table Configuration Checks
Check: REPLICA IDENTITY FULL on all synced tables
Expected:
Fail condition: relreplident is 'd' (default) or 'n' (nothing). Fix: ALTER TABLE todos REPLICA IDENTITY FULL;
Check: Tables are in the Electric publication
Expected:
Fail condition: Synced tables missing from the list. Fix (manual mode): ALTER PUBLICATION electric_publication_default ADD TABLE todos;
Connection Checks
Check: DATABASE_URL uses direct connection (not pooler)
Expected:
Fail condition: URL points to a connection pooler (e.g., PgBouncer on port 6432, Supabase pooler). Fix: Use direct Postgres connection for DATABASE_URL. Set ELECTRIC_POOLED_DATABASE_URL separately for pooled queries.
Check: wal_level is set to logical
Expected:
Fail condition: Returns replica or minimal. Fix: Set wal_level = logical in postgresql.conf and restart Postgres.
Common Security Mistakes
CRITICAL Using connection pooler for DATABASE_URL
Wrong:
Correct:
Connection poolers (except PgBouncer 1.23+) do not support logical replication. Electric must connect directly to Postgres for its replication slot.
Source: website/docs/guides/deployment.md:91
HIGH Missing REPLICA IDENTITY FULL on tables
Wrong:
Correct:
Without REPLICA IDENTITY FULL, Electric cannot stream the full row on updates and deletes. Updates may be missing non-PK columns.
Source: website/docs/guides/troubleshooting.md:373
HIGH Electric user without REPLICATION role
Wrong:
Correct:
Electric uses logical replication and requires the REPLICATION role on the database user.
Source: website/docs/guides/postgres-permissions.md
Pre-Deploy Summary
- [ ] Electric user has
REPLICATIONrole - [ ] Electric user has
SELECTon all synced tables - [ ] Electric user has
CREATEon database (or manual publishing configured) - [ ] All synced tables have
REPLICA IDENTITY FULL - [ ] All synced tables are in the Electric publication
- [ ]
DATABASE_URLuses direct Postgres connection (not pooler) - [ ]
wal_level = logicalin Postgres config - [ ]
ELECTRIC_SECRETis set (not usingELECTRIC_INSECURE=true) - [ ] Secrets are injected server-side only (never in client bundle)
See also: electric-proxy-auth/SKILL.md — Proxy injects secrets that Postgres security enforces. See also: electric-deployment/SKILL.md — Deployment requires correct Postgres configuration.
Version
Targets Electric sync service v1.x.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/electric-sql/electric/electric-postgres-security/SKILL.md
Popularity
- Repository stars
- 66
- Repository forks
- 24
- 7-day trend score
- 26
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/comeonoliver/skillshub/electric-postgres-security)