sql-postgres
Write and review Postgres SQL (DDL, DML, indexes, constraints). Use for .sql, schemas, or Postgres mentions.
by agent-kit-startup★ 24 GitHub stars
Install sql-postgres in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
About this skill
SQL (Postgres)
Routing: small, in-scope schema change: apply this skill in the main window. Large or isolated batch (or when it needs its own context): hand to the sql-schema Task subagent (demoted, dogfood-only).
DDL and conventions
- CREATE TABLE: use
IF NOT EXISTS; explicit primary key; appropriate types (UUID, TEXT, TIMESTAMPTZ, JSONB). - Names: snake_case for tables and columns.
- Documentation:
COMMENT ON TABLE ...andCOMMENT ON COLUMN ...when it helps maintenance.
Recommended patterns
- Table scripts: e.g.
001_create_tables.sql,002_indexes_constraints.sql;uuid-osspextension when using UUID. - Sequences for protocols or numeric IDs when applicable.
- DDL for integrations (filters, logs, events) in dedicated folders (e.g., db/, scripts/, code/).
Best practices
- Idempotent scripts:
CREATE TABLE IF NOT EXISTS,CREATE INDEX IF NOT EXISTS; avoid failure on re-execution. - TIMESTAMPTZ for dates/times; UUID for ids when applicable.
- Schema changes: document in docs or module README.
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the sql-postgres skill do?
Write and review Postgres SQL (DDL, DML, indexes, constraints). Use for .sql, schemas, or Postgres mentions.
How do I install the sql-postgres skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the sql-postgres skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
doc-coauthoring
AnthropicGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
academy-guide
AnthropicStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
internal-comms
AnthropicA set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
skill-development
AnthropicThis skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…