Python visual creation and matplotlib/seaborn patterns for PBIR reports.

GPL-3.0Auto-check passedData & Analytics

Install Python Visuals

skills CLI
$ npx skills add data-goblin/power-bi-agentic-development --skill python-visuals -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install data-goblin/power-bi-agentic-development python-visuals --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/data-goblin/power-bi-agentic-development.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/custom-visuals/skills/python-visuals .claude/skills/python-visuals && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
python-visuals
GitHub stars
1k
Token cost
~2.1k tokens
SKILL.md length
808 words
Files
10 (incl. references)
Skills in repo
33
Repo updated
First seen
Licence
GPL-3.0

At a glance

Python visual creation and matplotlib/seaborn patterns for PBIR reports.

  • Works in 4 steps: Add the Visual → Write the Script → Inject the Script → …
  • Mentions Python visual
  • SKILL.md covers Visual Identity, Workflow: Creating a Python…, PBIR Format and Supported Libraries, plus 7 more sections
  • Runs Python scripts from its folder

What it does

Python Visuals is an agent skill from data-goblin/power-bi-agentic-development. Python visual creation and matplotlib/seaborn patterns for PBIR reports. Automatically invoke when the user mentions "Python visual", "matplotlib in Power BI", "seaborn in Power BI", "pythonVisual", or asks to "create a Python visual", "add a matplotlib chart", "write a Python visual script".

Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 13 other files, including reference files (for example `examples/script/bar-chart.py`, `examples/script/trend-line.py` and `examples/visual/bar-chart.json`).

It sits in Data & Analytics, covering Data visualization. It works with Python, Power BI, Matplotlib and Seaborn. The repository describes itself as: Power BI AI skills and Power BI agents for Claude Code and GitHub Copilot: a plugin marketplace of Power BI skills, subagents, and hooks for semantic models, DAX, TMDL, reports… The licence is GPL-3.0.

When your agent uses it

  • Mentions Python visual
  • Matplotlib in Power BI
  • Seaborn in Power BI
  • Asks to create a Python visual

Example prompts

  • “Python visual”
  • “matplotlib in Power BI”
  • “seaborn in Power BI”
  • “/python-visuals”

Requirements

  • Python 3

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Add the Visual
  2. Write the Script
  3. Inject the Script
  4. Validate

What it can do on your machine

Read from SKILL.md and the folder at commit 41886f2. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (Python), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • learn.microsoft.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Python Visuals loads about 2.1k tokens when it runs, and up to ~4.9k if it reads all its reference files. Until then it costs about 77 tokens; SKILL.md has 808 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~77
When it runs · the whole SKILL.md, loaded when a task matches
~2.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from data-goblin/power-bi-agentic-development at commit 41886f2, republished under its GPL-3.0 licence (© data-goblin). 808 words, ~2,095 tokens.

Download SKILL.mdSave it as .claude/skills/python-visuals/SKILL.md (or your agent's skills folder). This skill also uses 9 other files; get the full folder from GitHub.
name
python-visuals
description
Python visual creation and matplotlib/seaborn patterns for PBIR reports. Automatically invoke when the user mentions "Python visual", "matplotlib in Power BI", "seaborn in Power BI", "pythonVisual", or asks to "create a Python visual", "add a matplotlib chart", "write a Python visual script".

Python Visuals in Power BI (PBIR)

Use pbir for every report mutation. Read PBIR metadata only for diagnosis. If pbir is unavailable or lacks an operation, stop and report the gap; never edit report JSON directly.

Python visuals execute matplotlib/seaborn scripts to render static PNG images on the Power BI canvas. Prefer seaborn over raw matplotlib for cleaner syntax and better defaults -- it handles most chart types with less code.

Visual Identity

  • visualType: pythonVisual
  • Data role: Values (columns and measures, multiple allowed)
  • Data variable: dataset (pandas DataFrame, auto-injected)
  • Row limit: 150,000 rows
  • Output: Static PNG at 72 DPI -- no interactivity

Workflow: Creating a Python Visual

Step 1: Add the Visual
bash
pbir add visual pythonVisual "Report.Report/Page.Page" --name PythonChart \
  --data "Values:Sales.Date" --data "Values:Sales.Revenue"
Step 2: Write the Script
python
import matplotlib.pyplot as plt

fig, ax = plt.subplots(figsize=(8, 4))
ax.bar(dataset["Date"], dataset["Sales"], color="#5B8DBE")
ax.spines["top"].set_visible(False)
ax.spines["right"].set_visible(False)
plt.tight_layout()
plt.show()  # MANDATORY

Critical rules:

  • plt.show() is mandatory as the final line -- nothing renders without it
  • dataset is auto-injected as a pandas DataFrame; do not create it
  • Column names match the nativeQueryRef (display name) from field bindings
  • Only the last plt.show() call renders; multiple figures not supported
Step 2b: Review

Before presenting the script to the user, dispatch the python-reviewer agent to validate correctness and provide design feedback.

Step 3: Inject the Script
bash
pbir visuals python "Report.Report/Page.Page/PythonChart.Visual" \
  --script-file chart.py

The CLI handles PBIR string escaping.

Step 4: Validate
bash
pbir visuals bind "Report.Report/Page.Page/PythonChart.Visual" --show
pbir validate "Report.Report" --all

PBIR Format

For read-only diagnosis, scripts are stored in visual.objects.script[0].properties:

json
{
  "source": {"expr": {"Literal": {"Value": "'import matplotlib.pyplot as plt\\n...\\nplt.show()'"}}},
  "provider": {"expr": {"Literal": {"Value": "'Python'"}}}
}

The CLI handles all escaping automatically.

Supported Libraries

Power BI Service (Python 3.11)
PackageVersionPurpose
matplotlib3.8.4Primary plotting
seaborn0.13.2Statistical visualization
numpy2.0.0Numerical computing
pandas2.2.2Data manipulation
scipy1.13.1Scientific computing
scikit-learn1.5.0Machine learning
statsmodels0.14.2Statistical models
pillow10.4.0Image processing

Not supported: plotly, bokeh, altair (networking blocked in Service).

Full package list: https://learn.microsoft.com/power-bi/connect-data/service-python-packages-support

Desktop

Any locally installed package works without restriction.

Best Practices

  1. Always call plt.show() -- mandatory, must be the final line
  2. Use figsize=(w, h) to match container aspect ratio (72 DPI output)
  3. Remove chart chrome -- ax.spines["top"].set_visible(False) etc.
  4. Use hex colors matching the report theme
  5. Keep scripts simple -- 5-min timeout Desktop, 1-min Service
  6. Minimize transforms -- do heavy computation in DAX/Power Query instead
  7. Use try/except for robustness in production scripts
  8. Copy data first -- data = dataset.copy() before manipulation

Limitations

ConstraintDesktopService
OutputStatic PNG, 72 DPIStatic PNG, 72 DPI
Timeout5 minutes1 minute
Row limit150,000150,000
Payload--30 MB
NetworkingUnrestrictedBlocked
GatewayPersonal onlyPersonal only
Cross-filter FROMNot supportedNot supported
Receive cross-filterYesYes
Publish to webNot supportedNot supported
Embed (app-owns-data)Not supportedNot supported

Script Structure Template

python
import matplotlib.pyplot as plt
import numpy as np

# 1. Guard against empty data
if dataset.empty:
    fig, ax = plt.subplots(1, 1, figsize=(6, 4))
    ax.text(0.5, 0.5, "No data available", ha='center', va='center', fontsize=14, color='#888888')
    ax.axis('off')
    plt.show()
else:
    # 2. Data preparation (dataset is auto-injected)
    data = dataset.copy()

    # 3. Create figure with explicit size
    fig, ax = plt.subplots(figsize=(8, 4))

    # 4. Plot
    ax.plot(data["X"], data["Y"], color="#5B8DBE", linewidth=2)

    # 5. Style
    ax.spines["top"].set_visible(False)
    ax.spines["right"].set_visible(False)
    ax.grid(axis="y", alpha=0.3)

    # 6. Layout and render
    plt.tight_layout()
    plt.show()
Show full SKILL.md (403 more words)Show less

When to Use a Script Visual

Reach for a Python visual only when all of the following hold:

  • The chart has no native equivalent and no reasonable Deneb spec
  • The value is in a statistical computation that must run at render time (model fit, kernel density, forecast band), not just a shape Vega could draw
  • The visual does not need to be a cross-filter source, hover tooltips, publish-to-web, or app-owns-data embed
  • The report is served in a Pro/PPU or higher capacity with a Fabric-enabled region

If interactivity or cross-filtering matters, use Deneb (a static PNG cannot be a selection source). If the need is a small inline mark (sparkline, bar, status pill), use an SVG measure (no row cap, no timeout, no licensing/region gate, renders under publish-to-web). The script visual's niche is narrow: compute-at-render statistical plots for internal or org consumption.

Python vs R once a script visual is the right call: use Python when the computation leans on scikit-learn, statsmodels, or scipy, or when surrounding report logic is already Python. Use R for publication-quality statistical defaults and packages with no Python peer (forecast, corrplot, pheatmap, ridgeline/violin). Where equal, default to whichever language the report's other scripts use; mixing doubles the publish-time package surface to validate.

Do not default to a script visual because a chart type "looks statistical." A box plot, lollipop, or dumbbell is an SVG-measure or Deneb job; reserve scripts for charts that genuinely compute.

References

  • references/data-model.md -- dataset grouping mechanic, the row/byte caps, and how to force per-row input
  • references/community-examples.md -- seaborn gallery examples organized by chart type, plus matplotlib and Python Graph Gallery links
  • references/chart-patterns.md -- Common matplotlib/seaborn chart patterns (bar, heatmap, donut, KPI, area)
  • examples/script/ -- Standalone Python scripts (bar-chart, trend-line) -- ready to inject into visual.json after escaping
  • examples/visual/bar-chart.json -- PBIR visual.json: horizontal stacked bar with PY comparison lines and % change labels
  • examples/visual/kpi-card.json -- PBIR visual.json: text-based KPI with value, % change indicator, and PY comparison
  • examples/visual/trend-line.json -- PBIR visual.json: area chart with line plot and monthly x-axis

Fetching Docs

To retrieve current Python visual / package support docs, use microsoft_docs_search + microsoft_docs_fetch (MCP) if available, otherwise mslearn search + mslearn fetch (CLI). Search based on the user's request and run multiple searches as needed to ensure sufficient context before proceeding.

  • pbi-report-design -- Layout and design best practices
  • r-visuals -- R Script visuals (same concept, different language)
  • deneb-visuals -- Vega/Vega-Lite visuals (interactive, vector-based alternative)
  • svg-visuals -- SVG via DAX measures (lightweight inline graphics)
  • pbir-format (pbip plugin) -- PBIR JSON format reference

© data-goblin, GPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 9 other files (references) in plugins/custom-visuals/skills/python-visuals of data-goblin/power-bi-agentic-development.

  • SKILL.md
  • examples/script/bar-chart.py
  • examples/script/trend-line.py
  • examples/visual/bar-chart.json
  • examples/visual/kpi-card.json
  • examples/visual/trend-line.json
  • examples/visual/ytd-line-chart.json
  • references/chart-patterns.md
  • references/community-examples.md
  • references/data-model.md

Open the folder on GitHubat commit 41886f2

Compare with similar skills

Python Visuals next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Python Visuals compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Python Visuals this skilldata-goblin/power-bi-agentic-development1k—~2.1kAutomated safety check: PassGPL-3.0
Release Evidence WorkflowAli-Marandi/ClimateDataAnalyzer107—~1.6kAutomated safety check: PassMIT
Analytics Data AnalysisMindrally/skills267—~1.6kAutomated safety check: PassApache-2.0
SeabornK-Dense-AI/scientific-agent-skills48k1 repos~3.4kAutomated safety check: NotesBSD-3-Clause
Plot ML Figureprobabl-ai/skills135—~785Automated safety check: PassBSD-3-Clause
SeabornzLanqing/codex-claude-academic-skills4.6k16 repos~4.9kAutomated safety check: PassBSD-3-Clause

Similar skills

  • Release Evidence Workflow

    Ali-Marandi/ClimateDataAnalyzer

    Build an auditable release-evidence workflow for a desktop or packaged application.

    107 GitHub stars~1.6k tokensUpdated 1 mo ago
    Data & AnalyticsAuto-check passed
  • Analytics Data Analysis

    Mindrally/skills

    Best practices for analytics, data analysis, and visualization using Python, pandas, matplotlib, seaborn, and Jupyter notebooks.

    267 GitHub stars~1.6k tokensUpdated 1 mo ago
    Data & AnalyticsAuto-check passed
  • Seaborn

    K-Dense-AI/scientific-agent-skills

    Creates Seaborn statistical visualizations with pandas integration for distributions, relationships, categorical comparisons, regression displays, pair plots, and heatmaps.

    48k GitHub starsUsed in 1 repo~3.4k tokens
    Data & AnalyticsAuto-check: notes
  • Plot ML Figure

    probabl-ai/skills

    Pick how to write a figure before custom plot code. An agent skill from probabl-ai/skills.

    135 GitHub stars~785 tokensUpdated today
    Data & AnalyticsAuto-check passed
  • Seaborn

    zLanqing/codex-claude-academic-skills

    Statistical visualization with pandas integration. An agent skill from zLanqing/codex-claude-academic-skills.

    4.6k GitHub starsUsed in 16 repos~4.9k tokens
    Data & AnalyticsAuto-check passed
  • Python Executor

    cortega26/chile-hub

    Execute Python code in a safe sandboxed environment via [inference.sh](https://inference.sh).

    113 GitHub starsUsed in 2 repos~1.5k tokens
    Data & AnalyticsAuto-check passed

More from data-goblin/power-bi-agentic-development

All 33 skills in this repo
  • Paginated Report

    data-goblin/power-bi-agentic-development

    Author, validate, publish, and test Power BI paginated reports in the RDL format.

    1k GitHub stars~3.5k tokensUpdated 2 days ago
    Auto-check passed
  • Audit Tenant Settings

    data-goblin/power-bi-agentic-development

    Automatically invoke this skill whenever the user asks about Fabric tenant settings or Power BI tenant settings or auditing tenant settings.

    1k GitHub stars~4.7k tokensUpdated 2 days ago
    Auto-check passed
  • Bpa Rules

    data-goblin/power-bi-agentic-development

    Interactive BPA rule generation for Power BI semantic models; guided discovery, model investigation, and expert rule authoring.

    1k GitHub stars~4.4k tokensUpdated 2 days ago
    Auto-check passed
  • Pbip

    data-goblin/power-bi-agentic-development

    Guidance for Power BI Project (PBIP) structure, thick and thin reports, project renames, forks, and validation.

    1k GitHub stars~3.8k tokensUpdated 2 days ago
    Auto-check passed
  • Review Report

    data-goblin/power-bi-agentic-development

    Actionable feedback on the quality, usage, and effectiveness of Power BI reports.

    1k GitHub stars~4.2k tokensUpdated 2 days ago
    Auto-check passed
  • Semantic Model

    data-goblin/power-bi-agentic-development

    This skill should be used whenever the user mentions a "semantic model", "data model", or "dataset", or asks to "build", "model", "design", "optimize", "review", or "audit" one, or to "add a…

    1k GitHub stars~2.8k tokensUpdated 2 days ago
    Auto-check passed

Questions about Python Visuals

What does Python Visuals do?

Python visual creation and matplotlib/seaborn patterns for PBIR reports. Python Visuals is an agent skill from data-goblin/power-bi-agentic-development. Python visual creation and matplotlib/seaborn patterns for PBIR reports.

When should I use Python Visuals?

Python Visuals fits situations like: mentions Python visual; matplotlib in Power BI; seaborn in Power BI; asks to create a Python visual.

How do I install Python Visuals in Claude Code?

Run `npx skills add data-goblin/power-bi-agentic-development --skill python-visuals -a claude-code`. Or copy the skill folder (plugins/custom-visuals/skills/python-visuals in data-goblin/power-bi-agentic-development) into .claude/skills/python-visuals in your project. Claude Code loads it when a task matches its description.

How do I install Python Visuals in Codex?

Run `npx skills add data-goblin/power-bi-agentic-development --skill python-visuals -a codex`. Or copy the skill folder (plugins/custom-visuals/skills/python-visuals in data-goblin/power-bi-agentic-development) into .agents/skills/python-visuals in your project. Codex loads it when a task matches its description.

Can I use Python Visuals in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add data-goblin/power-bi-agentic-development --skill python-visuals -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/python-visuals, .gemini/skills/python-visuals, .github/skills/python-visuals and .opencode/skills/python-visuals in your project.

What does Python Visuals need to run?

Going by SKILL.md and its folder, Python Visuals needs Python for the scripts in its folder. Our summary lists: Python 3.

Does Python Visuals access the network?

SKILL.md names 1 domain. As links in the text: learn.microsoft.com. This is read from the text; nothing was executed.

Is Python Visuals safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Python Visuals use?

Python Visuals is published under the GPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Python Visuals use?

About 2.1k tokens (SKILL.md is roughly 8.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.8k tokens, read only when the agent opens those files.

What are the alternatives to Python Visuals?

Skills that share tags, products or a category with Python Visuals: Release Evidence Workflow (Ali-Marandi/ClimateDataAnalyzer, 107 stars), Analytics Data Analysis (Mindrally/skills, 267 stars), Seaborn (K-Dense-AI/scientific-agent-skills, 48k stars) and Plot ML Figure (probabl-ai/skills, 135 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Python Visuals?

data-goblin (a GitHub user) maintains it in data-goblin/power-bi-agentic-development, which has 1,026 GitHub stars. The repository holds 33 skills in this directory. The repository was last updated on October 5, 2026.

Source: data-goblin/power-bi-agentic-development on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.