# python-reviewer

python-reviewer reviews Python visual scripts before placing them into Power BI. It catches banned libraries, layout clipping, and missing display calls.

- subagent · `type=agent` · Claude Code, Codex, Cursor, GitHub Copilot · ★ 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/reports/agents/python-reviewer.agent.md
- Updated: 2026-10-28
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/agents/python-reviewer

## What it does

Running on the Sonnet model, this subagent relies on `Read`, `Grep`, and `Glob` to inspect Python visualization files. Its primary goal is ensuring code aligns with Power BI constraints before you test it on a canvas. Network requests or file downloads cause immediate failures because the target runtime environment forbids outbound traffic.

The review enforces strict platform boundaries. Scripts must not instantiate a `dataset` variable, as Power BI injects this DataFrame automatically. Only approved packages pass: pandas, numpy, matplotlib, seaborn, scipy, scikit-learn, statsmodels, and pillow. Plotly, Bokeh, and Altair are flagged as errors.

Formatting checks require proper 72 DPI dimensions, muted colors, and a `tight_layout()` call to prevent clipped labels. Omitting `plt.show()` on the final line leaves the visual completely blank, so the agent marks the script as needing changes until that call is added.

## Requirements
- Works with: Power BI

## Install

### GitHub Copilot (native platform)

**Manually: put the files in place**
- File: `.github/agents/python-reviewer.agent.md`

### Claude Code

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 reports@power-bi-agentic-development
```

2. **Manually: put the files in place**
- File: `.claude/agents/python-reviewer.md` — For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention. Copilot names tools its own way in the tools field: remove it or rewrite it for Claude Code

### Codex

**Manually: put the files in place**
- File: `.codex/agents/python-reviewer.toml` — Codex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/

### Cursor

**Manually: put the files in place**
- File: `.cursor/agents/python-reviewer.md` — Cursor also reads .claude/agents/

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/reports/agents/python-reviewer.agent.md

## When to use it
- validate Power BI Python visual scripts before testing them on a canvas
- block unauthorized packages and network calls in visualization code
- prevent chart clipping by checking 72 DPI dimensions and tight layout calls
- catch missing plt.show calls and unhandled empty datasets

## Example prompts
- Review my distribution plot script with python-reviewer before putting it into Power BI
- Run python-reviewer on `visual.py` to check for Power BI compatibility

## Similar
- [Data Visualization](https://affpapa.org/en/nevibecode/skills/aj-geddes-data-visualization.md) — skill · 576 installs
- [data-jupyter-python](https://affpapa.org/en/nevibecode/skills/data-jupyter-python.md) — skill · 913 installs
- [data-visualization](https://affpapa.org/en/nevibecode/skills/anthropics-data-visualization.md) — skill · 15100 installs
- [create-viz](https://affpapa.org/en/nevibecode/skills/create-viz.md) — skill · 5400 installs
- [matplotlib-best-practices](https://affpapa.org/en/nevibecode/skills/matplotlib-best-practices.md) — skill · 1100 installs
- [scientific-visualization](https://affpapa.org/en/nevibecode/skills/k-dense-ai-scientific-visualization.md) — skill · 2700 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
