PostgreSQL psql (PostgreSQL interactive terminal) is the primary command-line client for interacting with PostgreSQL databases. It provides both interactive query execution and powerful scripting capabilities for database management and administration.
Works with
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versionpostgresql-psqlExecute the skills CLI command in your project's root directory to begin installation:
Fetches postgresql-psql from timelessco/recollect and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate postgresql-psql. Access via /postgresql-psql in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Create detailed user stories, acceptance criteria, and feature specs
Example
Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios
Reduce spec writing time by 50%, ensure comprehensive coverage
Research competitors, compare features, identify gaps
Example
Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities
Complete competitive research in 2 hours instead of 2 days
Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs
Example
Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale
0
total installs
0
this week
35
GitHub stars
0
upvotes
Run in your terminal
0
installs
0
this week
35
stars
PostgreSQL psql (PostgreSQL interactive terminal) is the primary command-line client for interacting with PostgreSQL databases. It provides both interactive query execution and powerful scripting capabilities for database management and administration.
Use this skill when:
\dt, \d)psql [OPTIONS] [DBNAME [USERNAME]]
# Connect with username and host
psql -U username -h hostname -p 5432 -d database_name
# Connect using connection string
psql postgresql://username:password@hostname:5432/database_name
# Connect with password prompt
psql -U postgres -h localhost -W
# Connect to specific database on local machine
psql -d myapp_development
# Environment variables (alternative)
export PGUSER=postgres
export PGPASSWORD=mypassword
export PGHOST=localhost
export PGPORT=5432
export PGDATABASE=mydb
psql
Standard URI format:
postgresql://[user[:password]@][netloc][:port][/dbname][?param1=value1&...]
Example:
postgresql://app_user:[email protected]:5432/production_db?sslmode=require
Password file (.pgpass):
# ~/.pgpass (chmod 600)
hostname:port:database:username:password
localhost:5432:mydb:postgres:mypassword
*.example.com:5432:*:appuser:apppass
Connection via SSH tunnel:
ssh -L 5432:localhost:5432 user@remote-host
psql -U postgres -h localhost
# Require SSL
psql -h hostname -sslmode require -U username database
# Verify certificate
psql -h hostname -sslmode verify-full \
-sslcert=/path/to/client-cert.crt \
-sslkey=/path/to/client-key.key \
-sslrootcert=/path/to/ca-cert.crt database
# SSL modes: disable, allow, prefer (default), require, verify-ca, verify-full
\l or \list # List all databases
\l+ or \list+ # List databases with sizes
\c or \connect DATABASE USER # Connect to different database
\dn or \dn+ # List schemas (namespaces)
\dt or \dt+ # List tables in current schema
\di or \di+ # List indexes
\dv or \dv+ # List views
\dm or \dm+ # List materialized views
\ds or \ds+ # List sequences
\df or \df+ # List functions/procedures
\da or \da+ # List aggregates
\dT or \dT+ # List data types
\dF or \dF+ # List text search configurations
\d or \d NAME # Describe table, view, index, sequence, or function
\d+ or \d+ NAME # Extended description with details
\da PATTERN # List aggregate functions matching pattern
\db or \db+ # List tablespaces
\dc or \dc+ # List character set encodings
\dC or \dC+ # List type casts
\dd or \dd+ # List object descriptions/comments
\dD or \dD+ # List domains
\de or \de+ # List foreign data wrappers
\dE or \dE+ # List foreign servers
\dF or \dF+ # List text search configurations
\dFd or \dFd+ # List text search dictionaries
\dFp or \dFp+ # List text search parsers
\dFt or \dFt+ # List text search templates
\dg or \dg+ # List database roles/users
\dl or \dl+ # List large objects (same as \lo_list)
\dL or \dL+ # List procedural languages
\dO or \dO+ # List collations
\dp or \dp+ # List table access privileges
\dRp or \dRp+ # List replication origins
\dRs or \dRs+ # List replication subscriptions
\ds or \ds+ # List sequences
\dt or \dt+ # List tables
\dU or \dU+ # List user mapping
\du or \du+ # List roles
\dv or \dv+ # List views
\dx or \dx+ # List extensions
\dX or \dX+ # List extended statistics
\a # Toggle between aligned and unaligned output
\C [STRING] # Set table title
\f [STRING] # Set field separator for unaligned output
\H # Toggle HTML output mode
\pset OPTION [VALUE] # Set output option (detailed below)
\t [on|off] # Toggle tuple-only output (no headers/footers)
\T [STRING] # Set HTML table tag attributes
\x or \x [on|off|auto] # Toggle expanded/vertical output
\g or \g [FILENAME|COMMAND] # Execute query and send output to file/command
\pset border [0-2] # Set border display (0=none, 1=ascii, 2=unicode)
\pset columns WIDTH # Set column width limit
\pset csv # Set CSV output format
\pset expanded [on|off|auto] # Toggle expanded output
\pset fieldsep STRING # Set field separator
\pset footer [on|off] # Toggle footer display
\pset format [aligned|unaligned|csv|tsv|html|latex|latex-longtable|troff-ms]
\pset header [on|off] # Toggle header display
\pset linestyle [ascii|old-ascii|unicode] # Set line drawing style
\pset null STRING # Set string to represent NULL
\pset numericlocale [on|off] # Toggle locale-specific number formatting
\pset pager [on|off|always] # Control pager usage
\pset recordsep STRING # Set record separator
\pset recordsep0 [on|off] # Use null terminator between records
\pset tableattr STRING # Set HTML table attributes
\pset title STRING # Set query title
\pset tuples_only [on|off] # Toggle tuple-only mode
\copy QUERY TO FILENAME [FORMAT] # Client-side COPY (requires fewer permissions)
\copy QUERY TO STDOUT # Copy to standard output
\copy TABLE FROM FILENAME [FORMAT] # Import data from file
\e or \edit # Edit current query buffer in editor
\e FILENAME # Edit file in editor
\ef [FUNCNAME] # Edit function definition
\ev [VIEWNAME] # Edit view definition
\w FILENAME or \write FILENAME # Write current query buffer to file
\i FILENAME or \include FILENAME # Execute SQL commands from file
\ir FILENAME or \include_relative FILE # Execute relative path file
\s [FILENAME] # Show command history (or save to file)
\o FILENAME or \out FILENAME # Send all output to file
\o # Return output to terminal
\echo TEXT # Print text (useful in scripts)
\errverbose # Show last error in verbose form
\q or \quit # Quit psql
\! COMMAND or \shell COMMAND # Execute shell command
\cd DIRECTORY # Change working directory
\pwd # Print current working directory
\set VARIABLE VALUE # Set psql variable
\unset VARIABLE # Unset psql variable
\setenv VARNAME VALUE # Set environment variable
\getenv VARNAME # Get environment variable value
\prompt [TEXT] VARIABLE # Prompt user for input and set variable
\begin or BEGIN # Start transaction
\commit or COMMIT # Commit transaction
\rollback or ROLLBACK # Rollback transaction
\savepoint NAME # Create savepoint
\release SAVEPOINT # Release savepoint
\rollback TO SAVEPOINT # Rollback to savepoint
\d+ TABLENAME # Show table with extended info and storage info
\dt *.* # List all tables in all schemas
\dn * # List all schemas
\du # List all users/roles
\db # List tablespaces
\dx # List installed extensions
\h or \help # List available SQL commands
\h COMMAND or \help COMMAND # Show help for specific SQL command
\? # Show psql help
\copyright # Show PostgreSQL copyright/license info
\version or SELECT version() # Show PostgreSQL version
-h, --host=HOSTNAME # Server host name (default: localhost)
-p, --port=PORT # Server port (default: 5432)
-U, --username=USERNAME # PostgreSQL user name (default: $USER)
-d, --dbname=DBNAME # Database name to connect
-w, --no-password # Never prompt for password
-W, --password # Force password prompt
-A, --no-align # Unaligned table output mode
-c, --command=COMMAND # Run single command and exit
-C, --copy-only # (deprecated, use \copy instead)
-d, --dbname=DBNAME # Specify database
-E, --echo-hidden # Display internal queries
-e, --echo-all # Display each command before sending
-b, --echo-errors # Display failed commands
-f, --file=FILENAME # Execute commands from file
-F, --field-separator=CHAR # Set field separator for unaligned output
-H, --html # HTML table output mode
-l, --list # List available databases and exit
-L, --log-file=FILENAME # Log session to file
-n, --no-readline # Disable readline (line editing)
-o, --output=FILENAME # Write results to file
-P, --pset=VARIABLE=VALUE # Set printing option
-q, --quiet # Run quietly (no banner, single-line mode)
-R, --record-separator=CHAR # Set record separator for unaligned output
-S, --single-step # Single-step mode (confirm each command)
-s, --single-transaction # Execute file in single transaction
-t, --tuples-only # Print rows only (no headers/footers)
-T, --table-attr=STRING # Set HTML table tag attributes
-v, --set=VARIABLE=VALUE # Set psql variable
-V, --version # Show version and exit
-x, --expanded Make data-driven prioritization decisions faster
Draft PRDs, status updates, and stakeholder presentations
Example
Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement
Save 3-5 hours/week on communication overhead
Prerequisites
Time Estimate
30-60 minutes to see productivity improvements
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.
✗ Avoid when
Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.
mattpocock/skills
parcadei/continuous-claude-v3
cursor/plugins
ailabs-393/ai-labs-claude-skills
ailabs-393/ai-labs-claude-skills
pproenca/dot-skills
We added postgresql-psql from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
Solid pick for teams standardizing on skills: postgresql-psql is focused, and the summary matches what you get after install.
postgresql-psql reduced setup friction for our internal harness; good balance of opinion and flexibility.
postgresql-psql has been reliable in day-to-day use. Documentation quality is above average for community skills.
We added postgresql-psql from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
postgresql-psql fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
postgresql-psql reduced setup friction for our internal harness; good balance of opinion and flexibility.
postgresql-psql has been reliable in day-to-day use. Documentation quality is above average for community skills.
Registry listing for postgresql-psql matched our evaluation — installs cleanly and behaves as described in the markdown.
Solid pick for teams standardizing on skills: postgresql-psql is focused, and the summary matches what you get after install.
showing 1-10 of 68