dbx

dbx is a skill for Claude Code, Codex from t8y2/dbx. It costs 61 tokens per session (1,739 once invoked), scanned A, original, Apache-2.0.

Instructions for DBX, a command-line tool that explores database structures and runs read-only SQL queries through connections configured in DBX Desktop. They explain connections, tables, columns, and compact database context for AI prompts.

In plain words
What is it for?
Use it to list database connections, view tables and columns, describe schemas, run read-only queries, or create a compact schema summary for an AI task.
Why use it?
They let an agent inspect database structure and data while keeping database access read-only by default. Safety checks prevent writes or dangerous SQL unless explicitly allowed.

Skill for Claude CodeCodex

Install

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.

agentmods
npx agentmods add skills/t8y2/dbx/dbx
Any agent
npx skills add t8y2/dbx --skill dbx
Clone the repo
git clone --depth 1 https://github.com/t8y2/dbx

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for dbx

README.md
[![agentmods](https://agentmods.dev/badge/skills/t8y2/dbx/dbx.svg)](https://agentmods.dev/skills/t8y2/dbx/dbx)
Your own site
<a href="https://agentmods.dev/skills/t8y2/dbx/dbx"><img src="https://agentmods.dev/badge/skills/t8y2/dbx/dbx.svg" alt="Measured on agentmods" height="20"></a>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,739 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00061 $0.01739
Opus 5 $0.00030 $0.00870
Sonnet 5 $0.00012 $0.00348
Haiku 4.5 $0.00006 $0.00174

Measured 4d ago against content hash 621c6c914971, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

dbx scanned grade A with 0 findings 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 4d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/dbx/SKILL.md · 172 lines

How it starts

The opening of the file, as written. The whole thing — 172 lines — stays where its author put it; the contents beside it link to each section on GitHub.

DBX CLI

Prerequisite: DBX Desktop must be installed and configured with at least one connection. Run dbx doctor to verify setup. Install CLI: npm install -g @dbx-app/cli

Core Concepts

  • Connection: A named database connection configured in DBX Desktop (e.g. "prod", "local"). Identified by name.
  • Schema: Tables and views within a connection. Listed via dbx schema list.
  • Query: Read-only SQL executed against a connection. Gated by --allow-writes and --allow-dangerous-sql.
  • Context: Compact schema dump optimized for AI prompts — smaller and more focused than full schema output.

Resource Relationships

DBX Desktop
├── Connection (named)
│   ├── Schema (tables, views)
│   │   └── Table
│   │       └── Column (name, type, nullable, default)
│   └── Query (read-only by default)
└── Context (prompt-optimized schema dump)

Commands

⛔ NEVER bypass dbx CLI for database operations. If dbx returns SQL_BLOCKED or any error, do NOT use Python sqlite3, shell redirects, or any other tool to access the database directly. Always respect the CLI's safety gates. When in doubt, tell the user what the CLI returned and ask for their decision.

1. Check Setup

dbx doctor
dbx capabilities

Use doctor when the agent starts or when a command fails — it reveals whether the desktop bridge, connection DB, and native SQLite loader are available. Use capabilities to check which databases support direct execution vs require the desktop bridge.

2. List Connections

dbx connections list --json

Returns connections without exposing secrets. Parse JSON to present a clean list to the user. Always run this first before any schema or query operation — the user might not remember connection names.

3. Explore Schema

# List all tables in a connection
dbx schema list <connection> --json

# Describe a specific table
dbx schema describe <connection> <table> --json

Use schema list to survey what's available, then schema describe on specific tables the user asks about. Present column names, types, and nullability clearly.

Read the full file on GitHub · 172 lines

Changes

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.

  1. 4d ago First seen · 172 lines · 61 tokens per session scan A 621c6c914971

Subscribe to this mod's changes

dbx is a skill published in the GitHub repository t8y2/dbx (17,467 stars, last pushed 4d ago), licensed Apache-2.0. It adds 61 tokens to every session and 1,739 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.