create-powerbi-custom-visuallisted
Install: claude install-skill Lesleybs2/powerbi-custom-visual-skill
# Build a Power BI custom visual
A build order plus the traps that cost real time. Written so the only thing still needed is a description of
what the visual should show and do.
**The principle behind every rule here: a custom visual feels native only when it borrows the host's own
machinery.** Colours come from the host palette, selection goes through the selection manager, settings go
through the formatting model, the format pane is navigated through the sub-selection API. Anything invented
instead of borrowed looks and behaves like a stranger on the page.
Every rule was earned on production visuals: a paged, ranked table with on-object formatting and a map that
draws hundreds of thousands of locations from a billion-row DirectQuery model. Treat those as evidence, not
as the shape every visual should take.
---
## Step 0 — Settle the shape before writing code
Answer these first; each one decides a file.
| Question | Decides |
|---|---|
| What is one row of this visual? A category, a hierarchy, a matrix? | `dataRoles` + `dataViewMappings` |
| Which figures does the author drop in, and can there be several? | roles with `max`, and whether settings need to be per field |
| Does clicking something mean anything? | `supportsHighlight`, selection ids, context menu |
| Does it have parts an author would want to restyle? | on-object parts and the format cards behind them |
| What must survive a saved bookmark? | properties persisted with `persistProperties` |
| Does anything