Skip to main content
skill CX Codex

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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add metabase/agent-skills --skill metabase-cli -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/metabase-cli/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/metabase-cli/

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

Similar skills

All skills for Data and databases →

From the same set8

metabase-database-metadata This skill teaches the agent the Metabase Database Metadata Format, so it can read your schema from a YAML tree: columns, types, foreign keys. Handy before writing queries. CX Codex +1 560installs metabase-representation-format A skill that explains Metabase's YAML serialization format: collections, cards, dashboards, segments, measures, transforms and data apps. Useful when an agent edits or validates those files. CX Codex +1 529installs metabase-semantic-checker Runs the Metabase semantic checker over a tree of Representation Format YAML files and verifies that entity and column references resolve. Useful when you suspect a broken reference. CX Codex +1 429installs metabase-embedding-sso-implementation A skill that walks the agent through adding JWT SSO to your Metabase embedding: signing endpoint, frontend auth layer, group mappings. CX Codex +1 363installs metabase-react-sdk-setup A skill that walks the agent through first-time setup of the Metabase React SDK: instance detection, API key, dashboard discovery, JWT auth and package install. CX Codex +1 362installs metabase-static-embedding-to-guest-embedding-upgrade Moves a project from signed Metabase iframes to guest embeds built on web components and embed.js. Useful when /embed/ iframes need to become <metabase-dashboard> and <metabase-question>. CX Codex +1 355installs metabase-learning Runs you through a 9-session Metabase curriculum with spaced-repetition reviews. Useful when you want a fixed path instead of scattered docs. CX Codex +1 324installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor