metabase-cli — Claude Code skill: what it does, how to install
Controls a Metabase instance through the mb CLI: runs card queries, manages dashboards, traverses collections, and triggers schema syncs from the terminal.
npx skills add metabase/agent-skills --skill metabase-cli -a claude-codeWhat metabase-cli does
The skill equips the coding agent with the mb command-line tool to manage Metabase instances. It operates through saved authentication profiles, retrieves schema details for databases and tables, and executes cards with output in JSON, CSV, or XLSX formats. Direct raw curl calls against the REST API are bypassed because mb handles schema verification, retry logic, and credential redaction internally.
Beyond basic inspections, the tool initiates database schema synchronization, rescans field values, manages native query snippets, and runs git-sync workflows across collections. Without the mb binary configured in your terminal environment, the agent cannot execute these operations. For multi-step data engineering jobs, the repository authors recommend switching to the higher-level metabase-rde skill.
What it helps with
- export Metabase card results to CSV or JSON
- trigger a manual schema sync on a database
- manage git-sync branches and collection exports
- inspect database tables and field values from the terminal
Example prompts for the agent
- Run card 42 and export the output as CSV
- Trigger a schema sync and rescan field values for the main database
- Show the Metabase collection tree
How to install metabase-cli
1Skills CLI (Vercel)
npx skills add metabase/agent-skills --skill metabase-cli -a claude-code2Manually: put the files in place
~/.claude/skills/metabase-cli/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/metabase-cli/
1Skills CLI (Vercel)
npx skills add metabase/agent-skills --skill metabase-cli -a codex2Manually: put the files in place
.agents/skills/metabase-cli/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add metabase/agent-skills --skill metabase-cli -a cursor2Manually: put the files in place
.cursor/skills/metabase-cli/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install metabase/agent-skills metabase-cli2Manually: put the files in place
.github/skills/metabase-cli/SKILL.md1Skills CLI (Vercel)
npx skills add metabase/agent-skills --skill metabase-cli -a gemini-cli2Platform CLI
gemini skills install https://github.com/metabase/agent-skills --path skills/metabase-cliManually: put the files in place
.devin/skills/metabase-cli/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add metabase/agent-skills --skill metabase-cli -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about metabase-cli
How to install metabase-cli in Claude Code?
Run npx skills add metabase/agent-skills --skill metabase-cli -a claude-code. Alternatively, copy the skill definition into ~/.claude/skills/metabase-cli/SKILL.md.
Why does this skill rely on the mb CLI instead of direct API calls?
The mb utility handles authentication profiles, request retries, payload validation, and token redaction without exposing credentials in command logs.
How does metabase-cli handle large-scale data engineering workflows?
For full end-to-end pipelines from raw tables to analytical dashboards, install the companion metabase-rde skill, which directs the underlying CLI commands.
Source text
SKILL.md · MIT
--- name: metabase-cli description: > Drive a Metabase instance from the terminal via the `mb` CLI: auth profiles, databases and schemas, schema sync and field-values rescan, tables, fields, cards (questions, models, metrics) run as JSON/CSV/XLSX, dashboards and dashcards, collections and their tree, snippets, segments, measures, transforms and transform-jobs, settings, search, git-sync. Use for any Metabase operation from the terminal: "log into metabase", "what profiles do I have", "list cards", "run card 42 as CSV", "create a transform", "list dashboards", "move a dashcard", "list collections", "what's in collection 4", "show the collection tree", "list snippets", "create a segment", "archive a measure", "search metabase for X", "import the latest changes", "add a directory to git sync", "set a setting", "what schemas are in this database", "trigger a sync", "rescan field values", or any `mb <verb>`. Whole data jobs go to `rde`. allowed-tools: Bash(mb:*), Read, Write, Edit --- # metabase-cli Load the workflow content from the CLI: ```bash mb skills get core # start here — auth, flag conventions, every command group mb skills list # enumerate specialized skills bundled with this CLI version mb skills get <name> # load a specialized skill (transform, data-workflow, dashboard, git-sync, data-app, …) ``` Command groups, in full: authenticate with named profiles; inspect databases (list, get, full metadata rollup, schemas, tables in a schema) and trigger a manual schema sync or field-values rescan; inspect tables and fields; list/get/create/update/archive cards (questions, models, metrics) and run them as JSON/CSV/XLSX; list/get/create/update dashboards and patch dashcards; list/get/create collections and traverse the hierarchy by id, entity_id, or "root"/"trash" (with items and recursive tree); list/get/create/update/archive native query snippets, segments, and measures; author/update/run transforms and schedule transform-jobs; publish tables to the Library; create data actions; create, bundle and turn off data apps; read/update settings; search content (cards, dashboards, collections, transforms, metrics); git-sync to/from a git remote (status, dirty, import, export, branches, stash, add/remove a collection from sync). Don't drive Metabase by `curl`ing `/api/...` directly — the CLI handles auth profiles, retries, schema validation, and credential redaction. **Doing a whole job, not one command?** Higher-level data-engineering workflows — raw data to clean tables, the semantic layer, dashboards — live in the `metabase-rde` skill, which drives this CLI: ```bash npx skills add metabase/agent-skills --skill metabase-rde ``` When it is installed, follow it; it loads the bundled skills it needs.
© metabase · MIT · metabase/agent-skills