Database PostgresqlSAFE
A collection of Agent Skills Standard and Best Practice for Programming Languages, Frameworks that help our AI Agent follow best practies on frameworks and programming laguages
Overview
A collection of Agent Skills Standard and Best Practice for Programming Languages, Frameworks that help our AI Agent follow best practies on frameworks and programming laguages
6f5be687a268OBSERVED · 2026-10-14Host compatibility
What the documentation claims. We have not run a compatibility test.
| Host | Status | Notes |
|---|---|---|
| cursor | mentioned |
What it tells the agent
The instruction file, verbatim from the audited commit — this is the text the model reads, and the surface the audit's instruction layer examines. Quoted here so you can judge it without cloning anything.
---
name: database-postgresql
description: Apply PostgreSQL standards for migrations, indexing, transactions, and ORM boundaries. Use when editing entities, Prisma schema, migrations, RLS, or query-performance work for PostgreSQL.
metadata:
triggers:
files:
- "**/*.entity.ts"
- "prisma/schema.prisma"
- "**/migrations/*.sql"
keywords:
- TypeOrmModule
- PrismaService
- PostgresModule
upstream:
- name: postgresql
source: github
repo: postgres/postgres
pinned: "17"
tag_pattern: "^REL_(\\d+)_(\\d+)$"
reviewed: "2026-06-17"
---
# PostgreSQL Database Standards
## **Priority: P0 (CRITICAL)**
## Rules
- Keep PostgreSQL choices driven by real read/write paths.
- Use explicit migrations; never rely on `synchronize: true` in production.
- Treat RLS, constraints, and indexes as first-class schema behavior; use `queryRunner.query()` when raw migration SQL is required.
- Enable RLS explicitly in a migration (`ALTER TABLE <table> ENABLE ROW LEVEL SECURITY`) and create tenant policies before application rollout.
- Put multi-step consistency inside one transaction boundary.
## Verify
- [ ] Destructive schema change uses expand -> backfill -> contract rollout.
- [ ] Query shape has matching indexes for filter, join, and sort paths.
- [ ] Pagination strategy is explicit.
- [ ] Transaction boundary matches one business action.
- [ ] RLS or tenant predicates are supported by indexes.
## Anti-Patterns
- **No N+1 queries**: Use query builders or eager-load relations instead of lazy-loading in loops.
- **No heavy RLS joins**: Keep RLS predicates simple; move complex logic to query/view layer.
- **No synchronize in production**: Always run explicit migrations; `synchronize: true` destructive.
- **No blind index sprawl**: each index needs a query owner.
## References
- [Framework Map](../references/framework-map.md)
- [Implementation Examples](references/implementation.md)
- [SQL Gotchas (UPDATE FROM)](references/sql-gotchas.md)Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | NA |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- pinned
- Secrets in source
- none-found
Findings (0)
No findings outside the package's declared scope.
Gates applied: no_behavioural_pass.
6f5be687a268full audit observations/trust-audit/skill/hoangnguyen0403__database-postgresql.json · Report an issue / request a re-scanAudit history
Every audit this skill has had.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-14 | 6f5be687a268 | SAFE | B | 89 | first audit |
Questions
What does the Database Postgresql skill do?
A collection of Agent Skills Standard and Best Practice for Programming Languages, Frameworks that help our AI Agent follow best practies on frameworks and programming laguages
Is Database Postgresql safe to install?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean skill reads B.
What can Database Postgresql access on my machine?
The audit observed no filesystem, network or shell use at all in its source.
Which assistants does Database Postgresql work with?
Its documentation mentions cursor. That is what the text claims, not a compatibility test we ran.
How current is this page?
The grade is for one exact copy of the source (6f5be687a268), read on 2026-10-14. The repository is watched, and a new audit runs when it changes — this is the first audit.