Skip to content
Back to skills

Postgres Code Authoring

ASecurity

Write or modify PostgreSQL queries, schemas, and migrations with parameter safety, data integrity, and operational verification. Use when a feature, bug fix, or refactor in a repository detected as PostgreSQL requires SQL, DDL, indexes, or migrations, even when the user does not name the database; do not use for review-only requests.

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 19, 2026
ai-agentssqldatabaseperformance

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned November 19, 2026

npx -y skills add ch4570/vulpora --skill postgres-code-authoring --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Postgres Code Authoring?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Postgres Code Authoring
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ch4570-postgres-code-authoring/badge)](https://www.skillsdirectory.com/skills/ch4570-postgres-code-authoring)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: postgres-code-authoring
description: Write or modify PostgreSQL queries, schemas, and migrations with parameter safety, data integrity, and operational verification. Use when a feature, bug fix, or refactor in a repository detected as PostgreSQL requires SQL, DDL, indexes, or migrations, even when the user does not name the database; do not use for review-only requests.
---

# PostgreSQL code authoring

Inspect the target PostgreSQL version, schema, migration tool, existing SQL, and access pattern before drafting. Preserve repository conventions; do not invent table, column, index, or constraint names.

## Construction contract

- Parameterize runtime values; never concatenate user or variable data into SQL text.
- Write the smallest result shape needed: explicit columns, deterministic ordering where order matters, and pagination suited to the access pattern. Use keyset pagination for deep traversal when the existing contract permits it.
- Model integrity in DDL with the appropriate primary key, `NOT NULL`, `UNIQUE`, `CHECK`, and foreign-key constraints. Match column types, defaults, and nullability to the actual domain contract.
- For a migration, prefer compatible staged changes. State lock/transaction constraints, data backfill plan, rollback path, and verification for destructive, large-table, type, or constraint changes.
- Propose indexes from an observed query predicate/join/order pattern and verify performance with `EXPLAIN` or `EXPLAIN (ANALYZE, BUFFERS)` where safe. Never claim a query is faster without evidence.
- Author only; do not execute data or schema changes without separate authorization.

Read [query construction](reference/kb/query-construction.md) for query work and [migration construction](reference/kb/migration-construction.md) for DDL or migrations. The installed `postgres-query-review`, `postgres-schema-design`, and `postgres-risk-check` dependencies provide the shared review rationale; use them as construction constraints, not as a request to write a review.

## Deliverable

Return the SQL or migration, stated assumptions, verification commands/tests, and rollback/operational notes when applicable.

Files in this skill

  • SKILL.md2.1 KB
  • reference/kb/INDEX.md1.1 KB
  • reference/kb/migration-construction.md1.4 KB
  • reference/kb/query-construction.md1.3 KB
  • reference/principles.md451 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.