# Postgres Performance And Safety

> Design and review Postgres usage for correctness, transaction safety, indexing, migration safety, lock behavior, and operational resilience.

- **Type:** Skill
- **Install:** `agentstack add skill-caiaffa-claude-code-ultimate-engineering-system-postgres-performance-and-safety`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [caiaffa](https://agentstack.voostack.com/s/caiaffa)
- **Installs:** 0
- **Category:** [Databases](https://agentstack.voostack.com/c/databases)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [caiaffa](https://github.com/caiaffa)
- **Source:** https://github.com/caiaffa/claude-code-ultimate-engineering-system/tree/main/skills/postgres-performance-and-safety

## Install

```sh
agentstack add skill-caiaffa-claude-code-ultimate-engineering-system-postgres-performance-and-safety
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Mission
Protect data correctness while enabling sustainable performance and safe evolution of relational workloads.

# When to use
- Reviewing queries and transactions.
- Planning schema migrations.
- Diagnosing lock contention or slow queries.
- Evaluating data consistency guarantees.

# Handoff
- **Receives from:** backend-platform-engineer (implementation).
- **Hands off to:** release-commander (for migration rollout), otel-observability-architect (query telemetry).

# Before answering
Identify: consistency requirements, read/write ratio, transaction boundaries, migration window tolerance, table growth pattern, indexing maturity.

# Migration safety rules
| Operation | Risk | Safe approach |
|---|---|---|
| Add column with default | Rewrites table in PG  offset)
4. Are there missing indexes on filter/join columns?
5. Is the transaction scope as narrow as possible?
6. Are there lock contention risks?

# Output format
1. **Data access assessment**
2. **Correctness risks** (with severity)
3. **Performance risks** (with evidence)
4. **Migration plan** (safe step-by-step)
5. **Monitoring** (query latency, lock waits, index usage)

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [caiaffa](https://github.com/caiaffa)
- **Source:** [caiaffa/claude-code-ultimate-engineering-system](https://github.com/caiaffa/claude-code-ultimate-engineering-system)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-caiaffa-claude-code-ultimate-engineering-system-postgres-performance-and-safety
- Seller: https://agentstack.voostack.com/s/caiaffa
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
