Generates, reviews, or refactors ggplot2 code in R following opinionated best practices. Covers themes, scales, faceting, legends, and export settings.
Ships in dataviz-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
You are an expert R and ggplot2 assistant. Follow these rules strictly when generating or reviewing ggplot2 code. This skill covers the coding side only — for chart design principles, pair it with a dedicated dataviz skill.
|>snake_case for all variable and column namesggplot(data = df, mapping = aes(x = var1, y = var2))geom_col() when you have explicit y values, geom_bar() only when countingggsave(), always specifying width, height, units, and dpitheme_minimal(base_size = 14) and override elements with theme().element_blank() to remove elements, not element_line(color = "white").theme(): plot.title = element_text(face = "bold", hjust = 0), plot.caption = element_text(color = "grey50").plot.margin = margin(15, 15, 15, 15).coord_cartesian(xlim = ..., ylim = ...) for zooming (preserves data). Use scale_*_continuous(limits = ...) only to filter data.scales::label_comma(), scales::label_percent(), etc.expand = expansion(mult = 0) or expansion(add = 0) to control padding.theme(legend.position = "top") (or "bottom", "none").labs(color = NULL) (or fill = NULL…).guide_legend(nrow = 1) for compact horizontal legends.geom_text() or geom_label().facet_wrap(vars(category)) for a single variable, facet_grid(rows = vars(x), cols = vars(y)) for cross-breakdowns.scales = "free_y" or "free_x" lets panel ranges differ; the default scales = "fixed" shares them.ggsave("plot.png", width = 23, height = 13, units = "cm", dpi = 150, bg = "white")ggsave("plot.pdf", width = 23, height = 13, units = "cm", dpi = 300)bg = "white" explicitly.color when you mean fill (bars, areas, and tiles use fill; points and lines use color).factor() to make a numeric column categorical.aes() — constants go outside: geom_point(color = "red"), not geom_point(aes(color = "red")).geom_bar(stat = "identity") — use geom_col() instead.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/dataviz-skills:ggplot2from dataviz-skills
npx claudepluginhub holtzy/dataviz-skills --plugin dataviz-skills6 skills in this plugin
/d3Use when building, fixing or animating a chart with D3.js inside a React or Next.js app (barplot, scatterplot, line chart, treemap, map…). Covers the D3-for-math / React-for-rendering split, margins and axes, responsiveness with a useDimensions hook, animation with Motion, and switching from SVG to canvas for large datasets. Not for vanilla D3 projects without React./inspirationUse BEFORE writing any code that draws a chart, map, plot or dashboard (D3, ggplot2, Matplotlib, geopandas, plotly, Vega…), even for a one-line request like "make a map of X", "fais-moi une carte de X", "visualise Z", and even when the work starts with fetching data. Searches curated galleries of published dataviz as one catalog (dataviz-inspiration.com, Dataviz Index) for 3–5 real references to borrow ideas from — form, annotation, palette, layout — with links back to each source. Also use when asked for chart ideas, examples or references, or to improve a chart that looks generic. Triggers: carte, graphique, visualisation, dataviz, infographie, tableau de bord, chart, map, plot, graph, figure, dashboard, choropleth./matplotlibCreate, improve, or reproduce Matplotlib charts with deliberate styling, typography, annotations, custom layouts, and maps. Use when producing Python visualizations or refining existing Matplotlib, Seaborn, or GeoPandas figures./new-dataviz-projectScaffold a new web dataviz project with Yan Holtz's preferred stack - React, TypeScript, D3, shadcn/ui + Tailwind, Lucide icons, Bitter / Roboto / Fira Mono fonts, a narrow reading column, a default barplot, and GitHub Pages deployment. Use when the user asks to create, start, scaffold or set up a new dataviz, chart, D3 or React visualization project or website./roast-my-chartReview a finished chart, plot, map or dashboard against the 61 Data to Viz caveat flashcards, and report what to fix. Use when the user asks to roast, review, critique, audit or give feedback on a chart, asks "what's wrong with my chart" or "is this chart misleading", or wants a check before publishing. Works on an image, on plotting code (ggplot2, Matplotlib, D3, Plotly, Vega…), or both.Other plugins' skills for the same job