postgresql

Query and manage PostgreSQL databases using the psql CLI.

2|1|Updated Jul 19, 2024
One-click install
npx skills add https://github.com/TeamDay-AI/agents --skill postgresql-teamday-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postgresql
Source: https://github.com/TeamDay-AI/agents/tree/main/skills/teamday/postgresql
Command: npx skills add https://github.com/TeamDay-AI/agents --skill postgresql-teamday-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Querying and managing PostgreSQL databases via command line can be error-prone and repetitive across environments. This Skill provides a consistent psql-based workflow to connect, inspect schemas, run queries, and export results.

Core Features & Use Cases

  • Connect to PostgreSQL using a connection string (DATABASE_URL) and perform common tasks such as listing tables, describing schemas, and running queries.
  • Export results to CSV or JSON, inspect table structures, and perform basic DDL and DML operations in a repeatable manner.
  • Use across environments (Supabase, Neon, AWS RDS, Railway, or self-hosted) for data exploration, reporting, and maintenance tasks.

Quick Start

Run a query against a connected PostgreSQL database using the DATABASE_URL environment variable.

Frequently Asked Questions about postgresql

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

FAQPage Schema
How do I connect to a PostgreSQL database and list tables using psql?

To connect to a PostgreSQL database and list tables, use the psql CLI with the DATABASE_URL environment variable. Once connected, you can run common commands to list tables, describe schemas, and execute queries across cloud or self-hosted deployments.

Can I export PostgreSQL query results to CSV or JSON via the command line?

Yes, you can export PostgreSQL query results to CSV or JSON. This Skill provides a psql-based workflow to run queries and export data, supporting data exploration and reporting tasks in a repeatable manner across your environments.

Does this psql workflow support cloud databases like Supabase, Neon, and AWS RDS?

Yes, this psql workflow supports cloud databases like Supabase, Neon, AWS RDS, and Railway, as well as self-hosted PostgreSQL deployments. It handles connections via DATABASE_URL for consistent data exploration and maintenance across environments.

What is the best way to inspect a PostgreSQL schema from the command line?

The best way to inspect a PostgreSQL schema from the command line is using the psql CLI. This Skill enables you to describe table structures, inspect schemas, and perform basic DDL and DML operations repeatably without manual error-prone commands.

How do I handle psql connection errors and common pitfalls in PostgreSQL?

To handle psql connection errors and common pitfalls in PostgreSQL, this Skill provides guidance for error handling. It establishes a consistent psql-based workflow to avoid repetitive mistakes when connecting, inspecting schemas, and running queries across environments.