write-alt-text

Generate accessible alt text for ggplot2 charts in R/QMD documents.

2|1|Updated Mar 7, 2026
One-click install
npx skills add https://github.com/stephenturner/skills --skill write-alt-text
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: write-alt-text
Source: https://github.com/stephenturner/skills/tree/main/write-alt-text
Command: npx skills add https://github.com/stephenturner/skills --skill write-alt-text

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It removes the hard, time-consuming work of writing accessible alt text for charts by turning the chart source (including the plotting code) into clear, screen-reader-friendly descriptions.

Core Features & Use Cases

  • Code-informed chart understanding: Uses the available ggplot2/R code to identify axes, variables, chart types, facets, overlays, and encodings so the alt text is specific instead of generic.
  • Alt text tailored to figures: Produces descriptions that complement the figure caption (fig-cap) rather than repeating it.
  • Figure discovery workflow: Helps you find figure chunks, read context and code around them, and generate consistent alt text across many plots.

Quick Start

Ask it to generate alt text for the figure with label fig-alt for the provided QMD file.

Frequently Asked Questions about write-alt-text

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate accessible alt text for ggplot2 charts in a QMD file?

To generate accessible alt text for ggplot2 charts, the Skill analyzes your R plotting source code and surrounding figure context. It interprets axis variables, geoms, transformations, and faceting structures to compose screen-reader-friendly descriptions for QMD documents.

What is the best way to write alt text for data visualizations without repeating the figure caption?

Writing alt text that complements the figure caption (fig-cap) requires analyzing chart code to extract specific encodings and geoms. This Skill produces non-redundant descriptions by interpreting the plotting source directly, ensuring the alt text adds specific visual context rather than repeating the caption.

Can I use this to automatically describe complex ggplot2 charts with facets and color encodings for screen readers?

Yes, you can use this to describe complex ggplot2 charts for screen readers. It specifically handles facets, overlays, and color encodings by reading the available R code, identifying the chart structure, and generating accurate alt text tailored to those specific visual variables.

How does analyzing plotting source code improve alt text for data visualizations?

Analyzing plotting source code improves alt text by using the available ggplot2 commands to identify exact axes, variables, and chart types. This code-informed understanding ensures the generated descriptions are specific to the visual encoding rather than generic placeholder text.

Do I need to manually find figure chunks before generating alt text for my R markdown plots?

You do not need to manually find figure chunks first. The Skill includes a figure discovery workflow that helps you locate figure chunks, read the surrounding context and code, and generate consistent alt text across multiple plots in your QMD documents automatically.

What are the limitations of generating alt text from ggplot2 source code for accessibility?

Generating alt text from ggplot2 source code is limited by the availability of the plotting code and surrounding context. It requires interpreting axis variables, chart geoms, transformations, and faceting structure from the R/QMD document, meaning charts lacking accessible source code cannot be accurately described.