Postgres Code Review

Reviews PostgreSQL code for indexing strategies, JSONB operations, connection pooling, and transaction safety. Use when reviewing SQL queries, database schem...

MIT-0 · Free to use, modify, and redistribute. No attribution required.
0 · 88 · 0 current installs · 0 all-time installs
byKevin Anderson@anderskev
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description match the provided content: references and checklist cover indexes, JSONB, connections, and transactions. The skill requests no binaries, env vars, or config paths that would be unrelated to DB review.
Instruction Scope
SKILL.md and reference files are purely educational: they instruct what to look for and include code snippets and queries for examples. Some snippets contain placeholder credentials (host/user/password) and example external endpoints (e.g., api.example.com) but these are illustrative and not invoked by the skill.
Install Mechanism
No install spec or code files — instruction-only skill. Nothing is downloaded or written to disk by the skill package itself.
Credentials
The skill declares no required environment variables, credentials, or config paths; there is no disproportionate secret access requested.
Persistence & Privilege
always:false and user-invocable:true (normal). The skill does not request persistent presence or modify other skills or system-wide settings.
Assessment
This skill appears internally consistent and safe as a read-only guidance/reference pack. Before using it in an agent that has access to live systems: (1) avoid pasting real DB credentials into prompts — the docs include placeholder credentials only; (2) verify any future versions for added install steps or requested environment variables; and (3) remember the skill only provides review advice — it does not itself connect to databases or exfiltrate data unless you explicitly give the agent credentials and instruct it to run code. If you plan to let an autonomous agent act on this advice, review agent permissions and credentials carefully.

Like a lobster shell, security has layers — review code before you run it.

Current versionv1.1.0
Download zip
latestvk97b7q1zz3pwza08v4t5vbr9r983d106

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

SKILL.md

PostgreSQL Code Review

Quick Reference

Issue TypeReference
Missing indexes, wrong index type, query performancereferences/indexes.md
JSONB queries, operators, GIN indexesreferences/jsonb.md
Connection leaks, pool configuration, timeoutsreferences/connections.md
Isolation levels, deadlocks, advisory locksreferences/transactions.md

Review Checklist

  • WHERE/JOIN columns have appropriate indexes
  • Composite indexes match query patterns (column order matters)
  • JSONB columns use GIN indexes when queried
  • Using proper JSONB operators (->, ->>, @>, ?)
  • Connection pool configured with appropriate limits
  • Connections properly released (context managers, try/finally)
  • Appropriate transaction isolation level for use case
  • No long-running transactions holding locks
  • Advisory locks used for application-level coordination
  • Queries use parameterized statements (no SQL injection)

When to Load References

  • Reviewing SELECT queries with WHERE/JOIN → indexes.md
  • Reviewing JSONB columns or JSON operations → jsonb.md
  • Reviewing database connection code → connections.md
  • Reviewing BEGIN/COMMIT or concurrent updates → transactions.md

Review Questions

  1. Will this query use an index or perform a sequential scan?
  2. Are JSONB operations using appropriate operators and indexes?
  3. Are database connections properly managed and released?
  4. Is the transaction isolation level appropriate for this operation?
  5. Could this cause deadlocks or long-running locks?

Files

5 total
Select a file
Select a file to preview.

Comments

Loading comments…