跳到主要内容
知仓学习社ZHICANG

powerbi-custom-visuals

Power BI custom visual (.pbiviz) development with the pbiviz toolchain and its MCP server. Automatically invoke when the user mentions "custom visua…

写文件联网严重 0 · 高危 7data-goblin/power-bi-agentic-development

它会碰到什么

扫了多少7 个文本文件,18 KB
它会碰到什么写文件联网
命中总数10 处
命中统计严重 0 · 高 7 · 中 0 · 低 1
逐条看命中(7 条严重或高危)
  • references/mcp-server.md:5identity-config-write
    registers it (`plugins/custom-visuals/.mcp.json`), so it starts when the plugin
  • references/mcp-server.md:21identity-config-write
    server to the editor's MCP config. A ready file is at `examples/vscode-mcp.json`.
  • references/mcp-server.md:23identity-config-write
    VS Code (`.vscode/mcp.json`):
  • references/mcp-server.md:33identity-config-write
    Cursor (`~/.cursor/mcp.json`) uses the same server under an `mcpServers` key.
  • SKILL.md:59identity-config-write
    This plugin ships a `.mcp.json` that starts the `pbiviz` MCP server
  • SKILL.md:101identity-config-write
    - **`examples/vscode-mcp.json`** ... standalone `.vscode/mcp.json` for a visual project outside this plugin
  • SKILL.md:101identity-config-write
    - **`examples/vscode-mcp.json`** ... standalone `.vscode/mcp.json` for a visual project outside this plugin

这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。

技能内容

Power BI Custom Visuals (pbiviz)

Build distributable Power BI developer visuals: TypeScript/D3 visuals packaged

as a .pbiviz file, written against the powerbi-visuals-api and built with the

pbiviz CLI (powerbi-visuals-tools). This skill covers the full loop: scaffold,

develop, live-preview, package, certify, and publish.

Pick the right tool first

This plugin holds five visual approaches. Choose before building:

deneb-visuals:    no-code Vega / Vega-Lite specs inside a report; no packaging, no TypeScript
python-visuals:   matplotlib / seaborn script visuals (static image, computes at render)
r-visuals:        ggplot2 script visuals (static image); R's stats ecosystem
svg-visuals:      SVG drawn by a DAX measure (ImageUrl); inline in tables/cards, no visual sandbox
powerbi-custom-visuals (this skill): a real .pbiviz developer visual, reusable across
                  reports and shareable on AppSource; full interactivity, formatting pane, certification

Reach for this skill when the need is a reusable, interactive, distributable visual

with its own formatting pane. For a one-off chart in a single report, a sibling

skill is usually faster and lighter.

Prerequisites

  • Node.js 20.19 or later (the powerbi-visuals-tools engine minimum)
  • pbiviz CLI: run via npx -y powerbi-visuals-tools <command>, or install it globally
  • Developer mode for live preview: enable the developer visual in Power BI Desktop, or

turn on developer mode in the Power BI service

Core workflow

  1. Scaffold: pbiviz new <VisualName> creates the project (src/visual.ts,

capabilities.json, pbiviz.json, tsconfig.json, package.json, style/, assets/)

  1. Implement the visual class in src/visual.ts. Implement the IVisual interface;

the class name must equal visualClassName in pbiviz.json. Core methods:

constructor (set up DOM and services), update (render on data/size/settings change),

getFormattingModel (populate the format pane), destroy (cleanup)

  1. Declare data and formatting in capabilities.json: dataRoles (the field wells),

dataViewMappings (how roles map to the dataView), and objects (format-pane properties)

  1. Build the formatting model with powerbi-visuals-utils-formattingmodel

(FormattingSettingsService, cards, slices). A card name matches a capabilities.json

object; a slice name matches a property

  1. Live-preview: pbiviz start, then add the developer visual to a report and iterate

against real data

  1. Package: pbiviz package produces the .pbiviz under dist/; import it into a report

Full command flags, the project layout, the IVisual lifecycle, and formatting-model

patterns are in references/pbiviz-toolchain.md.

Use the bundled pbiviz MCP server

This plugin ships a .mcp.json that starts the pbiviz MCP server

(npx -y powerbi-visuals-tools mcp). It grounds development in current, correct API

usage instead of guessed code. Prefer its tools while building:

get_available_apis:    look up data, formatting, interaction, and utility APIs with examples
get_best_practices:    API-version management, performance, security, accessibility, testing
add_feature:           list features available to add (bookmarks, tooltips, drill-down, selection, localization)
implement_feature:     step-by-step instructions, code templates, and config changes for a feature
list_visual_info:      extract a project's GUID, version, author, data roles, dependencies
check_vulnerabilities: scan dependencies and source for risky patterns (eval, innerHTML)
prepare_certification: verify required files, configuration, capabilities, and assets pre-submission

Setup, client config, and per-tool detail are in references/mcp-server.md.

Certify and publish

Certification unlocks export to PowerPoint and email subscriptions, and signals a

reviewed visual. Key gates: a lowercase certification branch matching the package,

eslint-plugin-powerbi-visuals passing, no eval/fetch/XMLHttpRequest, a clean

npm audit, and the latest API. Audit with pbiviz package --certification-audit.

Publishing goes through Partner Center to AppSource. R-based visuals cannot be certified.

Requirements and the submission flow are in references/certification-publishing.md.

Learn from shipped visuals

Microsoft publishes the full source of official and certified visuals. Start from the

tutorials (circlecard, sampleBarChart) and read a production visual close to the

target (gantt, sankey, sunburst, timeline, ChicletSlicer) for real patterns.

A curated list with what each one teaches is in references/community-examples.md.

Additional resources

Reference files

  • references/pbiviz-toolchain.md ... CLI commands, project structure, IVisual lifecycle, capabilities.json, formatting model, key npm packages
  • references/mcp-server.md ... the bundled pbiviz MCP: setup and its tools
  • references/certification-publishing.md ... certification requirements and AppSource publishing
  • references/community-examples.md ... official and certified example visuals worth reading

Examples

  • examples/vscode-mcp.json ... standalone .vscode/mcp.json for a visual project outside this plugin
  • examples/capabilities-objects.json ... a capabilities.json objects block wired to a formatting card

想直接用这个技能?

本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。

它属于哪个仓库

星标★ 918
本站分层T2
该仓技能数32
原文件路径plugins/custom-visuals/skills/powerbi-custom-visuals/SKILL.md

同一个仓库里的其他技能

看这个仓库的全部 32 个技能