viz
Skill46 starsChanged 9 months agoMITView on GitHub
Use when creating any data visualization, chart, figure, or plot. Also use when the user asks to "plot", "graph", "visualize", "make a figure", or refine an existing chart.
4 other projects use a version of this.
Adopted by
Most recently taken up by
- sandptel/viztheir own version, first seen Sep 22, 2026
- SNL-UCSB/data-visualization-skilltheir own version, first seen Jul 27, 2026
- unsafe9/agent-skillstheir own version, first seen Jun 16, 2026
- FelipeAngeli/skillstheir own version, first seen Apr 10, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- SNL-UCSB/data-visualization-skill★ 4same name
- FelipeAngeli/skills★ 2same name
- unsafe9/agent-skills★ 1same name
- sandptel/viz★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository23 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- brainstormingSkill
- catch-upSkill
- clean-survey-dataSkill
- codexSkill
- datacheckSkill
- dataverse-syncSkill
- discuss-claimsSkill
- docSkill
- geminiSkill
- humanizerSkill
- marginaleffectsSkill
- marp-slideSkill
- napkinSkill
- pdfSkill
- playwrightSkill
- qualtrics-surveySkill
- screenshotSkill
- security-best-practicesSkill
- skill-creatorSkill
- stop-slopSkill
- survey-analysisSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 7 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
7
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Create publication-ready figures using ggplot2 in R.
- Distinctive: line 29
Before any plotting code, confirm:
- Distinctive: line 35
Do NOT guess column mappings silently.
- Distinctive: line 39
Ask about ALL of these before the first plot:
- Very specific: line 96
R model objects: Use broom::tidy(conf.int = TRUE) or marginaleffects::avg_slopes()
- Distinctive: line 108
Use igraph base plotting (not ggraph):
- Distinctive: line 121
When combining Stata models with R visualization:
- Distinctive: line 136
Always save both formats:
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Data Visualization
Create publication-ready figures using ggplot2 in R. Validate data and gather all visual requirements before generating the first plot.
When to Use
- Creating any chart, figure, or plot
- Refining an existing visualization (spacing, labels, colors, layout)
- User says "plot", "graph", "visualize", "figure", "chart"
When NOT to Use
- Quick exploratory
plot()orhist()for debugging (just do it) - User explicitly asks for base R graphics
Core Rule
Ask about ALL visual elements upfront before generating the first plot. Do not produce a draft and iterate one tweak at a time.
Workflow
Step 1: Validate Data
Before any plotting code, confirm:
- Read the data and print column names, types, and 3-5 sample rows
- Confirm column mappings with the user: which columns map to x, y, color, facet, etc.
- Check for issues: NAs in plot variables, unexpected factor levels, wrong types
Do NOT guess column mappings silently. If ambiguous, ask.
Step 2: Gather Visual Requirements
Ask about ALL of these before the first plot:
| Element | Ask about | Default if not specified |
| Chart type | bar, coef/forest, line, network, other | Infer from data structure |
| Layout | single panel, faceted, multi-panel | Single panel |
| Axes | labels, limits, breaks, log scale | Auto with clear labels |
| Colors | palette, specific mappings | Colorblind-safe, clean |
| Error bars | SE, 95% CI, none | 95% CI when applicable |
| Legend | position, title, label text | Right side, auto title |
| Separators | lines between groups | None unless grouped |
| Text | title, subtitle, caption, annotations | Minimal |
| Dimensions | width x height in inches | 7 x 5 |
Step 3: Build the Plot
Language: R with ggplot2. Always.
Theme baseline:
theme_minimal(base_size = 12) +
theme(
panel.grid.minor = element_blank(),
strip.text = element_text(face = "bold"),
legend.position = "bottom"
)Color palette: Colorblind-safe. No strong default - pick appropriate per chart:
- Categorical (2-8 groups):
scale_color_brewer(palette = "Set2")or similar - Sequential:
scale_fill_viridis_c() - Diverging:
scale_fill_distiller(palette = "RdBu")
Multi-panel approach:
- Same chart type across panels:
facet_wrap()/facet_grid() - Different chart types combined:
patchworkpackage
Step 4: Chart-Specific Patterns
Bar Charts
ggplot(df, aes(x = group, y = estimate, fill = condition)) +
geom_col(position = position_dodge(width = 0.8), width = 0.7) +
geom_errorbar(aes(ymin = ci_low, ymax = ci_high),
position = position_dodge(width = 0.8), width = 0.2) +
# 95% CI error bars by defaultCoefficient / Forest Plots
ggplot(df, aes(x = estimate, y = reorder(term, estimate))) +
geom_vline(xintercept = 0, linetype = "dashed", color = "gray50") +
geom_point(size = 2) +
geom_errorbarh(aes(xmin = ci_low, xmax = ci_high), height = 0.2)Input sources (handle all three):
- R model objects: Use
broom::tidy(conf.int = TRUE)ormarginaleffects::avg_slopes() - Stata margins output: Parse CSV/text from
marginsoresttabexport - Pre-computed CSV: Expect columns:
term,estimate,ci_low,ci_high
Line / Time Series
ggplot(df, aes(x = time, y = value, color = group)) +
geom_line(linewidth = 0.8) +
geom_ribbon(aes(ymin = ci_low, ymax = ci_high, fill = group), alpha = 0.15)Network Graphs
Use igraph base plotting (not ggraph):
library(igraph)
plot(g,
vertex.size = degree(g) * 2,
vertex.label.cex = 0.7,
vertex.color = V(g)$color,
edge.arrow.size = 0.3,
layout = layout_with_fr(g))Step 5: Stata-to-R Pipeline
When combining Stata models with R visualization:
- In Stata: Export estimates with
esttab using "estimates.csv", csv cior:margins, postthenmatrix list e(b),matrix list r(table) - In R: Parse the CSV, clean column names, build ggplot
# Parse Stata esttab CSV output
est <- read.csv("estimates.csv", skip = 1) # skip header row
# Clean: remove significance stars, convert to numeric
est$estimate <- as.numeric(gsub("[*]", "", est$estimate))Step 6: Save Output
Always save both formats:
ggsave("figure.png", width = 7, height = 5, dpi = 300)
ggsave("figure.pdf", width = 7, height = 5)Adjust dimensions based on content:
- Single panel: 7 x 5
- Two panels side by side: 10 x 5
- Tall coefficient plot (many terms): 7 x 8
- Network graph: 7 x 7
Quick Reference
| Chart type | Key geom | Error bars | Default |
| Bar | geom_col + position_dodge | geom_errorbar (95% CI) | Dodged, 0.7 width |
| Coefficient | geom_point + geom_errorbarh | Built-in (CI) | Horizontal, ref line at 0 |
| Line | geom_line + geom_ribbon | geom_ribbon (CI band) | 0.15 alpha ribbon |
| Network | igraph::plot() | N/A | Fruchterman-Reingold layout |
Common Mistakes
| Mistake | Fix |
| Guessing column names | Always read data first, confirm with user |
| Iterating one tweak at a time | Ask about ALL visual elements before first plot |
Using theme_gray() default | Always start with theme_minimal(base_size = 12) |
Forgetting position_dodge on error bars | Error bars must match bar dodge width exactly |
| Network plots with ggraph when user expects igraph | Default to igraph base plot() |
| Not saving both PNG and PDF | Always ggsave() both formats |
| Wrong dimensions for multi-panel | Scale width with number of panels |
| Parsing Stata output without cleaning stars | Strip *, **, *** before as.numeric() |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

