Postgres Patterns
PostgreSQL database patterns for query optimization, schema design, indexing, and security. Based on Supabase best practices.
Install
npx skills add joneqian/claude-skills-suite --skill postgres-patternsgit clone --depth 1 https://github.com/joneqian/claude-skills-suite.git /tmp/claude-skills-suite
mkdir -p ~/.claude/skills
cp -r /tmp/claude-skills-suite/skills/postgres-patterns ~/.claude/skills/postgres-patternsPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# PostgreSQL Patterns
Quick reference for PostgreSQL best practices. For detailed guidance, use the `database-reviewer` agent.
## When to Activate
- Writing SQL queries or migrations
- Designing database schemas
- Troubleshooting slow queries
- Implementing Row Level Security
- Setting up connection pooling
## Quick Reference
### Index Cheat Sheet
| Query Pattern | Index Type | Example |
| ----------------------- | ---------------- | ---------------------------------------- |
| `WHERE col = value` | B-tree (default) | `CREATE INDEX idx ON t (col)` |
| `WHERE col > value` | B-tree | `CREATE INDEX idx ON t (col)` |
| `WHERE a = x AND b > y` | Composite | `CREATE INDEX idx ON t (a, b)` |
| `WHERE jsonb @> '{}'` | GIN | `CREATE INDEX idx ON t USING gin (col)` |
| `WHERE tsv @@ query` | GIN | `CREATE INDEX idx ON t USING gin (col)` |
| Time-series ranges | BRIN | `CREATE INDEX idx ON t USING brin (col)` |
### Data Type Quick Reference
| Use Case | Correct Type | Avoid |
| ---------- | --------------- | ------------------ |
| IDs | `bigint` | `int`, random UUID |
| Strings | `text` | `varchar(255)` |
| Timestamps | `timestamptz` | `timestamp` |
| Money | `numeric(10,2)` | `float` |
| Flags | `boolean` | `varchar`, `int` |Details
- Skill name
postgres-patterns- Repository
- joneqian/claude-skills-suite
- Path
skills/postgres-patterns/SKILL.md- License
- MIT
- Repo updated
- 10 February 2026
- Copies
- Found in 2 GitHub repos
FAQ
What does the Postgres Patterns skill do?
PostgreSQL database patterns for query optimization, schema design, indexing, and security. Based on Supabase best practices.
How do I install the Postgres Patterns skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add joneqian/claude-skills-suite --skill postgres-patterns. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Postgres Patterns popular?
It lives in joneqian/claude-skills-suite, which has 32 GitHub stars and 5 forks.
Related skills
TDD Workflow
32joneqian/claude-skills-suite
Use this skill when writing new features, fixing bugs, or refactoring code. Enforces test-driven development with 80%+ coverage including unit, integration, and E2E tests.
Security Review
32joneqian/claude-skills-suite
Use this skill when adding authentication, handling user input, working with secrets, creating API endpoints, or implementing payment/sensitive features. Provides comprehensive security checklist and patterns.
Continuous Learning V2
32joneqian/claude-skills-suite
Instinct-based learning system that observes sessions via hooks, creates atomic instincts with confidence scoring, and evolves them into skills/commands/agents.
Postgres Query Expert
59ratacat/claude-skills
A comprehensive guide for interacting with PostgreSQL 16 databases. Use this skill for constructing standard and advanced SQL queries, optimizing performance, debugging errors, managing schema objects, and introspecting database structure.
You Sure
62ElliotJLT/Claude-Skill-Potions
Before ANY destructive, irreversible, or high-impact action, pause and surface a clear checklist of what's about to happen. This includes: file deletions, database changes, production deployments, mass updates, permission changes, or anything that can't easily be undone. Require explicit confirmation before proceeding. Never auto-execute dangerous operations.
Receipt Tracker Setup
46zocomputer/skills
Automatically scans receipts you drop in a folder, extracts the details, and saves them to a searchable database
Browse the most popular Claude skills, all databases skills, or write your own with the skills generator.