metabase-flightsql-driver: Command for Claude Code

.claude/commands/rebuild-driver.md

rebuild-driver is a command for Claude Code from J0hnG4lt/metabase-flightsql-driver. It costs 20 tokens per session (540 once invoked), scanned A, original, Apache-2.0.

A command procedure for rebuilding a Metabase database-driver JAR file, restarting Metabase, and checking its logs and health endpoint. A JAR file is a packaged Java program, and Metabase is a tool for exploring and displaying data.

In plain words
What is it for?
Use it after changing the driver's source or resources to rebuild the plugin and verify that the Arrow Flight SQL driver loaded without errors.
Why use it?
It prevents code changes from appearing complete when the driver failed to compile or Metabase did not load it.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

This is J0hnG4lt/metabase-flightsql-driver's own configuration. It tells Claude Code how to work on metabase-flightsql-driver itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything metabase-flightsql-driver configures →

Reuse

Borrowing it

Nothing to install: this file belongs to J0hnG4lt/metabase-flightsql-driver. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/J0hnG4lt/metabase-flightsql-driver/main/.claude/commands/rebuild-driver.md
Clone the repo
git clone --depth 1 https://github.com/J0hnG4lt/metabase-flightsql-driver

Made for: Claude Code.

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 rebuild-driver

README.md
[![agentmods](https://agentmods.dev/badge/commands/j0hng4lt/metabase-flightsql-driver/rebuild-driver/github.svg)](https://agentmods.dev/commands/j0hng4lt/metabase-flightsql-driver/rebuild-driver)
Your own site
<a href="https://agentmods.dev/commands/j0hng4lt/metabase-flightsql-driver/rebuild-driver"><img src="https://agentmods.dev/badge/commands/j0hng4lt/metabase-flightsql-driver/rebuild-driver/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 rebuild-driver

Your own site · 80×15
<a href="https://agentmods.dev/commands/j0hng4lt/metabase-flightsql-driver/rebuild-driver"><img src="https://agentmods.dev/badge/commands/j0hng4lt/metabase-flightsql-driver/rebuild-driver.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 540 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00020 $0.00540
Opus 5 $0.00010 $0.00270
Sonnet 5 $0.00004 $0.00108
Haiku 4.5 $0.00002 $0.00054

Measured 10d ago against content hash 3fa276d1c569, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

rebuild-driver scanned grade A with 1 finding 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 10d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

if podman exec metabase curl -s -f "http://localhost:3000/api/health" >/dev/null 2>&1; then break; fi
.claude/commands/rebuild-driver.md · 62 lines

What it actually says

Rebuild Driver

Rebuild the driver after changes to src/ or resources/ and verify Metabase loads it.

Steps

1. Rebuild the jar

podman compose down metabase builder
podman compose up -d builder

Wait for the build to finish (~30s):

for i in {1..12}; do
  podman ps --format '{{.Names}}' | grep -q '^builder' || break
  sleep 5
done
podman logs builder 2>&1 | tail -5

The builder exits when done; its last lines should show Created /builder/target/metabase-flightsql-driver-0.1.0-SNAPSHOT-standalone.jar.

2. Restart Metabase

podman compose up -d metabase

3. Verify plugin load (CRITICAL)

The compose path loads driver source at startup — compile errors surface here and only here:

for i in {1..40}; do
  if podman exec metabase curl -s -f "http://localhost:3000/api/health" >/dev/null 2>&1; then break; fi
  sleep 5
done
podman logs metabase 2>&1 | grep -iE "arrow-flight-sql|plugin" | tail -20
podman logs metabase 2>&1 | grep -iE "error|exception" | grep -i "arrow" | tail -10

Success: a "registered plugin" / "Loading plugin" line for arrow-flight-sql and no arrow-related exceptions. Failure: any clojure.lang.Compiler$CompilerException mentioning arrow_flight_sql.clj — fix the reported line and rerun this command.

4. Quick smoke (optional but recommended)

If .env exists, run a query through an existing card:

API_KEY=$(grep METABASE_API_KEY .env | cut -d'=' -f2)
podman exec metabase curl -s -H "x-api-key: $API_KEY" \
  "http://localhost:3000/api/database" | python -c "import sys,json; d=json.load(sys.stdin); print([x['name'] for x in d.get('data',d)])"
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. 10d ago First seen · 62 lines · 20 tokens per session scan A 3fa276d1c569

Subscribe to this mod's changes

rebuild-driver is a command published in the GitHub repository J0hnG4lt/metabase-flightsql-driver (11 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 20 tokens to every session and 540 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.