power-bi-custom-visual…
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…
Apply, inspect, and compare Power BI report themes and conditional formatting rules using pbi-cli. Invoke this skill whenever the user mentions "theme", "colours", "colors", "branding", "dark mode", "corporate theme", "styling", "conditional formatting", "colour scale",
$ npx -y skills add MinaSaad1/pbi-cli --skill power-bi-themes --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/power-bi-themesContext preview
The summary Claude sees to decide when to auto-load this skill.
Apply, inspect, and compare Power BI report themes and conditional formatting rules using pbi-cli. Invoke this skill whenever the user mentions "theme", "colours", "colors", "branding", "dark mode", "corporate theme", "styling", "conditional formatting", "colour scale",
name: Power BI Themes description: > Apply, inspect, and compare Power BI report themes and conditional formatting rules using pbi-cli. Invoke this skill whenever the user mentions "theme", "colours", "colors", "branding", "dark mode", "corporate theme", "styling", "conditional formatting", "colour scale", "gradient", "data bars", "background colour", "formatting rules", "visual formatting", or wants to change the overall look-and-feel of a report or apply data-driven formatting to specific visuals. tools: pbi-cli
Manage report-wide themes and per-visual conditional formatting. No Power BI Desktop connection is needed.
Power BI themes are JSON files that define colours, fonts, and visual defaults for the entire report. Apply one with:
pbi report set-theme --file corporate-theme.json
This copies the theme file into the report's `StaticResources/RegisteredResources/` folder and updates `report.json` to reference it. The theme takes effect when the report is opened in Power BI Desktop.
pbi report get-theme
Returns:
Before applying a new theme, preview what would change:
pbi report diff-theme --file proposed-theme.json
Returns:
This helps catch unintended colour changes before committing.
A Power BI theme JSON file typically contains:
{
"name": "Corporate Brand",
"dataColors": ["#0078D4", "#00BCF2", "#FFB900", "#D83B01", "#8661C5", "#00B294"],
"background": "#FFFFFF",
"foreground": "#252423",
"tableAccent": "#0078D4",
"visualStyles": { ... }
}Key sections:
See [Microsoft theme documentation](https://learn.microsoft.com/power-bi/create-reports/desktop-report-themes) for the full schema.
These properties look plausible but are **not in PBI's theme schema**. Including them causes PBI Desktop to fail silently or crash when loading the report:
| Property | Location | Why invalid | |---|---|---| | `"radius": 8` | Inside `border` objects in `visualStyles` | Borders only accept `color` and `show` | | `"page": { ... }` | Top-level key | Legacy pbiviz format — not valid in report themes | | `"dropShadow": { "position": "Inner" }` | Inside `visualStyles` | No `position` sub-property exists for dropShadow |
**Safe top-level keys** for a custom theme: `name`, `dataColors`, `background`, `foreground`, `tableAccent`, `visualStyles`, `textClasses`, `outspaceColor`, `borderColor`, `shapeColors`
Always use `pbi report diff-theme` to preview changes before applying, and open the report in Desktop once to confirm it loads before committing the file.
Apply data-driven formatting to individual visuals:
# Gradient background (colour scale from min to max)
pbi format background-gradient visual_abc --page page1 \
--table Sales --column Revenue \
--min-color "#FFFFFF" --max-color "#0078D4"
# Rules-based background (specific value triggers a colour)
pbi format background-conditional visual_abc --page page1 \
--table Sales --column Status --value "Critical" --color "#FF0000"
# Measure-driven background (a DAX measure returns the colour)
pbi format background-measure visual_abc --page page1 \
--table Sales --measure "Status Color"
# Inspect current formatting rules
pbi format get visual_abc --page page1
# Clear all formatting rules on a visual
pbi format clear visual_abc --page page1# 1. Create the theme file
cat > brand-theme.json << 'EOF'
{
"name": "Acme Corp",
"dataColors": ["#1B365D", "#5B8DB8", "#E87722", "#00A3E0", "#6D2077", "#43B02A"],
"background": "#F8F8F8",
"foreground": "#1B365D",
"tableAccent": "#1B365D"
}
EOF
# 2. Preview the diff against the current theme
pbi report diff-theme --file brand-theme.json
# 3. Apply it
pbi report set-theme --file brand-theme.json
# 4. Verify
pbi report get-themepbi --json report get-theme pbi --json report diff-theme --file proposed.json pbi --json format get vis1 --page p1
Power BI CLI - semantic models (.NET TOM) and PBIR reports for token-efficient AI agent usage, built for Claude Code
Repo: MinaSaad1/pbi-cli
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…
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…
Import and export TMDL/TMSL formats, manage model lifecycle with transactions, and version-control Power BI semantic models using pbi-cli. Invoke 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…
Auto-document Power BI semantic models by extracting metadata, generating documentation, and cataloging all model objects using pbi-cli. Invoke this skill…
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",…