Skip to content

Commit c8193a1

Browse files
authored
Merge pull request #29 from metabase/workspace-skill-cli
workspace cli skill
2 parents 31fdb6c + 686d0f1 commit c8193a1

3 files changed

Lines changed: 48 additions & 0 deletions

File tree

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ npx skills add metabase/agent-skills --skill metabase-modular-embedding-version-
2020

2121
Always review and validate the changes made by a skill. Depending on your application's complexity, a skill may not work properly in all cases. Check that your application builds, tests pass, and the embedding works as expected before committing.
2222

23+
### CLI
24+
25+
[metabase-cli](./skills/metabase-cli/SKILL.md)
26+
27+
Drives a Metabase instance from the terminal via the official `mb` CLI — every Metabase resource through one command surface.
28+
29+
This skill is a thin discovery stub; the workflow content lives in [`@metabase/cli`](https://www.npmjs.com/package/@metabase/cli) and is served at runtime by `mb skills get`. Install the CLI (`npm i -g @metabase/cli`) and the skill resolves the rest. The same skill is also available as a Claude Code plugin direct from the CLI repo (`/plugin marketplace add metabase/mb-cli` + `/plugin install metabase-cli@metabase`); one install path is enough.
30+
2331
### Database metadata
2432

2533
[metabase-database-metadata](./skills/metabase-database-metadata/SKILL.md)

skills/metabase-cli/README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# metabase-cli (skill)
2+
3+
Discovery stub for the [`@metabase/cli`](https://www.npmjs.com/package/@metabase/cli) skill bundle. The agent loads workflow content at runtime via `mb skills get`, so instructions always match the installed CLI version.
4+
5+
## Install
6+
7+
```bash
8+
npm i -g @metabase/cli # CLI itself
9+
npx skills add metabase/agent-skills --skill metabase-cli # this stub
10+
```
11+
12+
Or, in Claude Code, install both the stub and the marketplace entry directly from the CLI repo:
13+
14+
```
15+
/plugin marketplace add metabase/mb-cli
16+
/plugin install metabase-cli@metabase
17+
```
18+
19+
One install path is enough — both resolve to the same `mb skills get` runtime fetch.
20+
21+
## Files
22+
23+
- `SKILL.md` — frontmatter (trigger phrases) + a redirect at `mb skills get core`.

skills/metabase-cli/SKILL.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: metabase-cli
3+
description: Drive a Metabase instance from the terminal via the `mb` CLI. Authenticate with named profiles; inspect databases (list, get, full metadata rollup, schemas, tables in a schema) and trigger manual schema sync / field-values rescan; inspect tables, 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; read/update settings; search content (cards, dashboards, collections, transforms, metrics); manage Enterprise workspaces; git-sync to/from a git remote (status, dirty, import, export, branches, stash, add/remove a collection from sync). Use whenever the user wants to interact with a Metabase 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", "spin up a workspace", "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 anything hitting `mb <verb>`.
4+
allowed-tools: Bash(mb:*), Read, Write, Edit, AskUserQuestion
5+
---
6+
7+
# metabase-cli
8+
9+
Load the workflow content from the CLI:
10+
11+
```bash
12+
mb skills get core # start here — auth, flag conventions, every command group
13+
mb skills list # enumerate specialized skills bundled with this CLI version
14+
mb skills get <name> # load a specialized skill (workspace, transform, git-sync, …)
15+
```
16+
17+
Don't drive Metabase by `curl`ing `/api/...` directly — the CLI handles auth profiles, retries, schema validation, and credential redaction.

0 commit comments

Comments
 (0)