Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

skill-postgres

A Claude Code skill carrying a field-tested PostgreSQL, migration, and multi-tenant schema playbook. Every entry was learned debugging real systems; dates in the text are provenance stamps for when a claim was verified.

What's inside

Section Covers
Concurrency max_connections as the first scaling wall under parallel test workers, and why a Dockerized Postgres must set it as a compose flag
Migrations CREATE INDEX CONCURRENTLY vs transactions, why deleting a migration file breaks live DBs
Query gotchas COALESCE type coercion, make_interval, the 42P18/42P08 parameter type-deduction family, LEFT JOIN ON-clause filtering, LATERAL dedup-to-one, the FOR UPDATE SKIP LOCKED queue-claim pattern
Cloning tables What LIKE ... INCLUDING ALL silently drops (triggers) and renames (constraints), and why to match SQLSTATE + column signature instead of constraint names
Extensions pgvector naming, pgcrypto, RDS privilege limits
Privileges Why GRANT ALL is almost never right, append-only audit-table grants
Row-level security FORCE ROW LEVEL SECURITY, the superuser false-green trap, the zero-rows read-path variant, USING vs WITH CHECK
Schema-per-tenant The DO $$ loop pattern for migrating every tenant schema, vanishing-schema tolerance, idempotent seed corrections

Install

As a user-level skill (available in every project):

git clone https://github.com/Corvalon/skill-postgres.git ~/.claude/skills/skill_postgres

Or as a project-level skill:

git clone https://github.com/Corvalon/skill-postgres.git <your-repo>/.claude/skills/skill_postgres

Claude Code discovers SKILL.md automatically and loads it when a session starts writing SQL migrations, diagnosing a SQLSTATE, or configuring row-level security.

License

MIT. See LICENSE.

About

Claude Code skill: PostgreSQL, migration, and multi-tenant schema playbook -- connections, SQLSTATE gotchas, RLS, schema-per-tenant

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages