Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add abdullahkhawer/devops-skills --skill postgresql-cligit clone --depth 1 https://github.com/abdullahkhawer/devops-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/abdullahkhawer/devops-skills/postgresql-cli)<a href="https://agentmods.dev/skills/abdullahkhawer/devops-skills/postgresql-cli"><img src="https://agentmods.dev/badge/skills/abdullahkhawer/devops-skills/postgresql-cli/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/abdullahkhawer/devops-skills/postgresql-cli"><img src="https://agentmods.dev/badge/skills/abdullahkhawer/devops-skills/postgresql-cli.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00030 | $0.00916 |
| Opus 5.5 | $0.00012 | $0.00366 |
| Sonnet 5.5 | $0.00006 | $0.00183 |
| Haiku 4.5 | $0.00003 | $0.00092 |
Grade B, and why
postgresql-cli scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 23d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Asks for rootmediumPrivilege escalation
A mod that escalates privileges can change anything on the machine, not only the project.
Configure `~/.pg_service.conf` with a named `[service]` section per environment, and store credentials in a `.pgpass` file (`hostname:port:database:username:password`, `chmod 600`). Never share credential file contents w How it starts
The opening of the file, as written. The whole thing — 90 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PostgreSQL CLI Skill
Use the connection table and rules below when constructing all psql commands.
Configuration
Update the table below with your connection details before using this skill:
| Environment | Connection Service Name | Credential File |
|---|---|---|
| Production | <your-prod-service> |
~/.postgresql/prod.pgpass |
| Staging / Non-Prod | <your-nonprod-service> |
~/.postgresql/staging.pgpass |
If the target environment is unclear, ask the user before running any command.
Prerequisites (one-time setup by user)
If psql is not installed or no connection service is configured, inform the user that setup is required and ask them to complete the following steps manually. Do not perform these steps yourself.
brew install libpq && brew link --force libpq
Configure ~/.pg_service.conf with a named [service] section per environment, and store credentials in a .pgpass file (hostname:port:database:username:password, chmod 600). Never share credential file contents with the assistant.
Command Format
Always use service=<name> from ~/.pg_service.conf — never pass raw host/user/password on the command line, where they could leak into shell history or process listings:
psql "service=<connection-service-name>" -c "<SQL>"
Examples
# Non-Prod — list tables
psql "service=<your-nonprod-service>" -c "\dt"
# Non-Prod — describe a table
psql "service=<your-nonprod-service>" -c "\d <table_name>"
Available Commands
Read-only (safe, no confirmation needed)
| Command | Description |
|---|---|
\l |
List databases |
\dt [pattern] |
List tables |
\d <table> |
Describe a table's schema |
\dn |
List schemas |
\du |
List roles/users |
\di |
List indexes |
SELECT ... |
Any read-only query |
EXPLAIN <query> |
Show a query plan without executing it |
\timing |
Toggle query timing (informational) |
Mutating operations (confirm with user before running)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 23d ago First seen · 90 lines · 30 tokens per session scan B 792108af1a46
postgresql-cli is a skill published in the GitHub repository abdullahkhawer/devops-skills (8 stars, last pushed 24d ago), licensed Apache-2.0. It adds 30 tokens to every session and 916 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-23.
Other skills, from other repositories
alembic-migration
Create, review, and apply database schema changes with Alembic. Use whenever a SQLAlchemy model is added or changed, a column/index/constraint needs to change, or a data backfill is required — anything that alters the PostgreSQL schema.
supabase-cli
This skill should be used when user asks to "use supabase CLI", "supabase init", "supabase start", "run migrations", "deploy edge functions", "manage Supabase project", or works with the supabase command-line tool for local development and project management.
supabase-js
This skill should be used when user asks to "use supabase-js", "query Supabase database", "supabase auth", "supabase storage", "supabase realtime", "supabase edge functions", or works with the @supabase/supabase-js JavaScript/TypeScript SDK.
mongodb-query-optimizer
Help with MongoDB query optimization and indexing. Use only when the user asks for optimization or performance: "How do I optimize this query?", "How do I index this?", "Why is this query slow?", "Can you fix my slow queries?", "What are the slow queries on my cluster?", etc. Do not invoke for general MongoDB query…
polar-local-environment
This skill should be used when setting up or managing Polar local development environment with Docker.
sql-optimizer
Analyzes SQL queries for missing indexes, N+1 patterns, suboptimal joins, and full table scans. Interprets EXPLAIN, detects anti-patterns, rewrites queries. Triggers on: "optimize this query", "slow query", "add indexes", "explain plan", "N+1 query", "why is this query slow".