Agent skill

r-visuals

R visual creation and ggplot2 patterns for PBIR reports. Automatically invoke when the user mentions "R visual", "ggplot2", "ggplot in Power BI", or asks to "create an R visual", "add an R chart", "write an R visual script", "inject an R script into Power BI".

data-goblingithub.com/data-goblinGitHub ↗
claude-codecopilotGPL-3.0
Install
npx skills add data-goblin/power-bi-agentic-development --skill r-visuals --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 10
SKILL.md size: 9 KB
Bundled scripts: none
Path: plugins/custom-visuals/skills/r-visuals/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 833
Language: C#

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# R 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. R visuals execute R scripts (primarily ggplot2) to render static PNG images on the Power BI canvas. **ggplot2 is the preferred library** -- its grammar of graphics approach produces clean, publication-quality statistical visualizations with less code. R is particularly strong for statistical visualizations. ## Visual Identity - **visualType:** `scriptVisual` - **Data role:** `Values` (columns and measures, multiple allowed) - **Data variable:** `dataset` (data.frame, auto-injected) - **Row limit:** 150,000 rows - **Output:** Static PNG at 72 DPI -- no interactivity ## Workflow: Creating an R Visual ### Step 1: Add the Visual ```bash pbir add visual scriptVisual "Report.Report/Page.Page" --name RevenueByDateR \ --data "Values:Sales.Date" --data "Values:Sales.Revenue" ``` ### Step 2: Write the Script ```r library(ggplot2) p <- ggplot(dataset, aes(x=Date, y=Sales)) + geom_col(fill="#5B8DBE") + theme_minimal(base_size=12) + theme(panel.grid.major.x=element_blank()) pr

What's inside
Steps it walks through
  1. Visual Identity
  2. Workflow: Creating an R Visual
  3. Step 1: Add the Visual
  4. Step 2: Write the Script
  5. Step 2b: Review
  6. Step 3: Inject the Script
  7. Step 4: Validate
  8. PBIR Format
  9. Supported Packages
  10. Power BI Service (R 4.3.3)
  11. Desktop
  12. Best Practices
  13. Limitations
  14. Script Structure Template
Ships with 9 files
  • examples/script/bar-chart.R
  • examples/script/trend-line.R
  • examples/visual/bar-chart.json
  • examples/visual/bullet-chart.json
  • examples/visual/trend-line.json
  • examples/visual/ytd-line-chart.json
  • references/community-examples.md
  • references/data-model.md
  • references/ggplot2-patterns.md
Commands it runs
pbir add visual scriptVisual "Report.Report/Page.Page" --name RevenueByDateR \
pbir visuals r "Report.Report/Page.Page/RevenueByDateR.Visual" --script-file chart.r
pbir visuals bind "Report.Report/Page.Page/RevenueByDateR.Visual" --show
pbir validate "Report.Report" --all
More from power-bi-agentic-development
All skills →
About this skill
What does the r-visuals skill do?

R visual creation and ggplot2 patterns for PBIR reports. Automatically invoke when the user mentions "R visual", "ggplot2", "ggplot in Power BI", or asks to "create an R visual", "add an R chart", "write an R visual script", "inject an R script into Power BI".

How do I install it?

Run `npx skills add data-goblin/power-bi-agentic-development --skill r-visuals --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From data-goblin/power-bi-agentic-development, a repository with 833 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going