Postgres Cli
Execute SQL queries directly against PostgreSQL databases using command-line interface tools.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add postgres-cli npx -- -y @trustedskills/postgres-cli
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"postgres-cli": {
"command": "npx",
"args": [
"-y",
"@trustedskills/postgres-cli"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
The postgres-cli skill allows AI agents to interact with PostgreSQL databases using command-line interface (CLI) commands. It can execute SQL queries, manage database objects like tables and users, and perform administrative tasks directly from within the agent's workflow. This enables automated data manipulation and management without requiring a separate terminal or connection tool.
When to use it
- Automated Data Extraction: Retrieve specific data points from a PostgreSQL database for reporting or analysis.
- Database Schema Updates: Modify table structures, add indexes, or create new tables as part of an automated deployment process.
- User Management: Create, modify, or delete PostgreSQL user accounts and grant/revoke permissions programmatically.
- Data Backup & Restore: Initiate database backups or restore from existing backups for disaster recovery purposes.
Key capabilities
- Execute SQL queries
- Manage database objects (tables, users)
- Perform administrative tasks
Example prompts
- "Run the query 'SELECT * FROM customers WHERE city = 'London'' against my database."
- "Create a new table named 'orders' with columns for order_id, customer_id, and order_date."
- "Grant SELECT privileges on the 'products' table to the user 'data_analyst'."
Tips & gotchas
The skill requires access credentials (username and password) to connect to the PostgreSQL database. Ensure these are provided securely within the agent’s environment or configuration.
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
🌐 Community
Passed automated security scans.