Agent skill · stephenturner
write-alt-text
Writes Chart Alt Text on Plots
What it needs
About 4k tokens when loaded.
What this skill does
Generate accessible alt text for data visualizations in this project. ARGUMENTS label: (optional) specific fig- label to generate alt text for file: (optional) specific .qmd file to process Instructions When invoked, analyze the figure(s) and generate alt text following these guidelines: Key Advantage: Source Code Access Unlike typical alt text scenarios where you only see an image, we have access to the R code that generates each chart. Use this to extract precise details: From ggplot2 code: aes(x, y) → exact variable names for axes aes(color = ...) / aes(fill = ...) → what color encodes geompoint() → scatter, geomhistogram() → histogram, geomline() → line chart geomsmooth() / geomabline() → overlaid fitted lines facetwrap(~var) → number of panels and what varies scalecolorgradient() → color encoding scheme labs(x = ..., y = ...) → axis labels if customized From data generation code: rbeta(), rnorm(), runif() → expected distribution shape mutate() transformations → what was done to data Recipe steps → feature engineering applied Filtering/subsetting → what subset is shown From surrounding prose: Text before/after the chunk explains the purpose and key insight Chapter context tells you what the figure is meant to teach This is often the best source for the "key insight" part of alt text Three-Part Structure (Amy Cesal's Formula) 1. Chart type - First words identify the format 2. Data description - Axes, variables, what's shown 3. Key insight - The pattern or takeaway (often found in surrounding text) Relationship to fig-cap Read the fig-cap first. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills stephenturner/write-alt-text