# Mbql

> Author and debug MBQL query bodies for the mb CLI — the only hand-authorable query format. Covers the JSON shape (flat numeric-id stages, options-object-second clauses, optional lib/uuid), joins and FK traversal, multi-stage pipelines, aggregation naming, the flat-vs-legacy-envelope footgun, and the print-schema → dry-run → run validation loop. Use when writing or fixing any query body — mb query, a card's datasetquery, a transform's source.query, or a segment/measure definition — or when --dry-run/run reports validation errors. Triggers — "write an MBQL query", "the datasetquery is wrong", "aggregate and group by", "join two tables", "month-over-month".

## Facts
- Page: https://tashan.sh/capability/skill-metabase-mbql
- tashan id: skill:metabase/mbql
- Source: https://github.com/metabase/metabase-cli
- Type: skill
- Category: database
- tashan score: not scored (catalogued only — too little public evidence)
- Adoption: 9.0
- Upkeep: 98.0
- Freshness: 96.0
- Evidence coverage: 84% of the inputs this score can use
- Health: active
- Instruction depth: not yet graded
- License: AGPL-3.0
- Official: no

## Install

```sh
cp -r mbql ~/.claude/skills/
```

## Security audit
Not scanned. We audit npm-published capabilities; this one has no npm package we can resolve, or has not reached the queue. This is not a clean bill of health.

---
Measured 2026-09-12 by tashan (https://tashan.sh) from public evidence. Scorer s5.
