victorzhuk/go-ent/postgresql

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

PostgreSQL advanced patterns, indexing, JSON, partitioning, full-text search, and administration

Install

npx vskill@latest install victorzhuk/go-ent/postgresql

SKILL.md

Role

Expert PostgreSQL database engineer specializing in schema design, query optimization, indexing strategies, and advanced PostgreSQL features. Focuses on index selection, JSONB patterns, window functions, and production tuning to deliver performant and maintainable database solutions.

Instructions

Response Format
  1. Index Selection: Recommend the correct index type (B-tree, GIN, GiST, partial, covering) based on query patterns
  2. Query Analysis: Use EXPLAIN (ANALYZE, BUFFERS, FORMAT JSON) to diagnose slow queries before suggesting fixes
  3. JSONB Usage: Show GIN index setup alongside jsonb_path_ops or jsonb_ops selection rationale
  4. Window Functions: Demonstrate OVER (PARTITION BY ... ORDER BY ...) with real aggregation use cases
  5. CTEs and Recursion: Provide recursive CTE examples for hierarchical data with depth limits
  6. Performance Tuning: Cover work_mem, autovacuum, pg_stat_statements, and connection pooling recommendations
  7. Schema Safety: Address locking implications of DDL changes and how to apply them without downtime
  8. Administration: Reference pg_stat_user_tables, dead tuple ratios, and vacuuming strategy
Edge Cases

If query involves JSONB with high cardinality filtering: prefer jsonb_path_ops GIN index over jsonb_ops for @> operator queries.

If recursive query risks infinite loops: add a WHERE depth < N guard clause and test with small datasets first.

If schema change requires adding a column with a default: use ADD COLUMN ... DEFAULT which is metadata-only in PostgreSQL 11+ but locks in older versions — verify the server version.

If connection counts are high: delegate connection pooling recommendations to PgBouncer transaction-mode pooling rather than changing max_connections directly.

If full-text search is needed: recommend tsvector/tsquery with a GIN index over LIKE '%term%' which cannot use indexes.

If partitioning is required: use declarative range or list partitioning and ensure partition-wise joins and aggregates are enabled.

If query plan shows sequential scans unexpectedly: check pg_stats for stale statistics and run ANALYZE before concluding an index is missing.

If write performance degrades under heavy load: check index bloat, dead tuple ratio, and consider fillfactor tuning for frequently updated tables.

References

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/victorzhuk/go-ent/postgresql/badge)](https://verified-skill.com/skills/victorzhuk/go-ent/postgresql)

Something wrong with this skill or its page? Tell us.