PostgreSQL

Provide PostgreSQL patterns for queries, indexing, and schema migrations.

Updated Dec 30, 2025
One-click install
npx skills add https://github.com/vietlinhh02/cogninote --skill postgresql-vietlinhh02
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: PostgreSQL
Source: https://github.com/vietlinhh02/cogninote/tree/main/.claude/skills/databases/postgresql
Command: npx skills add https://github.com/vietlinhh02/cogninote --skill postgresql-vietlinhh02

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides guidance and examples for common PostgreSQL database operations, helping users write efficient queries, design effective indexes, and manage schema changes.

Core Features & Use Cases

  • Query Optimization: Learn how to write and optimize SQL queries for better performance.
  • Indexing Strategies: Understand how to create and use indexes to speed up data retrieval.
  • Schema Management: Examples for common database schema modifications like adding columns or constraints.
  • Use Case: Improve the performance of a slow-running report by analyzing its query and adding appropriate indexes.

Quick Start

Show me how to create a composite index on the 'users' table for the 'email' and 'created_at' columns.

Frequently Asked Questions about PostgreSQL

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize slow PostgreSQL queries for better performance?

Optimize PostgreSQL queries by analyzing execution plans and applying proper indexing strategies to accelerate data retrieval. This Skill provides patterns for writing efficient SQL queries to improve overall database performance.

What is the best way to create a composite index in PostgreSQL?

Creating a composite index in PostgreSQL involves using the CREATE INDEX statement on multiple table columns, such as 'email' and 'created_at'. This Skill provides specific examples for designing effective indexes to speed up data retrieval.

How do I manage schema migrations and modify tables in PostgreSQL?

Manage PostgreSQL schema migrations by using ALTER TABLE statements to add columns or constraints for schema evolution. This Skill offers examples for common database schema modifications to help manage database structures effectively.

When do I need to add indexes to a PostgreSQL database table?

You need to add indexes to a PostgreSQL database table when you experience slow data retrieval or performance issues with specific queries. This Skill helps you understand indexing strategies to speed up data retrieval for slow-running reports.

Does this Skill provide schema design patterns for database administrators?

Yes, this Skill provides schema design patterns and best practices for PostgreSQL database operations applicable to both database administrators and developers for optimizing performance and managing database structures.