A Claude AI skill + interactive tool that helps beginners, intermediate, and senior developers work with TMDL (Tabular Model Definition Language) in Power BI.
TMDL is Power BI's text-based format for defining semantic models. Instead of a binary .pbix, your model lives as a folder of readable .tmdl files — one per table, plus relationships, roles, and more. This unlocks Git version control, code review, and full CI/CD automation.
It's powerful. But the learning curve is steep, documentation is sparse, and most BI professionals come from a GUI-first world. This skill + tool bridges that gap.
tmdl-skill/
├── README.md ← You are here
├── SKILL.md ← Claude skill: syntax reference for all levels
├── artifact/
│ └── TMDL_Assistant.jsx ← AI-powered React tool (runs in Claude.ai)
├── examples/
│ ├── model.tmdl ← Model-level settings template
│ ├── database.tmdl ← Database/compatibility settings
│ ├── tables/
│ │ ├── Sales.tmdl ← Full table example with measures + partition
│ │ ├── Customer.tmdl ← Dimension table example
│ │ └── Date.tmdl ← Calculated date table
│ ├── relationships.tmdl ← Relationship definitions
│ └── roles.tmdl ← RLS role examples
└── docs/
└── getting-started.md ← Quick start guide for Power BI Desktop sync
A structured reference that teaches Claude how to work with TMDL at three levels:
| Level | What it covers |
|---|---|
| 🟢 Beginner | Folder structure, syntax rules, common errors, first steps with PBI Desktop |
| 🟡 Intermediate | Measures with complex DAX, RLS, incremental refresh, display folders |
| 🔴 Senior | CI/CD pipelines, PowerShell TOM deployment, Python TMDL generation, Git workflows |
Install in Claude.ai → Settings → Claude Skills → Upload .skill file.
An AI-powered artifact built with React + Claude API. Four modes:
| Mode | What it does |
|---|---|
| ⚡ Generate | Describe your model → get production-ready TMDL files |
| 📖 Explain | Paste TMDL → plain-English breakdown at your level |
| 🛡️ Validate & Fix | Paste TMDL → ERROR/WARNING/INFO list + corrected code |
| 🚀 CI/CD | Describe your scenario → working deployment scripts |
How to use it:
- Open Claude.ai
- Create a new artifact → paste the contents of
artifact/TMDL_Assistant.jsx - Run it — the tool calls the Claude API automatically
- Open Power BI Desktop
File → Options → Preview Features→ enable Store semantic model using TMDL formatFile → Save As → TMDL Folder- Open the folder in VS Code (install the TMDL extension)
# Using Tabular Editor CLI
dotnet tool install -g TabularEditor.CLI
te validate ./model --check-aff# See examples/deploy.ps1 for the full script
te deploy ./model `
--xmla "powerbi://api.powerbi.com/v1.0/myorg/YourWorkspace" `
--client-id $env:PBI_CLIENT_ID `
--client-secret $env:PBI_CLIENT_SECRET `
--tenant-id $env:PBI_TENANT_ID `
--overwritetable Sales
lineageTag: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
column SalesAmount ← 2-space indent (tabs will break parsing)
dataType: decimal
lineageTag: ...
formatString: \$#,0.00
summarizeBy: sum ← use "none" on ID/key columns
sourceColumn: SalesAmount
measure Revenue = ← = must end the declaration line
SUM(Sales[SalesAmount]) ← DAX indented 4 more spaces
lineageTag: ...
formatString: \$#,0.00
displayFolder: KPIs
partition Sales = m
mode: import
source =
let Source = ... in SourceCritical rules:
- ✅ 2 spaces indentation — never tabs
- ✅ Names with spaces must be
'single quoted' - ✅ Every object needs a unique
lineageTagGUID - ✅ LF line endings (not CRLF)
PRs welcome. Especially looking for:
- Additional TMDL examples (DirectQuery, Fabric, composite models)
- CI/CD templates for Azure DevOps
- pbi-tools workflow examples
MIT — use it, adapt it, share it.
Built with Claude Sonnet · Designed for the Power BI community