r-reviewer — Claude Code subagent: R visual script validation
r-reviewer validates R visual scripts for Power BI before presenting them to the user: checks ggplot2 code, platform conventions, and gives design feedback.
GPL-3.0 ★ 1,104 updated 2026-10-28
.github/agents/r-reviewer.agent.mdWhat r-reviewer 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.
What it helps with
- 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 for the agent
- 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
How to install r-reviewer
Manually: put the files in place
.github/agents/r-reviewer.agent.md1Plugin marketplace
/plugin marketplace add data-goblin/power-bi-agentic-development/plugin install reports@power-bi-agentic-development2Manually: put the files in place
.claude/agents/r-reviewer.mdFor 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
Manually: put the files in place
.codex/agents/r-reviewer.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/r-reviewer.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about r-reviewer
How to install r-reviewer in Claude Code?
Run /plugin marketplace add data-goblin/power-bi-agentic-development, then /plugin install reports@power-bi-agentic-development. The subagent file will be at .claude/agents/r-reviewer.md.
What does r-reviewer do?
Validates R scripts for Power BI visuals: checks required calls, data access, package set, absence of networking, and gives design feedback on plots.
Which packages are allowed in r-reviewer?
ggplot2, dplyr, tidyr, ggrepel, patchwork, cowplot, corrplot, viridis, RColorBrewer, forecast, pheatmap, treemap, lattice. Packages with network requests are forbidden.