dbx

dbx is a skill for Claude Code, Codex from storj/claude-plugins. It costs 52 tokens per session (2,439 once invoked), scanned A, original, MIT.

A database schema and code generator for Go programs. DBX can turn one schema description into SQL and Go code for PostgreSQL, CockroachDB, Google Cloud Spanner, or SQLite.

In plain words
What is it for?
Use it to define tables and models, generate Go database bindings, create SQL schemas, and write database operations for supported databases.
Why use it?
It reduces the need to write and maintain database definitions, models, and basic database access code by hand.

Skill for Claude CodeCodex

Part of the storj-developer plugin — 2 skills, 1 agent shipped together

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/storj/claude-plugins/dbx
Any agent
npx skills add storj/claude-plugins --skill dbx
Clone the repo
git clone --depth 1 https://github.com/storj/claude-plugins

Made for: Claude Code, Codex.

Or install storj-developer, the plugin that ships this one along with the rest of its 2 skills, 1 agent.

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/storj/claude-plugins/dbx.svg)](https://agentmods.dev/skills/storj/claude-plugins/dbx)
Your own site
<a href="https://agentmods.dev/skills/storj/claude-plugins/dbx"><img src="https://agentmods.dev/badge/skills/storj/claude-plugins/dbx.svg" alt="Measured on agentmods" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,439 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.00052 $0.02439
Opus 5 $0.00026 $0.01220
Sonnet 5 $0.00010 $0.00488
Haiku 4.5 $0.00005 $0.00244

Measured 3d ago against content hash 76e8e625eff7, 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 3d 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.

plugins/storj-developer/skills/dbx/SKILL.md · 377 lines

How it starts

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

DBX Database Code Generator

DBX generates database schemas and Go code for interacting with databases. It supports Postgres (pgx), CockroachDB (pgxcockroach), Spanner, and SQLite3 dialects.

Installation

go install storj.io/dbx@latest

CLI Commands

# Generate Go code
dbx golang [-p package] [-d dialect] [-t templates] [--userdata] [-i include.dbx] schema.dbx outdir

# Generate SQL schema
dbx schema [-d dialect] [-i include.dbx] schema.dbx outdir

# Format dbx file (reads stdin, writes stdout)
dbx format < input.dbx > output.dbx

Dialect Options

  • pgx (default) - PostgreSQL via pgx driver
  • pgxcockroach - CockroachDB via pgx driver
  • spanner - Google Cloud Spanner via go-sql-spanner
  • sqlite3 - SQLite3

Go Generate Directive

//go:generate dbx golang -d pgx -d pgxcockroach -d spanner schema.dbx .
//go:generate dbx schema -d pgx -d pgxcockroach -d spanner schema.dbx .

DBX File Syntax

DBX uses a tuple/list grammar. Lists are parentheses-enclosed comma-separated tuples. Newlines auto-insert commas.

Model Definition

model <name> (
    // Optional: custom table name
    table <table_name>

    // Required: primary key (single or composite)
    key <field_names>

    // Optional: unique constraints
    unique <field_names>

    // Optional: indexes
    index (
        name <index_name>
        fields <field_names>
        unique              // optional
        storing <fields>    // optional: include columns (covering index)
        where <condition>   // optional: partial index
    )

    // Fields
    field <name> <type> ( attributes )

    // Foreign key relations
    field <name> <model>.<field> <relation> ( attributes )
)

Field Types

Type Go Type Description
serial int Auto-incrementing integer
serial64 int64 Auto-incrementing 64-bit integer
int int 32-bit integer
int64 int64 64-bit integer
uint uint Unsigned 32-bit integer
uint64 uint64 Unsigned 64-bit integer
bool bool Boolean
text string Text/varchar
timestamp time.Time Timestamp with timezone
utimestamp time.Time Timestamp without timezone (UTC)
float float32 32-bit float
float64 float64 64-bit float
blob []byte Binary data
json []byte JSON data (uses JSON/JSONB SQL type)
date time.Time Date only

Read the full file on GitHub · 377 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. 3d ago First seen · 377 lines · 52 tokens per session scan A 76e8e625eff7

Subscribe to this mod's changes

dbx is a skill published in the GitHub repository storj/claude-plugins (3 stars, last pushed 3mo ago), licensed MIT. It adds 52 tokens to every session and 2,439 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-31.

Related

Other skills, from other repositories

drizzle

Use this skill when writing or modifying Drizzle ORM schemas, queries, or migrations in this repo — specifically the @internal/dashboard-agent-db package (the dashboard agent's conversation datastore). Covers pg-core schema definition, the postgres-js driver, drizzle-kit migrations, and this repo's conventions: a…

triggerdotdev/trigger.dev · 0 tokens

surf

Use this skill — NOT browser or webfetch — for ALL Surf crypto-data calls. 83 endpoints at localhost:8402/v1/surf/ covering CEX/DEX markets, on-chain SQL over 80+ ClickHouse tables (Ethereum, Base, Arbitrum, BSC, TRON, HyperEVM, Tempo), 100M+ labeled wallets, prediction markets (Polymarket + Kalshi), social/CT…

BlockRunAI/ClawRouter · 130 tokens

dinero-currency-patterns

Currency handling patterns for the Dinero.js money library. Use when working with multiple currencies, converting between currencies, defining custom currencies, storing monetary values in databases, or integrating with payment services like Stripe or PayPal. Triggers on currency conversion, database schema design for…

dinerojs/dinero.js · 71 tokens

ai-persistence/stores

Implement the MessageStore, RunStore, InterruptStore, MetadataStore contracts for @tanstack/ai-persistence against any database. defineAIPersistence, composePersistence overrides, critical invariants (full-replace saveThread, insert-if-absent createOrResume and interrupt create), authorize thread access…

TanStack/ai · 93 tokens

prisma-compute

Prisma Compute deployment and hosting guide. Use whenever the user mentions Prisma Compute, prisma.compute.ts, defineComputeConfig, deploying or hosting a Prisma app, @prisma/cli app deploy, compute:deploy, create-prisma --deploy, PRISMASERVICETOKEN, auth workspace, Compute apps/deployments/build logs/domains…

nitrocloudofficial/nitrostack · 153 tokens

data-warehouse-experimentation

Running experiments out of the data warehouse instead of via dedicated experiment platforms. SQL-based assignment, exposure logging discipline, metric definitions in dbt models, statistical analysis in SQL or Python, variance reduction with CUPED, sequential testing, and the operational tradeoffs vs platforms like…

rampstackco/claude-skills · 157 tokens