Agent skill

Postgres Query Client

by evolution-foundation in evolution-foundation/evo-nexus

Runs read-only SQL queries and schema exploration against PostgreSQL databases declared in .env, chosen by label or index, with writes blocked unless a connection allows them.

Custom licenceAuto-check: notesDatabases

Install Postgres Query Client

skills CLI
$ npx skills add evolution-foundation/evo-nexus --skill db-postgres -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install evolution-foundation/evo-nexus db-postgres --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/evolution-foundation/evo-nexus.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/db-postgres .claude/skills/db-postgres && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
db-postgres
GitHub stars
544
Token cost
~1.8k tokens
SKILL.md length
383 words
Files
2 (incl. scripts)
Skills in repo
117
Repo updated
First seen
Licence
Custom licence

At a glance

Runs read-only SQL queries and schema exploration against PostgreSQL databases declared in .env, chosen by label or index, with writes blocked unless a connection allows them.

  • Works in 4 steps: If the user doesn't specify a label, run… → Write the smallest SQL that answers the… → Run via query. Inspect the result. → …
  • Querying or exploring data in a Postgres database
  • SKILL.md covers Setup — one-time, per database, Usage, Output shape and Guardrails, plus 3 more sections
  • Runs Python scripts from its folder; calls python3 and uv; needs DB_POSTGRES_1_PASSWORD and DB_POSTGRES_2_PASSWORD

What it does

Each database is declared in .env as a numbered block (DB_POSTGRES_1_*, DB_POSTGRES_2_* and so on) with a required label, and the agent picks one by label or index when it runs a command. A connection can be given as separate host and credential fields or as a single DSN, and the DSN wins when both are present. The bundled db_client.py script lists configured connections, health-checks one, runs a query and lists tables and schema.

Queries are read-only by default. A write is refused with a write_blocked error unless that connection's block sets ALLOW_WRITE to true. Every command prints one JSON line on stdout and reports errors as JSON on stderr with a non-zero exit, using codes such as not_found, ambiguous, driver_missing and connection_failed. When a result passes MAX_ROWS it is marked truncated and the full rows are saved to a CSV that the agent can read instead of re-running the query.

When your agent uses it

  • Querying or exploring data in a Postgres database
  • Auditing a table's contents with read-only SQL
  • Listing the tables and schemas of a configured connection
  • Health-checking a database connection from the agent

Example prompts

  • “How many users signed up in the last week in msgops-dev?”
  • “List all tables in the bms-prod database.”
  • “Run a health check on the evo-ai-dev connection.”
  • “Query the orders table in connection 2 and show the most recent rows.”

Requirements

  • Python 3 with psycopg2
  • A DB_POSTGRES_N_* block in .env for each database

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. If the user doesn't specify a label, run accounts to see what's configured and pick the one that matches their intent. If ambiguous, ask.
  2. Write the smallest SQL that answers the question — prefer aggregates, LIMIT, and EXPLAIN before dumping rows.
  3. Run via query. Inspect the result.
  4. For performance-sensitive queries, load the deep-dive references below.

What it can do on your machine

Read from SKILL.md and the folder at commit 7f5dd76. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3
    • uv

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • raw.githubusercontent.com
    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • DB_POSTGRES_1_PASSWORD
    • DB_POSTGRES_2_PASSWORD

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Postgres Query Client loads about 1.8k tokens when it runs. Until then it costs about 81 tokens; SKILL.md has 383 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~81
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:3
    Query PostgreSQL databases configured in .env (DB_POSTGRES_N_*). Use when the user asks to query, explore, or audit data
  • NoteMentions a .env fileSKILL.md:19
    Query Postgres databases declared in `.env`. Connections follow the same numbered pattern as `SOCIAL_YOUTUBE_N_*` / `SOC
  • NoteMentions a .env fileSKILL.md:23
    Add a block to `.env` (gitignored). Increment the index per connection:
  • NoteMentions a .env fileSKILL.md:32
    RES_1_PASSWORD=...                # raw; .env is gitignored
  • NoteMentions a .env fileSKILL.md:114
    tions` — no `DB_POSTGRES_N_*` blocks in `.env`

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 383 words (~1,776 tokens).

“Query Postgres databases declared in .env. Connections follow the same numbered pattern as SOCIAL_YOUTUBE_N_* / SOCIAL_INSTAGRAM_N_* — one block per database, labelled for humans, picked by label or index at call time.”

— opening of SKILL.md by evolution-foundation, Custom licence
name
db-postgres

Read the full SKILL.md on GitHub

Files

SKILL.md and 1 other file (scripts) in .claude/skills/db-postgres of evolution-foundation/evo-nexus.

  • SKILL.md
  • scripts/db_client.py

Open the folder on GitHubat commit 7f5dd76

Compare with similar skills

Postgres Query Client next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Postgres Query Client compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Postgres Query Client this skillevolution-foundation/evo-nexus544—~1.8kAutomated safety check: NotesCustom licence
Chdb SQLvemetric/vemetric3941 repos~1.2kAutomated safety check: PassApache-2.0
MoviePilot Database Operationjxxghp/MoviePilot12k—~7.1kAutomated safety check: PassGPL-3.0
Cloudsql Idle Connection Timeoutdivinevideo/divine-mobile265—~1.1kAutomated safety check: PassMPL-2.0
Psycopg2 Like Percent Escapedivinevideo/divine-mobile265—~1.1kAutomated safety check: PassMPL-2.0
Gaik ToolkitGAIK-project/gaik-toolkit100—~5.7kAutomated safety check: PassMIT

Similar skills

  • Chdb SQL

    vemetric/vemetric

    A skill your agent uses when the user wants to run SQL — especially analytical SQL — on local files (parquet/csv/json), URLs, S3 paths, or remote databases (Postgres, MySQL, MongoDB, ClickHouse…

    394 GitHub starsUsed in 1 repo~1.2k tokens
    DatabasesAuto-check passed
  • Inspects, queries and carefully modifies the MoviePilot SQLite or PostgreSQL database through a bundled script that reads connection settings itself, without needing the password in the prompt.

    12k GitHub stars~7.1k tokensUpdated today
    DatabasesAuto-check passed
  • Cloudsql Idle Connection Timeout

    divinevideo/divine-mobile

    Fix psycopg2 "could not receive data from server: Operation timed out" or "connection already closed" errors when using Cloud SQL with long-running Python scripts.

    265 GitHub stars~1.1k tokensUpdated today
    DatabasesAuto-check passed
  • Psycopg2 Like Percent Escape

    divinevideo/divine-mobile

    Fix psycopg2 "IndexError: tuple index out of range" when using LIKE with parameterized queries.

    265 GitHub stars~1.1k tokensUpdated today
    DatabasesAuto-check passed
  • Gaik Toolkit

    GAIK-project/gaik-toolkit

    GAIK toolkit overview and reference. An agent skill from GAIK-project/gaik-toolkit.

    100 GitHub stars~5.7k tokensUpdated yesterday
    Documents & OfficeAuto-check passed
  • Ravendb

    ravendb/docs

    Read this before writing any RavenDB query, client call or /databases/ request.

    115 GitHub stars~2.3k tokensUpdated yesterday
    DatabasesAuto-check passed

More from evolution-foundation/evo-nexus

All 117 skills in this repo
  • AI Image Creator

    evolution-foundation/evo-nexus

    Generates PNG images through OpenRouter models, with transparent backgrounds and reference-image edits, and describes existing images with multimodal vision.

    544 GitHub stars~5.1k tokensUpdated 4 mo ago
    Auto-check: notes
  • MongoDB Query Client

    evolution-foundation/evo-nexus

    Runs read-only MongoDB finds, aggregations and collection listings against databases named in your .env, choosing the connection by label or index.

    544 GitHub stars~1.1k tokensUpdated 4 mo ago
    Auto-check: notes
  • MySQL and MariaDB Query Tool

    evolution-foundation/evo-nexus

    Queries MySQL or MariaDB databases declared in .env by label, read-only by default unless a connection explicitly allows writes.

    544 GitHub stars~1.9k tokensUpdated 4 mo ago
    Auto-check: notes
  • Redis Inspector

    evolution-foundation/evo-nexus

    Reads keys and server state from Redis instances configured in .env through a read-only Python client, choosing connections by label or index.

    544 GitHub stars~1.3k tokensUpdated 4 mo ago
    Auto-check: notes
  • Int Bling

    evolution-foundation/evo-nexus

    Bling ERP integration via API v3. An agent skill from evolution-foundation/evo-nexus.

    544 GitHub stars~2.5k tokensUpdated 4 mo ago
    Auto-check: notes
  • Int Evo CRM

    evolution-foundation/evo-nexus

    Query and manage Evo AI CRM data via REST API. An agent skill from evolution-foundation/evo-nexus.

    544 GitHub stars~2k tokensUpdated 4 mo ago
    Auto-check passed

Categories

Questions about Postgres Query Client

What does Postgres Query Client do?

Runs read-only SQL queries and schema exploration against PostgreSQL databases declared in .env, chosen by label or index, with writes blocked unless a connection allows them. env as a numbered block (DB_POSTGRES_1_*, DB_POSTGRES_2_* and so on) with a required label, and the agent picks one by label or index when it runs a command. A connection can be given as separate host and credential fields or as a single DSN, and the DSN wins when both are present.

When should I use Postgres Query Client?

Postgres Query Client fits situations like: querying or exploring data in a Postgres database; auditing a table's contents with read-only SQL; listing the tables and schemas of a configured connection; health-checking a database connection from the agent.

How do I install Postgres Query Client in Claude Code?

Run `npx skills add evolution-foundation/evo-nexus --skill db-postgres -a claude-code`. Or copy the skill folder (.claude/skills/db-postgres in evolution-foundation/evo-nexus) into .claude/skills/db-postgres in your project. Claude Code loads it when a task matches its description.

How do I install Postgres Query Client in Codex?

Run `npx skills add evolution-foundation/evo-nexus --skill db-postgres -a codex`. Or copy the skill folder (.claude/skills/db-postgres in evolution-foundation/evo-nexus) into .agents/skills/db-postgres in your project. Codex loads it when a task matches its description.

Can I use Postgres Query Client in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add evolution-foundation/evo-nexus --skill db-postgres -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/db-postgres, .gemini/skills/db-postgres, .github/skills/db-postgres and .opencode/skills/db-postgres in your project.

What does Postgres Query Client need to run?

Going by SKILL.md and its folder, Postgres Query Client needs Python for the scripts in its folder, the command-line tools its instructions call (python3 and uv) and credentials named DB_POSTGRES_1_PASSWORD and DB_POSTGRES_2_PASSWORD. Our summary lists: Python 3 with psycopg2; A DB_POSTGRES_N_* block in .env for each database.

Does Postgres Query Client access the network?

SKILL.md names 2 domains. As links in the text: raw.githubusercontent.com and github.com. This is read from the text; nothing was executed.

Is Postgres Query Client safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Postgres Query Client use?

Postgres Query Client has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.

How many tokens does Postgres Query Client use?

About 1.8k tokens (SKILL.md is roughly 7.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Postgres Query Client?

Skills that share tags, products or a category with Postgres Query Client: Chdb SQL (vemetric/vemetric, 394 stars), MoviePilot Database Operation (jxxghp/MoviePilot, 12k stars), Cloudsql Idle Connection Timeout (divinevideo/divine-mobile, 265 stars) and Psycopg2 Like Percent Escape (divinevideo/divine-mobile, 265 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Postgres Query Client?

evolution-foundation (a GitHub organization) maintains it in evolution-foundation/evo-nexus, which has 544 GitHub stars. The repository holds 117 skills in this directory. The repository was last updated on May 13, 2026.

Source: evolution-foundation/evo-nexus on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.