bonnard-metabase-migrate

A guided process for moving important metrics from Metabase, a tool for querying and visualizing data, into a Bonnard semantic layer. It analyzes the existing Metabase setup before helping recreate its key models and questions.

In plain words
What is it for?
Use it when importing or migrating Metabase data into Bonnard. It covers connecting to Metabase, generating an analysis report, and using that report to plan the new data model.
Why use it?
It reduces the manual work of discovering which tables, saved questions, and metrics matter in an existing Metabase instance.

Cursor rule

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 rules/bonnard-data/bonnard-cli/bonnard-metabase-migrate
Clone the repo
git clone --depth 1 https://github.com/bonnard-data/bonnard-cli
Per session 48 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,299 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.00048 $0.02299
Opus 5 $0.00024 $0.01149
Sonnet 5 $0.00010 $0.00460
Haiku 4.5 $0.00005 $0.00230

Measured yesterday against content hash f20d99b5463a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

bonnard-metabase-migrate 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 yesterday.

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.

src/templates/cursor/rules/bonnard-metabase-migrate.mdc · 277 lines

How it starts

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

Migrate from Metabase to Bonnard

This skill guides you through analyzing an existing Metabase instance and building a semantic layer that replicates its most important metrics. Walk through each phase in order, confirming progress before moving on.

Phase 1: Connect to Metabase

Set up a connection to the Metabase instance:

bon metabase connect

This prompts for the Metabase URL and API key. The API key should be created in Metabase under Admin > Settings > Authentication > API Keys. An admin-level key gives the richest analysis (permissions, schema access).

Phase 2: Analyze the Instance

Generate an intelligence report that maps the entire Metabase instance:

bon metabase analyze

This writes a report to .bon/metabase-analysis.md. Read it carefully — it drives every decision in the remaining phases.

How to interpret each section

Report Section What It Tells You Action
Most Referenced Tables Tables used most in SQL queries Create cubes for these first — they are the core of the data model
Top Cards by Activity Most-viewed questions/models analytical cards (GROUP BY + aggregation) map to measures; lookup cards indicate key filter dimensions; display cards can be skipped
Common Filter Variables Template vars ({{var}}) used across 3+ cards These must be dimensions on relevant cubes
Foreign Key Relationships FK links between tables Define joins between cubes using these relationships
Collection Structure How users organize content by business area Map each top-level collection to a view (one view per business domain)
Dashboard Parameters Shared filters across dashboards The most important shared dimensions — ensure they exist on relevant cubes
Table Inventory Field counts and classification per table Field classification (dims/measures/time) guides each cube definition; tables with 0 refs can be deprioritized
Schema Access Which schemas non-admin groups can query Focus on user-facing schemas — skip admin-only/staging schemas

Read the full file on GitHub · 277 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. yesterday First seen · 277 lines · 48 tokens per session scan A f20d99b5463a

Subscribe to this mod's changes

bonnard-metabase-migrate is a cursor rule published in the GitHub repository bonnard-data/bonnard-cli (50 stars, last pushed 2mo ago), licensed MIT. It adds 48 tokens to every session and 2,299 once invoked, about $0.0002 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.