metabase-to-sigma

metabase-to-sigma is a skill for Claude Code from twells89/sigma-migration-skills. It costs 97 tokens per session (4,787 once invoked), scanned A, original, MIT.

A skill for moving Metabase models, questions, and dashboards into Sigma. Metabase and Sigma are business-intelligence tools; the skill translates supported Metabase query logic and flags features it cannot reproduce safely.

In plain words
What is it for?
Use it to convert MBQL queries, data models, nested questions, charts, controls, and dashboards into Sigma workbooks, while reviewing unsupported windows, saved segments, visualisations, and click actions.
Why use it?
It reduces manual rebuilding when changing from Metabase to Sigma while avoiding silently incorrect results. It also supports checking that converted queries produce matching results.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: mentions subagents.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is node --import tsx/esm cli.ts ../bundle.json --metadata ../metadata.json \.

Part of the metabase-to-sigma plugin — 2 skills shipped together

Good fit Use it to convert MBQL queries, data models, nested questions, charts, controls, and dashboards into Sigma workbooks, while reviewing unsupported windows, saved segments, visualisations, and click actions.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/twells89/sigma-migration-skills
agentmods
npx agentmods add skills/twells89/sigma-migration-skills/metabase-to-sigma

Made for: Claude Code.

Or install metabase-to-sigma, the plugin that ships this one along with the rest of its 2 skills.

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 metabase-to-sigma

README.md
[![agentmods](https://agentmods.dev/badge/skills/twells89/sigma-migration-skills/metabase-to-sigma/github.svg)](https://agentmods.dev/skills/twells89/sigma-migration-skills/metabase-to-sigma)
Your own site
<a href="https://agentmods.dev/skills/twells89/sigma-migration-skills/metabase-to-sigma"><img src="https://agentmods.dev/badge/skills/twells89/sigma-migration-skills/metabase-to-sigma/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 metabase-to-sigma

Your own site · 80×15
<a href="https://agentmods.dev/skills/twells89/sigma-migration-skills/metabase-to-sigma"><img src="https://agentmods.dev/badge/skills/twells89/sigma-migration-skills/metabase-to-sigma.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 97 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,787 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.00097 $0.04787
Opus 5.5 $0.00039 $0.01915
Sonnet 5.5 $0.00019 $0.00957
Haiku 4.5 $0.00010 $0.00479

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

Security

Grade A, and why

metabase-to-sigma 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 11d ago.

The scan reads SKILL.md. This mod also ships 30 executable files (converter/cli.ts, converter/metabase-dashboard.ts, converter/metabase.ts, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/metabase-to-sigma/skills/metabase-to-sigma/SKILL.md · 332 lines

How it starts

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

Metabase → Sigma migration

Convert Metabase models + questions into a Sigma data model, then convert the dashboards that sit on them into matching Sigma workbooks. Translate what maps cleanly; flag what doesn't (cum-sum/offset windows, saved segment refs, progress viz, click behaviors) instead of emitting wrong logic.

Status: live-validated end to end. Extraction was proven against a live 7k-card / 1.5k-dashboard Metabase Cloud estate (v1.61.4 — 100% pMBQL); the Sigma build path was validated with exact query parity, including models, nested questions, combo charts, controls, and exact-grid layout (refs/design-notes.md §9–§10d). The released wrapped/flat workbook code representation is covered by offline tests and corpus goldens; repeat the live POST/readback/PNG gate before extending the historical live claim to that payload.

This skill is customizable in plain language. Read ~/.metabase-to-sigma/preferences.md if it exists at the start of every run, restate the active preferences briefly, and honor them throughout (they may override any default EXCEPT the verification gates). When the user corrects an output or states a preference mid-run, OFFER to persist it — see refs/customization.md for the three tiers (preferences / learned formula rules / converter changes).

Before a run, read refs/design-notes.md, refs/rest-api.md, and refs/control-parity.md.

Load refs/mbql-shapes.md, refs/expression-dsl.md, or refs/template-tags.md only when that phase needs the detail. For canonical Sigma shapes, defer to sigma-data-models and sigma-workbooks.


Prerequisites

  • Metabase REST access — an API key (v49+: Admin → Settings → Authentication → API keys; preferred, durable) or a username/password session. Capture either with scripts/get-metabase-session.sh. Open-source Metabase is fully sufficient — no Pro/EE features required (serialization export is EE-only; this skill doesn't use it).
  • Sigma API access: set SIGMA_BASE_URL, then run eval "$(scripts/browser-login.sh)" once (preferred), or configure SIGMA_CLIENT_ID / SIGMA_CLIENT_SECRET in ~/.sigma-migration/env as a headless fallback. The Node converter and live scripts reuse a caller token, refresh a known token after 50 minutes through scripts/get_token.py (browser keychain first), and refresh/retry once on a 401. Set SIGMA_WORKDIR to the migration work directory when you want the shell-neutral auth.json handoff there.
  • The same warehouse on both sides. Sigma reads the warehouse live; parity only means something when the Sigma connection reaches the database Metabase queries. (Metabase's bundled H2 Sample Database is NOT reachable from Sigma — pick content on a real warehouse, or land the data first.)
  • Know your warehouse dialect. The converter auto-detects it from the Sigma connection (--connection <id> triggers a GET /v2/connections/<id> lookup), or pass --warehouse explicitly: bigquery | snowflake | databricks | redshift | postgres | athena. Required for correct array-aggregation rewrites (BigQuery ARRAY_AGG → array_to_string, Snowflake → LISTAGG, Databricks collect_list → array_join, etc.). Without it, native SQL cards with array aggregations will render as blank cells in Sigma.
  • Node for the converter (converter/: npm ci once).

Read the full file on GitHub · 332 lines

Files

What ships with it

60 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 11d ago Changed · +6 lines dd842ea77425
  2. 1mo ago Changed · -11 lines 022a5a9f3d12
  3. 1mo ago First seen · 337 lines · 97 tokens per session scan A af6719ed20e5

Subscribe to this mod's changes

metabase-to-sigma is a skill published in the GitHub repository twells89/sigma-migration-skills (17 stars, last pushed yesterday), licensed MIT. It adds 97 tokens to every session and 4,787 once invoked, about $0.0004 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-09-10.