dbx

dbx is a skill for Claude Code 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 Code

Written for Claude Code: argument-hint in frontmatter.

Part of the storj-developer plugin — 6 skills, 2 agents shipped together

Good fit Use it to define tables and models, generate Go database bindings, create SQL schemas, and write database operations for supported databases.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/storj/claude-plugins/dbx
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.

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.

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

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/github.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/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.

agentmods 80×15 button for dbx

Your own site · 80×15
<a href="https://agentmods.dev/skills/storj/claude-plugins/dbx"><img src="https://agentmods.dev/badge/skills/storj/claude-plugins/dbx.svg" alt="Reviewed on agentmods" width="80" 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. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00052 $0.02439
Opus 5.5 $0.00021 $0.00976
Sonnet 5.5 $0.00010 $0.00488
Haiku 4.5 $0.00005 $0.00244

Measured 1mo ago against content hash 76e8e625eff7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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. 1mo 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 9d ago), licensed MIT. It adds 52 tokens to every session and 2,439 once invoked, about $0.0002 per session on Opus 5.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

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens