/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",
$ npx -y skills add MinaSaad1/pbi-cli --skill power-bi-diagnostics --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-diagnostics
Context preview
The summary Claude sees to decide when to auto-load this skill.
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",
SKILL.md
power-bi-diagnostics.SKILL.mdname: Power BI Diagnostics
description: 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", "health check", "model audit", "pbi setup", or encounters any pbi-cli error. This is the first skill to check when something goes wrong with pbi-cli.
tools: pbi-cli
Power BI Diagnostics Skill
Troubleshoot performance, trace queries, and verify the pbi-cli environment.
Prerequisites
pipx install pbi-cli-tool
pbi-cli skills install
pbi connect
Environment Check
# Verify pythonnet and .NET DLLs are installed
pbi setup
# Show detailed environment info (version, DLL paths, pythonnet status)
pbi setup --info
pbi --json setup --info
# Check CLI version
pbi --version
Quick Troubleshooting
If pbi-cli isn't working, run these checks in order:
# 1. Is pbi-cli installed correctly?
pbi --version
pbi setup --info
# 2. Is Power BI Desktop running with a model open?
pbi connect
# 3. Is the connection still alive?
pbi connections last
# 4. Can you query the model?
pbi dax execute "EVALUATE ROW(\"test\", 1)"
Model Health Check
# Quick model overview
pbi --json model get
# Object counts (tables, columns, measures, relationships, partitions)
pbi --json model stats
# List all tables with column/measure counts
pbi --json table list
Query Tracing
Capture diagnostic events during DAX query execution:
# Start a trace
pbi trace start
# Execute the query you want to profile
pbi dax execute "EVALUATE SUMMARIZECOLUMNS(Products[Category], \"Total\", SUM(Sales[Amount]))"
# Stop the trace
pbi trace stop
# Fetch captured trace events
pbi --json trace fetch
# Export trace events to a file
pbi trace export ./trace-output.json
Cache Management
# Clear the formula engine cache (do this before benchmarking)
pbi dax clear-cache
Connection Diagnostics
# List all saved connections
pbi connections list
pbi --json connections list
# Show the last-used connection
pbi connections last
# Reconnect to a specific data source
pbi connect -d localhost:54321
# Disconnect
pbi disconnect
Workflow: Profile a Slow Query
# 1. Clear cache for a clean benchmark
pbi dax clear-cache
# 2. Start tracing
pbi trace start
# 3. Run the slow query
pbi dax execute "EVALUATE SUMMARIZECOLUMNS(Products[Category], \"Total\", SUM(Sales[Amount]))" --timeout 300
# 4. Stop tracing
pbi trace stop
# 5. Export trace for analysis
pbi trace export ./slow-query-trace.json
# 6. Review trace events
pbi --json trace fetch
Workflow: Model Health Audit
# 1. Model overview
pbi --json model get
pbi --json model stats
# 2. Check table sizes and structure
pbi --json table list
# 3. Review relationships
pbi --json relationship list
# 4. Check security roles
pbi --json security-role list
# 5. Export full model for offline review
pbi database export-tmdl ./audit-export/
Best Practices
- Clear cache before benchmarking: `pbi dax clear-cache`
- Use `--timeout` for long-running queries to avoid premature cancellation
- Export traces to files for sharing with teammates
- Run `pbi setup --info` first when troubleshooting environment issues
- Use `--json` output for automated monitoring scripts
- Use `pbi repl` for interactive debugging sessions with persistent connection
Read more
name: Power BI Diagnostics description: 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", "health check", "model audit", "pbi setup", or encounters any pbi-cli error. This is the first skill to check when something goes wrong with pbi-cli. tools: pbi-cli
Power BI Diagnostics Skill
Troubleshoot performance, trace queries, and verify the pbi-cli environment.
Prerequisites
pipx install pbi-cli-tool pbi-cli skills install pbi connect
Environment Check
# Verify pythonnet and .NET DLLs are installed pbi setup # Show detailed environment info (version, DLL paths, pythonnet status) pbi setup --info pbi --json setup --info # Check CLI version pbi --version
Quick Troubleshooting
If pbi-cli isn't working, run these checks in order:
# 1. Is pbi-cli installed correctly? pbi --version pbi setup --info # 2. Is Power BI Desktop running with a model open? pbi connect # 3. Is the connection still alive? pbi connections last # 4. Can you query the model? pbi dax execute "EVALUATE ROW(\"test\", 1)"
Model Health Check
# Quick model overview pbi --json model get # Object counts (tables, columns, measures, relationships, partitions) pbi --json model stats # List all tables with column/measure counts pbi --json table list
Query Tracing
Capture diagnostic events during DAX query execution:
# Start a trace pbi trace start # Execute the query you want to profile pbi dax execute "EVALUATE SUMMARIZECOLUMNS(Products[Category], \"Total\", SUM(Sales[Amount]))" # Stop the trace pbi trace stop # Fetch captured trace events pbi --json trace fetch # Export trace events to a file pbi trace export ./trace-output.json
Cache Management
# Clear the formula engine cache (do this before benchmarking) pbi dax clear-cache
Connection Diagnostics
# List all saved connections pbi connections list pbi --json connections list # Show the last-used connection pbi connections last # Reconnect to a specific data source pbi connect -d localhost:54321 # Disconnect pbi disconnect
Workflow: Profile a Slow Query
# 1. Clear cache for a clean benchmark pbi dax clear-cache # 2. Start tracing pbi trace start # 3. Run the slow query pbi dax execute "EVALUATE SUMMARIZECOLUMNS(Products[Category], \"Total\", SUM(Sales[Amount]))" --timeout 300 # 4. Stop tracing pbi trace stop # 5. Export trace for analysis pbi trace export ./slow-query-trace.json # 6. Review trace events pbi --json trace fetch
Workflow: Model Health Audit
# 1. Model overview pbi --json model get pbi --json model stats # 2. Check table sizes and structure pbi --json table list # 3. Review relationships pbi --json relationship list # 4. Check security roles pbi --json security-role list # 5. Export full model for offline review pbi database export-tmdl ./audit-export/
Best Practices
- Clear cache before benchmarking: `pbi dax clear-cache`
- Use `--timeout` for long-running queries to avoid premature cancellation
- Export traces to files for sharing with teammates
- Run `pbi setup --info` first when troubleshooting environment issues
- Use `--json` output for automated monitoring scripts
- Use `pbi repl` for interactive debugging sessions with persistent connection
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-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",
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

