# python-visuals

This skill guides an agent through adding Python visuals to PBIR Power BI reports and writing the matplotlib or seaborn scripts behind them.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf (Devin Desktop), Claude.ai · ★ 1104 repo stars
- Author: Kurt Buhler
- License: GPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/data-goblin/power-bi-agentic-development/tree/HEAD/plugins/custom-visuals/skills/python-visuals/SKILL.md
- Updated: 2026-10-28
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/python-visuals

## What it does

The skill covers the full build cycle for a Python visual: the agent adds it to a report page with `pbir add visual pythonVisual`, writes a matplotlib or seaborn script, injects it with `pbir visuals python --script-file`, and checks the binding through `pbir validate`. Editing the report JSON by hand is off limits; every change goes through the `pbir` CLI.

A Python visual renders as a static PNG with no interactivity, and the script must end with `plt.show()` or nothing appears. Data arrives pre-loaded in a `dataset` variable that the script should not recreate. Power BI Service only runs a fixed set of packages — matplotlib, seaborn, numpy, pandas, scipy, scikit-learn, statsmodels, pillow — and blocks plotly, bokeh and altair because outbound networking is disabled there; Desktop has no such package restriction.

Before handing a finished script back to the user, the skill dispatches a separate `python-reviewer` subagent to check it. It also spells out when a Python visual is the wrong tool: Deneb covers cross-filtering and interactive charts, while small inline marks are better served by SVG measures that skip the row cap and timeout entirely.

## Requirements
- Works with: Power BI

## Install

### Claude Code (native platform)

1. **Plugin marketplace**
In the agent chat (not a shell):
```text
/plugin marketplace add data-goblin/power-bi-agentic-development
```
In the agent chat (not a shell):
```text
/plugin install custom-visuals@power-bi-agentic-development
```
This installs the whole custom-visuals plugin with all its skills

2. **Skills CLI (Vercel)**
```bash
npx skills add data-goblin/power-bi-agentic-development --skill python-visuals -a claude-code
```

3. **Manually: put the files in place**
- File: `~/.claude/skills/python-visuals/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/python-visuals/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add data-goblin/power-bi-agentic-development --skill python-visuals -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/python-visuals/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add data-goblin/power-bi-agentic-development --skill python-visuals -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/python-visuals/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install data-goblin/power-bi-agentic-development plugins/custom-visuals/skills/python-visuals
```

2. **Manually: put the files in place**
- File: `.github/skills/python-visuals/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add data-goblin/power-bi-agentic-development --skill python-visuals -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/data-goblin/power-bi-agentic-development --path plugins/custom-visuals/skills/python-visuals
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/python-visuals/SKILL.md` — The legacy .windsurf/skills/ path still works

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/data-goblin/power-bi-agentic-development/tree/HEAD/plugins/custom-visuals/skills/python-visuals/SKILL.md

## When to use it
- add a Python visual to a PBIR report page
- write a matplotlib or seaborn script for Power BI
- review a Python visual script before it goes into a report
- decide between a Python visual, Deneb, or an SVG measure
- inject a finished script into a visual through pbir

## Example prompts
- Add a Python visual showing sales by date as a bar chart
- Write a seaborn script for the PythonChart visual and inject it with pbir
- Check whether this Python visual script will fit the Power BI Service timeout

## Similar
- [data-jupyter-python](https://affpapa.org/en/nevibecode/skills/data-jupyter-python.md) — skill · 913 installs
- [Horizun PBI MCP](https://affpapa.org/en/nevibecode/mcp/horizun-pbi-mcp.md) — MCP server · ★ 34 repo stars
- [power-bi-custom-visuals-development](https://affpapa.org/en/nevibecode/rules/power-bi-custom-visuals-development.md) — rule · ★ 41430 repo stars
- [create-viz](https://affpapa.org/en/nevibecode/skills/create-viz.md) — skill · 5400 installs
- [figure-generation](https://affpapa.org/en/nevibecode/skills/figure-generation.md) — skill · 2300 installs
- [csv-data-summarizer](https://affpapa.org/en/nevibecode/skills/csv-data-summarizer.md) — skill · 2100 installs

From the same set: [data-goblin/power-bi-agentic-development](https://affpapa.org/en/nevibecode/by/data-goblin/power-bi-agentic-development.md) — 59 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
