38 deterministic Claude AI skills for PostgreSQL 15, 16, and 17 : schema design, indexing, MVCC, replication, JSON/JSONB, PostGIS, pgvector, RLS, partitioning, query performance, zero-downtime migrations, and more.
Built on the Agent Skills open standard. Discoverable via npm-agentskills manifest and OpenAI Codex skill discovery.
Without skills, Claude lacks deterministic guidance for PostgreSQL patterns:
-- Wrong : ST_Distance in WHERE cannot use the GiST spatial index, forces a seqscan
SELECT * FROM places
WHERE ST_Distance(geom, :point) < 1000;
-- Wrong : ON CONFLICT without a matching unique index raises 23505 under concurrency
INSERT INTO users (email) VALUES (:email) ON CONFLICT (email) DO NOTHING;With this skill package, Claude produces correct patterns:
-- Correct : ST_DWithin uses the GiST index
SELECT * FROM places
WHERE ST_DWithin(geom, :point, 1000);
-- Correct : MERGE-RETURNING for multi-action sync (v17+), or ON CONFLICT with a real unique index
CREATE UNIQUE INDEX IF NOT EXISTS users_email_key ON users (email);
INSERT INTO users (email) VALUES (:email)
ON CONFLICT (email) DO UPDATE SET last_seen = now()
RETURNING id;| Category | Count | Purpose |
|---|---|---|
| core/ | 6 | Architecture, MVCC, security, RLS, schema design, version matrix |
| syntax/ | 8 | SQL surface, UPSERT/MERGE, JSONB, windows, CTEs, LATERAL, arrays, FTS |
| impl/ | 15 | Indexing, PostGIS, pgvector, partitioning, replication, vacuum, performance, migrations, backup |
| errors/ | 6 | Deadlocks, serialization, constraints, auth, replication lag, timeouts |
| agents/ | 3 | Query reviewer, migration reviewer, schema reviewer |
| Total | 38 |
See INDEX.md for the complete skill catalog with descriptions and dependency graph.
# Clone the full package
git clone https://github.com/OpenAEC-Foundation/PostgreSQL-Claude-Skill-Package.git
cp -r PostgreSQL-Claude-Skill-Package/skills/source/ ~/.claude/skills/postgres/git submodule add https://github.com/OpenAEC-Foundation/PostgreSQL-Claude-Skill-Package.git .claude/skills/postgresnpx skills add @openaec/postgres-claude-skill-packageUpload individual SKILL.md files as project knowledge.
Every skill follows 3-level progressive disclosure:
postgres-{category}-{topic}/
├── SKILL.md # Main guidance (< 500 lines)
└── references/
├── methods.md # Complete API signatures
├── examples.md # Working code examples
└── anti-patterns.md # What NOT to do (with explanations)
YAML frontmatter uses folded scalar >, "Use when..." opener, and a Keywords: line with technical + symptom-based + plain-language terms for maximum discoverability.
- Deterministic language : ALWAYS / NEVER, no "you might consider"
- Version-explicit code : every example annotated with applicable versions
- WebFetch-verified : all code-snippets validated against official docs
- CI/CD validated : frontmatter, line count, structure, language, em-dash checks on every push
- Compliance audit : score >= 90% required for releases
For projects combining PostgreSQL with other AEC technologies, see Cross-Tech-AEC-Claude-Skill-Package.
| Package | Skills | Repo |
|---|---|---|
| Blender-Bonsai-ifcOpenshell-Sverchok | 73 | Link |
| Frappe | 61 | Link |
| Speckle | 25 | Link |
See full list at OpenAEC-Foundation.
MIT : OpenAEC Foundation
See CONTRIBUTING.md. Built with the Skill Package Workflow Template methodology.
