/power-bi-deployment
Import and export TMDL/TMSL formats, manage model lifecycle with transactions, and version-control Power BI semantic models using pbi-cli. Invoke this skill whenever the user mentions "deploy", "export", "import", "TMDL", "TMSL", "version control", "git", "backup", "migrate",
$ npx -y skills add MinaSaad1/pbi-cli --skill power-bi-deployment --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/power-bi-deployment
Context preview
The summary Claude sees to decide when to auto-load this skill.
Import and export TMDL/TMSL formats, manage model lifecycle with transactions, and version-control Power BI semantic models using pbi-cli. Invoke this skill whenever the user mentions "deploy", "export", "import", "TMDL", "TMSL", "version control", "git", "backup", "migrate",
SKILL.md
power-bi-deployment.SKILL.mdname: Power BI Deployment
description: Import and export TMDL/TMSL formats, manage model lifecycle with transactions, and version-control Power BI semantic models using pbi-cli. Invoke this skill whenever the user mentions "deploy", "export", "import", "TMDL", "TMSL", "version control", "git", "backup", "migrate", "transaction", "commit changes", "rollback", or wants to save/restore model state.
tools: pbi-cli
Power BI Deployment Skill
Manage model lifecycle with TMDL export/import, transactions, and version control.
Prerequisites
pipx install pbi-cli-tool
pbi-cli skills install
pbi connect
Connecting to Targets
# Local Power BI Desktop (auto-detects port)
pbi connect
# Local with explicit port
pbi connect -d localhost:54321
# Named connections for switching
pbi connect -d localhost:54321 --name dev
pbi connections list
pbi connections last
pbi disconnect
TMDL Export and Import
TMDL (Tabular Model Definition Language) is the text-based format for version-controlling Power BI models.
# Export entire model to TMDL folder
pbi database export-tmdl ./model-tmdl/
# Import TMDL folder into connected model
pbi database import-tmdl ./model-tmdl/
TMSL Export
# Export as TMSL JSON (for SSAS/AAS compatibility)
pbi database export-tmsl
TMDL Diff (Compare Snapshots)
Compare two TMDL export folders to see what changed between snapshots. Useful for CI/CD pipelines ("what did this PR change in the model?").
# Compare two exports
pbi database diff-tmdl ./model-before/ ./model-after/
# JSON output for CI/CD scripting
pbi --json database diff-tmdl ./baseline/ ./current/
Returns a structured summary:
- **tables**: added, removed, and changed tables with per-table entity diffs
(measures, columns, partitions, hierarchies added/removed/changed)
- **relationships**: added, removed, and changed relationships
- **model**: changed model-level properties (e.g. culture, default power bi dataset version)
- **summary**: total counts of all changes
LineageTag-only changes (GUID regeneration without real edits) are automatically filtered out to avoid false positives.
No connection to Power BI Desktop is needed -- works on exported folders.
Database Operations
# List databases on the connected server
pbi database list
Transaction Management
Use transactions for atomic multi-step changes:
# Begin a transaction
pbi transaction begin
# Make changes
pbi measure create "New KPI" -e "SUM(Sales[Amount])" -t Sales
pbi measure create "Another KPI" -e "COUNT(Sales[OrderID])" -t Sales
# Commit all changes atomically
pbi transaction commit
# Or rollback if something went wrong
pbi transaction rollback
Table Refresh
# Refresh individual tables
pbi table refresh Sales --type Full
pbi table refresh Sales --type Automatic
pbi table refresh Sales --type Calculate
pbi table refresh Sales --type DataOnly
Workflow: Version Control with Git
# 1. Export model to TMDL
pbi database export-tmdl ./model/
# 2. Commit to git
cd model/
git add .
git commit -m "feat: add new revenue measures"
# 3. Later, import back into Power BI Desktop
pbi connect
pbi database import-tmdl ./model/
Workflow: Inspect Model Before Deploy
# Get model metadata
pbi --json model get
# Check model statistics
pbi --json model stats
# List all objects
pbi --json table list
pbi --json measure list
pbi --json relationship list
Best Practices
- Always export TMDL before making changes (backup)
- Use transactions for multi-object changes
- Test changes in dev before deploying to production
- Use `--json` for scripted deployments
- Store TMDL in git for version history
- Use named connections (`--name`) to avoid accidental changes to wrong environment
Read more
name: Power BI Deployment description: Import and export TMDL/TMSL formats, manage model lifecycle with transactions, and version-control Power BI semantic models using pbi-cli. Invoke this skill whenever the user mentions "deploy", "export", "import", "TMDL", "TMSL", "version control", "git", "backup", "migrate", "transaction", "commit changes", "rollback", or wants to save/restore model state. tools: pbi-cli
Power BI Deployment Skill
Manage model lifecycle with TMDL export/import, transactions, and version control.
Prerequisites
pipx install pbi-cli-tool pbi-cli skills install pbi connect
Connecting to Targets
# Local Power BI Desktop (auto-detects port) pbi connect # Local with explicit port pbi connect -d localhost:54321 # Named connections for switching pbi connect -d localhost:54321 --name dev pbi connections list pbi connections last pbi disconnect
TMDL Export and Import
TMDL (Tabular Model Definition Language) is the text-based format for version-controlling Power BI models.
# Export entire model to TMDL folder pbi database export-tmdl ./model-tmdl/ # Import TMDL folder into connected model pbi database import-tmdl ./model-tmdl/
TMSL Export
# Export as TMSL JSON (for SSAS/AAS compatibility) pbi database export-tmsl
TMDL Diff (Compare Snapshots)
Compare two TMDL export folders to see what changed between snapshots. Useful for CI/CD pipelines ("what did this PR change in the model?").
# Compare two exports pbi database diff-tmdl ./model-before/ ./model-after/ # JSON output for CI/CD scripting pbi --json database diff-tmdl ./baseline/ ./current/
Returns a structured summary:
- **tables**: added, removed, and changed tables with per-table entity diffs
(measures, columns, partitions, hierarchies added/removed/changed)
- **relationships**: added, removed, and changed relationships
- **model**: changed model-level properties (e.g. culture, default power bi dataset version)
- **summary**: total counts of all changes
LineageTag-only changes (GUID regeneration without real edits) are automatically filtered out to avoid false positives.
No connection to Power BI Desktop is needed -- works on exported folders.
Database Operations
# List databases on the connected server pbi database list
Transaction Management
Use transactions for atomic multi-step changes:
# Begin a transaction pbi transaction begin # Make changes pbi measure create "New KPI" -e "SUM(Sales[Amount])" -t Sales pbi measure create "Another KPI" -e "COUNT(Sales[OrderID])" -t Sales # Commit all changes atomically pbi transaction commit # Or rollback if something went wrong pbi transaction rollback
Table Refresh
# Refresh individual tables pbi table refresh Sales --type Full pbi table refresh Sales --type Automatic pbi table refresh Sales --type Calculate pbi table refresh Sales --type DataOnly
Workflow: Version Control with Git
# 1. Export model to TMDL pbi database export-tmdl ./model/ # 2. Commit to git cd model/ git add . git commit -m "feat: add new revenue measures" # 3. Later, import back into Power BI Desktop pbi connect pbi database import-tmdl ./model/
Workflow: Inspect Model Before Deploy
# Get model metadata pbi --json model get # Check model statistics pbi --json model stats # List all objects pbi --json table list pbi --json measure list pbi --json relationship list
Best Practices
- Always export TMDL before making changes (backup)
- Use transactions for multi-object changes
- Test changes in dev before deploying to production
- Use `--json` for scripted deployments
- Store TMDL in git for version history
- Use named connections (`--name`) to avoid accidental changes to wrong environment
Power BI CLI - semantic models (.NET TOM) and PBIR reports for token-efficient AI agent usage, built for Claude Code
Repo: MinaSaad1/pbi-cli
Other skills on pbi-cli.
- /power-bi-custom-visuals
Vibe-code Power BI custom visuals end-to-end: scaffold a TypeScript project, iterate on src/visual.ts and capabilities.json, validate with the Power BI Visuals SDK toolchain, package to .pbiviz, and import into a PBIR report. Invoke this skill whenever the user mentions "custom
Open skill - /power-bi-dax
Write, execute, and optimize DAX queries and measures for Power BI semantic models using pbi-cli. Invoke this skill whenever the user mentions DAX, queries data in Power BI, writes calculations, creates measures, asks about EVALUATE, SUMMARIZECOLUMNS, CALCULATE, time
Open skill - /power-bi-diagnostics
Troubleshoot Power BI model performance, trace query execution, manage caches, and verify the pbi-cli environment using pbi-cli. Invoke this skill whenever the user says "pbi not working", "setup issues", "connection failed", "slow query", "performance", "profiling", "tracing",
Open skill - /power-bi-docs
Auto-document Power BI semantic models by extracting metadata, generating documentation, and cataloging all model objects using pbi-cli. Invoke this skill whenever the user says "document this model", "what's in this model", "list everything", "data dictionary", "model
Open skill - /power-bi-filters
Add, remove, and manage page-level and visual-level filters on Power BI PBIR reports using pbi-cli. Invoke this skill whenever the user mentions "filter", "TopN filter", "top 10", "bottom 5", "relative date filter", "last 30 days", "categorical filter", "include values",
Open skill - /power-bi-modeling
Create and manage Power BI semantic model structure using pbi-cli -- tables, columns, measures, relationships, hierarchies, calculation groups, and date/calendar tables. Invoke this skill whenever the user says "create table", "add measure", "add column", "create relationship",
Open skill

