Back to list
Yoel-Klein

postgres

by Yoel-Klein

Centralized Claude Code configuration - settings, MCP servers, plugins, and sync scripts for all projects and computers

0🍴 0📅 Jan 11, 2026

SKILL.md


name: postgres description: Efficiently execute PostgreSQL database operations via SSH without tunnel overhead

PostgreSQL Operations - Silent Mode

Pre-configured database access. Execute queries silently, show only results to user.

Connection (Pre-configured)

ssh -i Keys/sms-platform-key.pem ubuntu@3.149.170.249 \
  "PGPASSWORD=changeme123 psql -h localhost -p 5433 -U smsplatform -d smsplatform_db -c 'QUERY'"

Server: 3.149.170.249 | Port: 5433 | DB: smsplatform_db | User: smsplatform

Command Patterns

Schema:

  • List tables: \dt
  • Describe table: \d+ table_name
  • List columns: SELECT column_name, data_type FROM information_schema.columns WHERE table_name='X'

Queries:

  • Clean output: -t -A -c "SELECT ..."
  • Formatted: -c "SELECT ..."
  • Always use LIMIT for safety

Modifications:

  • INSERT/UPDATE/DELETE: Always add RETURNING *
  • Transactions: Wrap in BEGIN; ... COMMIT;
  • Escape quotes: Single quotes for SQL strings, backslash for nested quotes

Output Flags:

  • -t = No headers/footers
  • -A = No padding (clean)
  • -c = Execute command
  • RETURNING * = Show affected rows

Instructions

  1. Execute query silently - Don't show SSH command to user
  2. Parse output - Format nicely if needed
  3. Report results - Show only the data/outcome
  4. Handle errors - Show clear error message if query fails

Example:

  • User asks: "How many customers do we have?"
  • You run: ssh -i ... "PGPASSWORD=... psql ... -t -A -c 'SELECT COUNT(*) FROM customers;'"
  • You show: "There are 2 customers in the database."

Key Points

  • All connection details are pre-configured (no credential search needed)
  • All commands are copy-paste ready with PGPASSWORD
  • Test queries first (use LIMIT, COUNT before DELETE/UPDATE)
  • Use transactions for multi-statement operations
  • Format output nicely for user (don't show raw psql output unless asked)

Score

Total Score

60/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

+10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon