# r-reviewer

r-reviewer validates R visual scripts for Power BI before presenting them to the user: checks ggplot2 code, platform conventions, and gives design feedback.

- 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/r-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/r-reviewer

## What it does

The subagent reads a finished R script and checks seven requirements: presence of `print(p)` at the end, absence of `dataset` definition (Power BI injects it), index-based column access (`dataset[,1]`), use of allowed packages only (ggplot2, dplyr, tidyr, ggrepel, patchwork, cowplot, corrplot, viridis, RColorBrewer, forecast, pheatmap, treemap, lattice), no network requests, empty data handling, and single plot output. Gives up to three design notes: suggests `theme_minimal()`, hex color codes instead of defaults, explicit factor levels for sorting, adequate margins (`plot.margin`).

Returns a list of failed checklist items, recommendations, and a verdict of READY or NEEDS CHANGES. Uses `Read`, `Grep`, `Glob` tools and the sonnet model. Requires R and listed packages for local execution.

## Requirements
- Works with: Power BI

## Install

### GitHub Copilot (native platform)

**Manually: put the files in place**
- File: `.github/agents/r-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/r-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/r-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/r-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/r-reviewer.agent.md

## When to use it
- validate an R script before sending it to Power BI
- catch missing `print(p)` or forbidden packages
- get feedback on plot colors and margins

## Example prompts
- Check this violin plot script before showing it to the user
- Run r-reviewer on `violin_plot.R`
- Have the r-reviewer subagent review the new chart

## Similar
- [power-bi-dax-optimization](https://affpapa.org/en/nevibecode/skills/power-bi-dax-optimization.md) — skill · 9100 installs
- [power-bi-model-design-review](https://affpapa.org/en/nevibecode/skills/power-bi-model-design-review.md) — skill · 9000 installs
- [SemanticOps MCP (for Power BI)](https://affpapa.org/en/nevibecode/mcp/semanticops-mcp-for-power-bi.md) — MCP server · ★ 256 repo stars
- [pbirb-mcp](https://affpapa.org/en/nevibecode/mcp/pbirb-mcp.md) — MCP server · ★ 6 repo stars
- [power-bi-build](https://affpapa.org/en/nevibecode/skills/power-bi-build.md) — skill · 688 installs
- [power-bi-salespulse-360-dashboard](https://affpapa.org/en/nevibecode/skills/power-bi-salespulse-360-dashboard.md) — skill · 661 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
