dbcli

    1

    Read-only Postgres exploration and querying with enforced row caps and statement timeouts.

    Free

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    dbcli

    Example session with this skill installed

    Use dbcli to check the structure of the 'users' table in the 'public' schema and show me 3 sample rows.

    • Read your context and instructions
    • Compiled the dbcli

    I have inspected the users table structure and retrieved a sample of the data using dbcli.

    Table Inspection: public.users

    Table Structure

    ColumnTypeNullableConstraints
    iduuidNOPRIMARY KEY
    emailvarchar(255)NOUNIQUE
    created_attimestamptzNODEFAULT now()
    last_logintimestamptzYES-
    metadatajsonbYES-

    Data Sample

    idemailcreated_atlast_login
    550e8400-e29b...dev@example.com2023-10-01T10:00:00Z2024-05-20T14:22:01Z
    6ba7b810-9dad...ops@example.com2023-11-15T08:30:00Z2024-05-19T09:15:30Z
    7c9e6679-7425...test@example.com2024-01-05T12:00:00Znull

    Next steps

    1. Run a filtered query if you need to find specific user records.
    2. Check dbcli describe users to see indexes and foreign key references to other tables.
    3. Use dbcli schemas if you need to explore tables outside the public schema.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Manual SQL exploration often leads to accidental data mutation or performance-draining queries that lock production tables. This skill provides a safe, read-only interface for inspecting Postgres databases using dbcli. It enforces strict boundaries on row counts and execution time, ensuring your agent can explore schemas and verify data without risking database integrity.

    What it does

    • Schema discovery lists all non-system schemas to understand high-level database organization.
    • Table inspection retrieves table lists within specific schemas and describes columns, indexes, and constraints.
    • Data sampling pulls real row examples from tables to verify column types and content patterns.
    • Safe querying executes arbitrary SQL inside read-only transactions with hard row caps and statement timeouts.
    • Connection management handles database profiles securely via stdin to prevent credential leakage in shell history.

    How it works

    1. Environment check involves running dbcli version and assisting with installation via Go or prebuilt binaries if missing.
    2. Authorized discovery uses the schemas and schema commands to map the database structure before writing queries.
    3. Deep inspection utilizes describe to view indexes, enum values, and foreign key references for specific tables.
    4. Execution runs the query command, parsing the resulting JSON envelope for data or structured error codes.

    Frameworks & tools

    This skill requires the dbcli binary. It interfaces with Postgres databases and can identify local instances via docker ps or pg_isready.

    Why this beats prompting it yourself

    Writing raw SQL through an agent often results in syntax errors on complex types or accidental UPDATE attempts. This skill uses a specialized CLI that pre-validates SQL, enforces a READ ONLY transaction state, and returns structured JSON that is easier for LLMs to parse than messy ASCII tables.

    Use cases

    • Auditing database schemas to generate documentation or ERDs.
    • Sampling production data safely to troubleshoot application-level bugs.
    • Running analytical read-only queries without risking table locks.
    • Onboarding agents to unfamiliar databases through systematic discovery steps.

    Known limitations

    Does not support write operations like INSERT, UPDATE, or DELETE. Queries are subject to a default 5-second timeout and a 500-row cap to prevent resource exhaustion.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Data & Databases.

    Read-only access only. Hard row cap (500 default) and 5s statement timeout. Requires dbcli binary installation. Supports Postgres only.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 3 days ago

    • Free with an Agensi account

    Permissions

    Write Files
    Network Access
    Listed3 days ago

    What's inside

    Frequently Asked Questions

    The skill enforces a strict read-only transaction state and applies mandatory row caps and statement timeouts. This prevents the agent from accidentally modifying data or executing resource-heavy queries that could lock production tables.

    This skill requires the `dbcli` binary installed on the host system (available via Go or prebuilt binaries). It is designed to work with any AI agent framework capable of executing shell commands and parsing JSON output.

    No, this skill is strictly for read-only exploration and data sampling. Any SQL commands containing `INSERT`, `UPDATE`, `DELETE`, or other DDL/DML mutation attempts will be blocked or fail within the enforced read-only transaction.

    The skill returns data in a structured JSON envelope rather than raw text tables. This allows the AI agent to accurately parse column values, types, and error codes without the "hallucination" risks often associated with messy ASCII formatting.

    Yes, the skill can identify and connect to local Postgres instances via `docker ps` or `pg_isready`, as well as remote databases via secure connection profiles. Credentials are piped via stdin to ensure they never appear in your shell history.

    New in Data & Databases

    Free